Update set penrose

This commit is contained in:
Folkert Kevelam 2025-08-31 21:20:54 +02:00
parent 5c0dbcd494
commit 0042f1fca0
2 changed files with 13 additions and 24 deletions

View File

@ -2,4 +2,3 @@ type Set
predicate SubSet(Set s1, Set s2) predicate SubSet(Set s1, Set s2)
predicate Disjoint(Set s1, Set s2) predicate Disjoint(Set s1, Set s2)
predicate Union(Set s1, Set s2)

View File

@ -3,29 +3,8 @@ canvas {
height = 500 height = 500
} }
forall Set A; Set B
where SubSet(A, B) {
ensure disjoint(B.text, A.icon, 10.0)
ensure contains(A.icon, B.icon, 5.0)
layer A.icon above B.icon
}
forall Set A; Set B
where Disjoint(A, B) {
ensure disjoint(A.icon, B.icon)
}
forall Set A; Set B
where Union(A,B) {
ensure overlapping(A.icon, B.icon)
ensure disjoint(A.text, B.icon)
ensure disjoint(B.text, A.icon)
}
forall Set x { forall Set x {
shape x.icon = Circle { shape x.icon = Circle {}
strokeWidth : 0.0
}
shape x.text = Equation { shape x.text = Equation {
string : x.label string : x.label
fontSize : "32px" fontSize : "32px"
@ -33,5 +12,16 @@ forall Set x {
ensure contains(x.icon, x.text) ensure contains(x.icon, x.text)
encourage norm(x.text.center - x.icon.center) == 0 encourage norm(x.text.center - x.icon.center) == 0
layer x.text above x.icon layer x.text above x.icon
ensure x.icon.r > 25.0 }
forall Set x; Set y
where SubSet(x, y) {
ensure disjoint(y.text, x.icon, 10.0)
ensure contains(y.icon, x.icon, 5.0)
layer x.icon above y.icon
}
forall Set x; Set y
where Disjoint(x, y) {
ensure disjoint(x.icon, y.icon)
} }