7 ms·
Penrose: create diagrams by typing mathematical notation in plain text
- andrepd 8y agoWOW! This is an amazing idea and an amazing implementation. Reading the intro paper [1] and checking the example [2] made me eager to try this. If this can indeed be successfully worked into a tool for the "laymen" (in computers and drawing, that is, not in the domains in question) what an great tool it will be! [1] http://penrose.ink/PenroseIntro2018.pdf http://penrose.ink/PenroseIntro2018.pdf [2] https://github.com/penrose/penrose https://github.com/penrose/penrose
- stevekrouse 8y agoI'm so inspired by this vision. I'm excited to interview creator Katherine Ye [1] on my podcast [2] later this month! [1] https://www.cs.cmu.edu/~kqy/ https://www.cs.cmu.edu/~kqy/ [2] https://futureofcoding.org https://futureofcoding.org
- platz 8y ago> the PENROSE pipeline is designed to be end-to-end differentiable
- equalunique 8y agoGreat Haskell project!
- yosefzeev 8y agoIt looks neat, although the installer side of it looks to still be messy enough to warrant my waiting a bit before installing it in linux.
- gerdesj 8y agoYes it is a bit of a palava to get running but you can get it running straight out of eg ~/src/ with $ git clone https://https://github.com/penrose/penrose.git https://https://github.com/penrose/penrose.git. Follow https://github.com/penrose/penrose/wiki/Building-and-running https://github.com/penrose/penrose/wiki/Building-and-running I use Arch Linux but I'm sure no one will hold that against me (package names like this): You will need a JDK (I installed jdk8-openjdk) to get a javac (needed when you run make in src). You may also need ghc for Haskell although the thing seems to install another one locally. I installed stack and then happy and then "stack build" finished OK. alias runpenrose=</very/long/path/in/home/bin/penrose>. Substitute "python -m http.server" for "python -m SimpleHTTPServer" because Python3 and the rest of the example works OK. Simples 8)
- kragen 8y agoHas anybody tried both Penrose and TikZ? How do they compare?
- abdullahkhalids 8y agoI have used a lot of TikZ. Its great but obviously has not the best syntax - a problem inherited from latex. Penrose seems to have a clean simple syntax, and I would definitely try it once its more mature.
- dan-robertson 8y agoPersonally I find the tikz syntax to be reasonably good. It’s slightly weird in places but I think it’s much nicer than eg svg
- mkl 8y agoPenrose currently seems to be a very limited work in progress. Such comparison will have to wait. However, in the few Penrose examples shown, all the positioning seems to be done completely automatically, which is incredibly difficult to make work in all but the simplest and most standardised situations. In TikZ most positioning is manual, which takes more effort, but which I think is likely to produce better results in general.
- JAldrichCMU 8y agoYes, automatic positioning is the goal, and one of the key differences vs. TikZ (the other being a separation of substance--the math--from style--the graphical representation). It's difficult, which is why there is real graphics research in the project. Penrose enables the user to tweak the diagram manually after it is produced. Constraint solving continues to apply during the tweaking so that if you grab a shape, then things attached to it will move as well. Our goal is to get end results as good as, or better than, TikZ, while staying at a higher level of abstraction.
- mkl 8y ago
- Koshkin 8y agoNeat; now I am left wondering if this could be also implemented as applying a sty.xsl to a sub.xml in order to get an SVG.
- dan-robertson 8y agoWell xsl does not include interactivity, and it’s functions are not much fun. So I’m not really sure anyone of sound mind would want to implement a nonlinear constraint optimiser in xslt.
- andrewflnr 8y agoYou can use XSL to generate code to which javascript is later attached. I did that a couple times when I was young and foolish. Also, SVG supports JS natively, I believe. That's not to say I would recommend it. No objection to your other points.
- brian_herman__ 8y agoWhy use this instead of latex?
- kidsnow 8y agoSome people are allergic to LaTeX
- MrEldritch 8y agoLaTeX is for typesetting and notation, which it's quite good at. On the other hand, designing, laying out, and constructing pretty diagrams in LaTeX is very much NOT where LaTeX shines.
- mkl 8y agoTikZ is good for pretty diagrams, and is entirely contained within (built with) LaTeX.
- alanbernstein 8y agoTikZ creates pretty diagrams. I've had partial success using it, with my beginner-level LaTeX knowledge. I'm not convinced that it's possible to become comfortable with TikZ syntax, without hundreds of hours of LaTeX experience. I'd love to be proven wrong, of course.
- mkl 8y agoMost TikZ syntax is actually pretty different from normal LaTeX syntax (and most other graphics syntax!). It's got a bunch of syntactic features I've never seen anywhere else. If you want to be proficient in TikZ, I think the best way is to read the manual. I put it on my phone and started at the start. It's general understanding of how 2D graphics systems tend to work and learning how TikZ does things that made me comfortable.
- alanbernstein 8y ago
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- georgeam 8y agoIt would also be helpful to see a comparison to tools like asymptote: https://en.wikipedia.org/wiki/Asymptote_(vector_graphics_language) https://en.wikipedia.org/wiki/Asymptote_(vector_graphics_lan...
- alanbernstein 8y agoThis looks like a very useful tool, and I'm just learning about it now. Do you have experience with it? Would you recommend it?
- JAldrichCMU 8y agoWith Asymptote you specify diagrams directly in terms of low-level graphics primitives and constraints. With Penrose you specify the underlying math, then one or more separate style files are used to automatically generate diagrams based on the math. The typical user of Penrose doesn't have to know anything about graphics, and never specifies any graphical objects; instead, that knowledge is in reusable style files written by domain experts.
- amelius 8y agoUpon quick glance, it seems limited to diagrams in the field of linear algebra and perhaps a few related fields. Is this correct? How broadly is it applicable? (I'm still hoping for a tool that can make flowcharts with user-defined constraints, such as minimize number of edge crossings, then minimize total edge lengths, etc.)
- tobmlt 8y agoMight depend on what they've implemented so far. The simplex in figure 2 from the paper looks a lot like some of the simplex plots seen in Keenan Crane's work here: https://www.cs.cmu.edu/~kmcrane/ https://www.cs.cmu.edu/~kmcrane/ And the authors have at least that connection to the ``Carnegie Mellon Geometry Collective,'' (see their prior work on his page) so I'd include discrete differential geometry in your list. This has connections (eh hem) all over... Edit: For some reason I missed the Penrose site at the link and skipped straight to the PDF short introduction. I am presenting somewhat redundant information above. Sorry!
- JAldrichCMU 8y agoOur goal is that you can define domain-specific Style files--analogous to a .sty in LaTeX--that apply to whatever field of mathematics you want. We have prototyped this but there are still too many rough edges to recommend to outside users at this point. Flowcharts are not on our initial list of domains, but we hope that the infrastructure will let any user add a Style extension to support them.
- andrepd 8y agoFrom their paper, it seems you can write a 'style' file for anything you can possibly want. Users then write the declarative code you see which Penrose interprets with respect to that 'style' file to know what to actually do.
- philsnow 8y agothis is the exciting part to me; is there any constraint that the output has to be a 2-dimensional figure? I could imagine a style file that outputs a blender scene with a time dimension, or a VR scene that you can interact with in the same way they describe dragging one of the vector heads and having it recalculate the rest of the model.
- buckminster 8y agoIt's a bit weird to name a project after a living person without mentioning them or the motivation for the name.
- Y_Y 8y agoProbably a reference to Penrose Diagrams which this looks like it would be good at, or possibly Penrose Graphical Notation. Both creations of Roger Penrose.
- eastWestMath 8y agoNah you want to use something like Tikzit for string diagrams.
- escherplex 8y agoI was curious about that as well. With the project name Penrose there was a suspicion (more like a wish) that maybe this was to be prototype work for an interactive digital rendering of the Roger Penrose Road to Reality physics tome but a quick poke-around of project members bios turned up no personal linkage to Penrose. Just happened to listen to Penrose at Princeton when he promoting that book about 15 years ago.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- torbjorn 8y agoCool! Kinda like d3 but without javascript.