Skip to content
/ penrose Public
forked from penrose/penrose

a system to automatically visualize mathematics

License

Notifications You must be signed in to change notification settings

wodeni/penrose

 
 

Repository files navigation

Penrose Build Status

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

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.

Example

Here a 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.

About

a system to automatically visualize mathematics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 51.2%
  • Haskell 43.9%
  • TeX 3.5%
  • Java 0.7%
  • Shell 0.4%
  • HTML 0.3%