
CMU’s ‘Penrose’ Turns Complex Math Notations into Illustrative Diagrams - Yuqing7
https://syncedreview.com/2020/06/05/cmus-penrose-turns-complex-math-notations-into-illustrative-diagrams/
======
ColanR
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.

~~~
andrepd
All the examples are just "sets represented as circles". Quite basic.

~~~
reikonomusha
Maybe the end representation is quite basic but I still think it’s a feat of
programming to take a bunch of constraints and turn it into a representation
that dynamically satisfies those constraints.

~~~
alexeldeib
I think the criticism is more that the examples only show a very simple case.
What you described is indeed very cool, if only rich examples showed it off
better.

------
mikhailfranco
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](https://www.fiftythree.com/think)

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

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

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

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

------
enricozb
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](https://vimeo.com/416822487)

------
benrbray
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...](https://www.anishathalye.com/2019/12/12/constraint-based-graphic-
design/#case-studies) [2]:
[http://www.cs.cmu.edu/~kmcrane/](http://www.cs.cmu.edu/~kmcrane/)

~~~
obviyus
I thought I’ve heard that name before. Anish is also one of the teachers of
Missing Semester of CS [1]. One of the best courses I have taken as a college
student!

[1]: [https://missing.csail.mit.edu/](https://missing.csail.mit.edu/)

------
formalsystem
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...](https://www.amazon.com/Visual-Complex-Analysis-Tristan-
Needham/dp/0198534469)

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.

------
jimhefferon
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.

~~~
openfuture
Take a look: [https://vimeo.com/416822487](https://vimeo.com/416822487)

They have an IDE that allows you to fiddle with all the stages in the
pipeline, including the imperative stuff.

------
qubex
Previously discussed:
[https://news.ycombinator.com/item?id=18178230](https://news.ycombinator.com/item?id=18178230)

~~~
detaro
and 3 days ago:
[https://news.ycombinator.com/item?id=23387687](https://news.ycombinator.com/item?id=23387687)

------
forkerenok
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](https://github.com/penrose/penrose)

------
audiometry
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.

------
memexy
The website is really good as well:
[https://penrose.ink/siggraph20.html](https://penrose.ink/siggraph20.html).
Excellent find. How did you find it?

~~~
heavenlyblue
That is one of an amazing mobile-ready websites.

~~~
cmroanirgo
I assume this is a joke comment? The font is too small, huge white borders,
scrolling elements with the page. I'd suggest this an average layout at best,
& certainly nothing to croon over.

The content is good tho.

~~~
heavenlyblue
I am on iPhone 11 Max and it’s absolutely amazing. Nothing is too small or too
big - just the right size.

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

~~~
snapetom
I agree. I'm going to check this out.

I went back to school 10+ years ago after many years in software engineering.
I naively thought it would be a good idea to keep notes in LaTeX because 1) I
have a hard time reading my own handwriting. 2) Source controlled 3) Math
notation!

Wow, what a special circle of Hell LateX has been.

~~~
Koshkin
Indeed, I find it more satisfying to read my own handwritten notes from years
ago than a printout I spent more time typesetting than thinking about the
content.

------
jackcosgrove
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.

~~~
augustt
I saw this thing on r/math that might interest you:
[https://www.reddit.com/r/math/comments/fnjav6/i_created_an_a...](https://www.reddit.com/r/math/comments/fnjav6/i_created_an_app_for_practicing_algebra_with/)

~~~
tgv
That's pretty neat. I'll have to try it.

The thread mentioned an alternative,
[https://graspablemath.com/](https://graspablemath.com/), which looks similar
(note: only judging from the video), which you can immediately try in the
browser, but that felt a bit clumsy to me. YMMV.

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

[https://futureofcoding.org/episodes/034](https://futureofcoding.org/episodes/034)

Worth a listen to!

------
itsspring
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.

------
mhh__
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.

------
jarmitage
Direct link:
[https://penrose.ink/siggraph20.html](https://penrose.ink/siggraph20.html)

------
tsumnia
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.

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

[http://doc.cat-v.org/unix/v10/10thEdMan/pic.pdf](http://doc.cat-v.org/unix/v10/10thEdMan/pic.pdf)

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

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

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

~~~
monadic2
Seems like completely different use cases!

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

Because I like Graphviz but the results are never beautiful.

~~~
emmelaich
To answer myself -- there is an open issue and pull request for graph layout.

[https://github.com/penrose/penrose/pull/332](https://github.com/penrose/penrose/pull/332)

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

------
defterGoose
Uhhh, pie charts have circles too.

