penrose

Create beautiful diagrams just by typing mathematical notation in plain text.

Github stars Tracking Chart

Penrose CircleCI

Penrose is an early-stage system that is still in development. Our system is not ready for contributions or public use yet, but hopefully will be soon. Send us an email if you're interested in collaborating.

  • See the site for more information and examples.
  • See the wiki for more system-specific information on building, running, testing, and debugging the system.
  • For even more documentation, see Nimo Ni's README.

Example

Here's a simple Penrose visualization in the domain of set theory.

It's specified by the following Substance and Style programs.

  • tree.sub
    Set A
    Set B
    Set C
    Set D
    Set E
    Set F
    Set G
    Subset B A
    Subset C A 
    Subset D B
    Subset E B
    Subset F C
    Subset G C
    NoIntersect E D
    NoIntersect F G
    NoIntersect B C
    
  • venn.sty
    Set x {
        shape = Circle { }
        constraint contains(x, x.label)
    }
    
    Intersect x y {
        constraint overlapping(x, y)
        constraint outsideOf(y.label, x)
        constraint outsideOf(x.label, y)
    }
    
    NoIntersect x y {
        constraint nonOverlapping(x, y)
    }
    
    Subset x y {
        constraint contains(y, x)
        constraint smallerThan(x, y)
        constraint outsideOf(y.label, x)
    }
    
    NoSubset x y {
        objective repel(x, y)
        constraint outsideOf(x, y)
        constraint outsideOf(y.label, x)
        constraint outsideOf(x.label, y)
        constraint nonOverlapping(x, y)
    }
    

Here's how the optimization looks live in the UI.

Main metrics

Overview
Name With Ownerpenrose/penrose
Primary LanguageTypeScript
Program languageHTML (Language Count: 12)
Platform
License:MIT License
所有者活动
Created At2016-09-22 04:47:19
Pushed At2025-09-30 13:55:28
Last Commit At
Release Count22
Last Release Namev3.3.0 (Posted on )
First Release Namev0.1 (Posted on 2019-03-12 14:43:20)
用户参与
Stargazers Count7.8k
Watchers Count116
Fork Count356
Commits Count2.8k
Has Issues Enabled
Issues Count767
Issue Open Count167
Pull Requests Count994
Pull Requests Open Count12
Pull Requests Close Count121
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private