Examples
Here are the main example program pairs that should work together: (written in this format so they can be copied as arguments)
- One subset relationship:
runpenrose sub/twosets.sub sty/venn.sty set-theory-domain/setTheory.dsl
- Two points, one with computed location:
runpenrose sub/twopoints.sub sty/twopoints.sty set-theory-domain/setTheory.dsl
- Point in set relationship:
runpenrose sub/venn_comp_pt.sub sty/venn_comp_simple.sty set-theory-domain/setTheory.dsl
- Sets with each pair linked:
runpenrose sub/threesets.sub sty/test-local.sty set-theory-domain/setTheory.dsl
Note that there are six arrows: one between each pair of sets.
- Optimized fields and properties: (here the padding and radii are optimized to lie within ranges)
runpenrose sub/threesets.sub sty/test-optimized.sty set-theory-domain/setTheory.dsl
- Subset relationships in Venn diagram style:
runpenrose sub/tree.sub sty/venn.sty set-theory-domain/setTheory.dsl
- Subset relationships in tree diagram style:
runpenrose sub/tree.sub sty/tree.sty set-theory-domain/setTheory.dsl
Without the same-y-coordinate objective, we get a radial layout:
With the same-y-coordinate objective, we get a linear layout: (takes much longer to converge)
- Continuous map in set theory style:
runpenrose sub/continuousmap.sub sty/continuousmap.sty set-theory-domain/setTheory.dsl
The first few samples have trouble converging:
On the fourth or fifth resample, we get a nicely converged diagram:
- Surjection in Cartesian style:
runpenrose sub/cart-test.sub sty/cart-test-pt.sty set-theory-domain/setTheory.dsl
- Surjection in Cartesian style with special point:
runpenrose sub/cart-test-pt.sub sty/cart-test-pt.sty set-theory-domain /setTheory.dsl
- Nicer computed surjection (using
Map
type only):runpenrose sub/surjection_computed.sub sty/surjection_computed.sty set-theory-domain/setTheory.dsl
In general, we want to build up Style libraries that work for domains and are not tied to particular Substance programs. So far we have two examples for set theory.
- Any set theory programs should work with
venn.sty
ortree.sty
.
- Upcoming linear algebra diagrams
- None!
Pending a port using Alloy:
- Surjection in abstract style:
runpenrose sub/surjection.sub sty/surjection-abstract.sty set-theory-domain/setTheory.dsl
- NOTE: Due to optimization parameters, this example might converge prematurely. Drag the geometries around with
Autostep
on to break out of local minima and get better results.
- NOTE: Due to optimization parameters, this example might converge prematurely. Drag the geometries around with
- Bijection in set theory style:
runpenrose sub/bijection.sub sty/bijection.sty set-theory-domain/setTheory.dsl
- Function composition in set theory style:
runpenrose sub/composition.sub sty/composition.sty
(slow to optimize)
- Surjection in set theory style:
runpenrose sub/surjection.sub sty/surjection.sty set-theory-domain/setTheory.dsl
- Injection in set theory style:
runpenrose sub/injection.sub sty/injection.sty set-theory-domain/setTheory.dsl
Pending the addition of Surjection(f)
, Bijection(f)
, Injection(f)
predicates:
- Computed bijection:
runpenrose sub/bijection_computed.sub sty/bijection_computed.sty set-theory-domain/setTheory.dsl
- Computed injection:
runpenrose sub/injection_computed.sub sty/injection_computed.sty set-theory-domain/setTheory.dsl
Found a problem or got a suggestion? Please open a GitHub issue and tag it with documentation
!