Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Penrose: Create diagrams by typing mathematical notation in plain text (github.com/penrose)
184 points by polm23 on May 10, 2020 | hide | past | favorite | 30 comments


When I first saw the title, I thought it had something to do with this: https://en.wikipedia.org/wiki/Penrose_graphical_notation.

Looks cool, though.


Penrose is a neat name for this. At first I thought it was not a great choice because of other associated concepts. Then I noticed pen=write, rose=draw. Maybe not intentional, but cute.


It's going to get very confusing for people googling 'penrose diagrams' though.


Yes indeed! Does anyone know of software for creating Penrose diagrams?


roger penrose is a famous mathematician, who did a lot of work in mathematical physics. he is also famous for a highly visual approach, such as penrose tiles.


Here's an example of penrose tiles:

https://dglittle.github.io/cdn/penrose002.html

It's an infinite plane of tiles, procedurally generated, that never repeats no matter how far you go.


Just to close the loop here, Penrose is also famous (to his readers, anyway) for his beautiful hand-drawn diagrams and illustrations. So it’s a terrific name for this project.


And has five-fold symmetry, which is impossible for wallpaper groups.

The discovery of Penrose tilings is partially tangled up with the discovery of quasicrystals, where researchers found minerals with 5-fold and 10-fold symmetry that ought to have been mathematically impossible to exist. Turns out that the Crystallographic Restriction Theorem has an important caveat that people neglected up until the 1980s: it assumes that you have to have translational symmetry, which Penrose tilings do not.


How are rose and draw related? Is it that people sometimes draw pictures of roses?


In my mind, it was obvious that I was thinking of this: https://mathworld.wolfram.com/Rose.html. Clearly I should have mentioned that. It's the type of shape drawn by a spirograph, a pen-rose.


penrose is the name of a famous mathematician/logician, so it's a double entendre on both it being for drawing (the pen and the rose), as well as it being for maths.


I thought it was going to be tilings in the plane but the example is some set properties which produces a venn diagram.

The notation feels c like.

Maybe it could be interesting for knots and complicated algebraic geometry?


Discussion from a couple of years ago: https://news.ycombinator.com/item?id=18178230

It's not based just on text code, but on interactive manipulation as well, so it's not like e.g. TikZ which can be kept in the document source and version controlled, etc.


This is true but only at present.

An analogy would be the weights of pretrained machine learning models. They're still serializable, though it's true they're less semantically trackable than a well-written TikZ snippet (which, by the way, I haven't seen many of in practice!)


Related: Constraint-based Graphic Design [ https://www.anishathalye.com/2019/12/12/constraint-based-gra... ]

"Designers write programs that produce figures described in terms of relationships. These relationships are compiled down to constraints, which are then solved automatically."

Discussed here: https://news.ycombinator.com/item?id=21774018


It is an interesting approach to drawing - it’s almost like what you do is, you make the tool understand the meaning of what you want to draw, and the tool is expected to do an optimal job at getting it done.


Look at graphviz for the best tool you can find about


For more on declarative drawing, you might be interested in wrapping your mind around Eukleides: https://ctan.org/tex-archive/support/eukleides .


What you describe sounds very similar to the definition of a "domain specific language".


Nice job, I've been looking for a tool like this for a while.


oooh, it's written is Haskell.


As always, completely lacks examples.

Will we never learn??



To be fair, a project like this should be encrusted with picture examples on its "front page"-- like D3.js.

The thing makes graphs for Christ's sake.

Your github link is just a dump of source code. One would have to go through a lot of steps to actually see what they even render.


Check out the wiki: https://github.com/penrose/penrose/wiki

It has rendered examples for all types of graphs.


That's nice.

It looks like a cool project and they say it's still in early stages. It's a pity they don't put pictures on the splash page. Pictures communicate better than anything else what the capabilities of the tool are.


I think a README.md with the render in each directory would be useful or maybe one README.md in the examples dir that refers to each example with a bit of context of why it might be something to do/use would suffice?


I can't find a hello world diagram so I'm not interested.


What's wrong with the example given in the readme? Too complicated?


I was too lazy to scroll down to see it. Cognitive load increased to the level of buffer overflow before seeing the example :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: