3
$\begingroup$

I'm trying to create the following geometric scene:

G = RandomInstance[GeometricScene[{a,b,c,d,m,n,p,q,α,β,γ,δ}, { 
   Polygon[{a,b,c,d}],
   m==Midpoint[{a,b}],      
   n==Midpoint[{b,c}],      
   p==Midpoint[{d,c}],          
   q==Midpoint[{a,d}],
   {Line[{a,α,β,n}],Line[{m,α,δ,d}]},      
   {Line[{a,α,β,n}],Line[{b,β,γ,p}]},
   {Line[{c,γ,δ,q}],Line[{b,β,γ,p}]},      
   {Line[{d,δ,α,m}],Line[{c,γ,δ,q}]},
   Polygon[{α,β,γ,δ}],
   Polygon[{c,γ,p}],
   Polygon[{d,δ,q}],       
   Polygon[{a,α,m}],      
   Polygon[{b,β,n}]
  }
]]

But for some reason, when I add these polygons in the end:

Polygon[{α, β, γ, δ}],
Polygon[{c, γ, p}],
Polygon[{d, δ, q}],       
Polygon[{a, α, m}],      
Polygon[{b, β, n}]

It won't work. Is there a reason for this?

$\endgroup$
2
  • $\begingroup$ For me, G produces 10 points belonging to the same line ( a degenerate case ). $\endgroup$
    – user64494
    Commented 22 hours ago
  • $\begingroup$ @user64494 Sometimes it behaves like that. I don't know why, $\endgroup$
    – Red Banana
    Commented 17 hours ago

1 Answer 1

6
$\begingroup$
  • Since Polygon not always be a Convex Polygon. We add GeometricAssertion[Polygon[......], "Convex"]
G = RandomInstance[
  GeometricScene[{a, b, c, d, m, n, p, 
    q, α, β, γ, δ}, {Polygon[{a, b, c, d}],
     m == Midpoint[{a, b}], n == Midpoint[{b, c}], 
    p == Midpoint[{d, c}], 
    q == Midpoint[{a, d}], {Line[{a, α, β, n}], 
     Line[{m, α, δ, d}]}, {Line[{a, α, β, 
       n}], Line[{b, β, γ, 
       p}]}, {Line[{c, γ, δ, q}], 
     Line[{b, β, γ, p}]}, {Line[{d, δ, α, 
       m}], Line[{c, γ, δ, q}]}, 
    GeometricAssertion[
     Polygon[{α, β, γ, δ}], "Convex"], 
    GeometricAssertion[Polygon[{c, γ, p}], "Convex"], 
    GeometricAssertion[Polygon[{d, δ, q}], "Convex"], 
    GeometricAssertion[Polygon[{a, α, m}], "Convex"], 
    GeometricAssertion[Polygon[{b, β, n}], "Convex"]}]]

enter image description here

$\endgroup$
2
  • $\begingroup$ Yes! This was also something I was trying to learn, the original figure I wanted was a quadrilateral, this willl solve all my problems. $\endgroup$
    – Red Banana
    Commented 5 hours ago
  • $\begingroup$ It's enough GeometricAssertion[Polygon[a, b, c, d}], "Convex"] instead of 5 assertions $\endgroup$
    – user64494
    Commented 16 mins ago

Not the answer you're looking for? Browse other questions tagged or ask your own question.