Conversation

As a simple example, let's make a Venn diagram. In Penrose, we can just write some code like 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}$ Hit go, and we get this picture.
Venn Diagram showing that the intersection of Circles and Diagrams is Venn Diagrams
1
9
53
What we’ve written here is sort of like the “HTML” for our diagram, which specifies the content. If we want to tweak the way it looks—or even its visual representation—we can also edit some CSS-like code.
The Style program for the complete example is available at https://github.com/penrose/penrose/blob/set-example/examples/set-theory-domain/venn-intersection-diagram-only.sty
2
5
42
By using different Styles, we can either just change the colors and line widths, or swap out the visualization to use arrows instead of circles.
Venn diagram as above, but with circle stroke (similar color to circle) and text colored accordingly. Another diagram with an arrow pointing down from "Diagrams" to "Venn Diagrams" and another arrow pointing down from "Circles" to "Venn Diagrams."
1
1
25
Our paper shows how we can use the same approach to illustrate many different kinds of abstract ideas, including sets, functions, vectors, geometry, meshes, and ray tracing! For example, here we used Penrose to illustrate the same set of geometric statements in 3 ways.
A clean separation between abstract mathematical objects and their visual representation provides new capabilities beyond existing code- or GUI-based tools. Here, for instance, the same set of statements is given three different visual interpretations, via Euclidean, spherical, and hyperbolic geometry.
2
7
55
I personally think the Style language is really cool. It gives you a way to encode the visual subjectivity that you bring to the whiteboard, like telling the whiteboard what you mean as you draw.
2
2
21
We hope to build Penrose into a platform for automatic illustration. For example: Could we automatically illustrate math textbooks & webpages? Make interactive diagrams? Create personal tutors? We’re a long way from reaching these goals, but think Penrose is a great first step!
2
2
50
Our system is not yet ready to use, but you can sign up for the mailing list to hear more: penrose.ink We’re looking to collaborate with educators and authors on making diagrams. If that sounds like you, get in touch here:
6
11
55