Simply input text to draw beautiful mathematical diagrams: CMU drawing tool Penrose is on the GitHub hot list | SIGGRAPH
Yuyang from Aofei Temple
Quantum Bit Report | Public Account QbitAI
Is drawing math illustrations a headache?
Now, researchers at CMU have developed a practical tool, Penrose :
Input in plain text and according to the language description, mathematical diagrams can be automatically generated.
Set Theory:
geometry:
Linear Algebra:
Ray Tracing:
No problem.
The entire process does not require tedious manual adjustments, but only requires describing mathematical expressions in the software using programming language.
Furthermore, these expressions are not limited to elementary functions but can express complex relationships in any area of mathematics.
This research result was selected for SIGGRAPH 2020, the top computer graphics conference.
On GitHub, it also received 3,500 stars and was on the hot list.
Some netizens think: Penrose is like LaTeX in scientific diagrams.
Draw mathematical diagrams in plain text
Anyone who has used LaTeX knows the joy of editing mathematical formulas.
So how did Penrose draw his mathematical graphs?
For example, to draw a set relationship like this:
In the software interface, completing such input can automatically generate:
If you are not satisfied with the color scheme or layout, click "resample" and the system will provide other different options:
You can also adjust it manually in the "sty" file:
The researchers also mentioned that the system supports integration with web-based applications. In addition, Penrose IDE can provide automatic syntax highlighting and auto-completion features.
However, Penrose is still in its early stages and is not yet open to the public. The R&D team said they are working hard to release a public version as soon as possible.
How to turn mathematical symbols into beautiful graphs?
Keenan Crane, one of the authors and assistant professor of computer science and robotics at CMU, said that the purpose of creating Penrose is to enable everyone to have the ability to draw beautiful graphs like a mathematician.
To achieve this, Penrose is built around two design principles:
-
Specify diagrams through mapping from mathematical symbols to visual icons;
-
Graphs are synthesized by solving related constrained optimization problems.
The first step is to specify mathematical objects and their visual representation using a programming language.
Specifically, it is divided into three parts:
-
Substance: Similar to HTML, used to specify content.
-
Style: Similar to CSS, used to adjust the appearance and visual presentation.
-
Domain: declares the objects, relations, and symbols available in the domain of mathematics.
It should be noted that this does not mean that users must learn three languages if they want to use Penrose.
In fact, most users only need to master the Substance language, which is similar to this:
Set A,B
intersecting(A,B)
set C := intersection(A,B)
Label A $\text{Circles}$
Label B $\text{Diagrams}$
Label C $\text{Venn Diagrams}$
Leave Domain and Style to professionals and just call the software package when you need it.
In the second step, constrained optimization is used to synthesize a graph that satisfies the given specifications.
The method is mainly inspired by hand drawings.
3500 stars, on the GitHub hot list
The effect displayed by Penrose was praised by netizens.
Currently, Penrose's GitHub has 3,500 stars and a popularity of 399 on Hacker News.
Some netizens believe that visualization is a very important means to understand mathematical concepts, and Penrose may be of great help to mathematics education.
Some netizens also expressed the hope that the geometric drawing software Geogebra could integrate this function.
However, some netizens pointed out that the simple example illustrates the idea of the system, but they still hope to see Penrose implement more complex mathematical concept visualizations to prove that it can indeed express complex relationships in the field of mathematics.
Portal
Paper address:
http://penrose.ink/media/Penrose_SIGGRAPH2020.pdf
GitHub address:
https://github.com/penrose/penrose
Official website:
http://www.penrose.ink/
-over-
Special benefits | One-stop audio and video solutions
Quantum Bit QbitAI · Toutiao signed author
Tracking new trends in AI technology and products
If you like it, click "Watching"!
Featured Posts