Proposal for automatic diagram creation system for Julia - Inspiration Penrose

Penrose is a system under development which automatically creates math diagrams that would be suitable for a textbook directly from abstract mathematical specification. A simple example is creating Venn diagrams from sets, but it’s capable of much more. The key design is that the content of the diagram is specified in abstract terms and the tedious graphical specification and layout is driven by a style and numerical optimization. This allows you to skip from abstract concept straight to beautiful diagram. Multiple different visualizations can be applied to the same abstract math specification by changing the style (e.g. sets as venn digram or trees).

If you would like to learn more there’s a beautiful paper submitted to Siggraph 2020, a website, and video demo. If this sort of thing interests you, Keenan Crane has a lot more beautiful work coming out of his lab at CMU.

I don’t like that Penrose is essentially a set of DSLs built on top of Haskell. We have another two-language problem where there is a divide between the language of programming and the language of diagram creation. I would like to generate visuals while I am working on my code (e.g. calling display).

There’s a few packages that automatically create diagrams from from their types, but it looks like many package are making their own visualization modules instead of following a general purpose JuliaPlots + recipes paradigm. A good example is CatLab which uses Tikz and Compose to create category theory wiring diagrams which is borrowed by the SemanticModels.jl package. Many other package could also make use of a general-purpose diagramming system like Casual.jl (formerly Jusdl.jl)

I’m not affiliated with this project and don’t have experience with it’s underpinnings, but I would like to see something like this in Julia.

Edit: Images produced by Penrose.
Real Analysis

Geometry

8 Likes

That looks extremely cool

2 Likes