CMU’s ‘Penrose’ Turns Complex Math Notations into Illustrative Diagrams

Yuqing7 | 412 points

Simple examples demonstrate the idea of the system, but I would be more impressed if they took some of the more complex published math papers out there and successfully rendered the notation from those with Penrose. That, to me, would better prove that it can handle the complexity that often comes with mathematical concepts.

ColanR | 4 years ago

There are a few things that need to come together for a complete diagram publishing system:

* Converting hand-drawn sketches to tidy diagrams [1]

* Converting tidy diagrams to look hand-drawn [2]

* A textual DSL for diagrams (e.g. Penrose)

* Support of declarative constraints for the diagram [3]

* Animation of the diagram [4][5]

[1] Paper https://www.fiftythree.com/think

[2] rough.js https://github.com/pshihn/rough

[3] Basalt https://www.anishathalye.com/2019/12/12/constraint-based-gra...

[4] Distill https://distill.pub/2017/momentum/ source https://github.com/distillpub/post--momentum

[65] g9.js https://omrelli.ug/g9/

mikhailfranco | 4 years ago

This is the video source of the gif at the top of the article [0].

I was pretty interested in Penrose when I first saw it but I still haven't seen a "cool" example of its use. Either something that's easy in Penrose but hard in every other visualization tool, or an example of a visualization in Penrose that elucidates some deeper mathematical relationship between the objects being shown.

[0] https://vimeo.com/416822487

enricozb | 4 years ago

See also Anish Athalye 2019, "Experiments in Constraint-based Graphic Design" [1], which takes a similar approach to diagram creation. I'd also recommend looking at Keenan Crane's other research [2], in particular his book on Discrete Differential Geometry, which inspired some of the diagrams you see on the Penrose site.

[1]: https://www.anishathalye.com/2019/12/12/constraint-based-gra... [2]: http://www.cs.cmu.edu/~kmcrane/

benrbray | 4 years ago

Has anyone tried to make complex visualizations with Penrose that would mirror some of the graphics in https://www.amazon.com/Visual-Complex-Analysis-Tristan-Needh...

While I do see the value in a programmatic diagram tool, I'm not sure I'll use it over something like Inkscape if the visualization is fairly simple.

formalsystem | 4 years ago

I do a lot of LaTeX. With LaTeX there is some attempt to be declarative, to separate layout from context. But I find that while 99% of the time the separation works, there just are times you need to tweak or fiddle.

I currently use a graphics-drawing system that is not very declarative at all (Asymptote). Going to more declarative approach is a very attractive idea, but I couldn't see quite how much tweakability there is in this system. I'd be surprised if you could get away with none at all.

jimhefferon | 4 years ago
qubex | 4 years ago

Somehow from seeing the first few examples I was sure that the project is in Haskell.

And it turned out to be true:

https://github.com/penrose/penrose

forkerenok | 4 years ago

As a non mathematician, I’d like to be able to take bits of math I don’t understand and dump it into something that makes a Penrose representation, maybe helping me understand it better.

Too often even when reading relatively ‘Simple’ CS papers I hit a spot where they’re doing some math shuffling that stumps me. I can skip over and keep going but I’d prefer to know what they did.

audiometry | 4 years ago

The website is really good as well: https://penrose.ink/siggraph20.html. Excellent find. How did you find it?

memexy | 4 years ago

As someone who loves math but always struggled with mathematical notation but can easily absorb code or diagrams this is intensely appealing to me.

VectorLock | 4 years ago

I would like to see a representation of algorithms. I remember watching some videos in the late 90s by a professor who I think worked at UCLA. They involved algebra and differential equations. The terms of the equation would fly around, transform, and disappear as various operations were performed. I remember thinking that the video captured how I did algebraic manipulation, given that I am a highly spatial thinker.

jackcosgrove | 4 years ago

There's a Future of Coding podcast episode where Katherine Ye (one of Penrose's authors) is interviewed.

https://futureofcoding.org/episodes/034

Worth a listen to!

disposedtrolley | 4 years ago

I read through the Penrose presentation slides a few weeks ago and was very impressed with the perspective, idea, and implementation compared to the other dozens of tools I've looked at. I'm not particularly a math specialist, but I do think I'll use Penrose soon. However, it might not immediately fit my needs today.

The presentation made it appear that this was an initial implementation, and that more progress will be needed to fit more use-cases, which is great! Hopefully I can contribute.

itsspring | 4 years ago

I haven't tried it yet but this could be an absolute godsend for people like me - in my head I can "see" a diagram, but I can't draw anything more than a cube.

mhh__ | 4 years ago

I'd love to use this to create some visualizations for CS Education. Data Structures and AI often uses graphs to visualize the concepts. I mostly build them using Powerpoint. Looking at the Penrose website, Fig 24 shows something I think could be tweaked to showcase a graph and something like A* search.

tsumnia | 4 years ago

Seems like a descendant of PIC - "A Graphics Language for Typesetting"

http://doc.cat-v.org/unix/v10/10thEdMan/pic.pdf

mjcohen | 4 years ago

I hope it will be integrated with the Sage Math[1].

[1] https://www.sagemath.org/

xvilka | 4 years ago

Why this? How about something that turns hand drawings into properly rendered diagrams instead?

pishpash | 4 years ago

Can I use this to do some of what Graphviz does?

Because I like Graphviz but the results are never beautiful.

emmelaich | 4 years ago

I can't be the only person who thought this was about tiling!

monadic2 | 4 years ago

Uhhh, pie charts have circles too.

defterGoose | 4 years ago