In a GeometricScene, I want a point to be out of a region. Say a triangle and a point B out of it. How can I do it?
Vasileios, I hope this might help.
[Element] works well. However, [NotElement] doesn’t work. I will expect for WL to support it.
gs = GeometricScene[{"B", "X", "Y", "Z"},
{t = Triangle[{"X", "Y", "Z"}],
"B" \[Element] t}
];
RandomInstance[gs]
gs = GeometricScene[{"B", "X", "Y", "Z"},
{t = Triangle[{"X", "Y", "Z"}],
"B" \[NotElement] t}
];
RandomInstance[gs]
![]()
But there is the following ugly way.
gs = GeometricScene[{"B", "X", "Y", "Z"},
{p = Polygon[{"B", "X", "Y", "Z"}],
GeometricAssertion[p, "Convex"],
Triangle[{"X", "Y", "Z"}]}
];
RandomInstance[gs]
Thanks. I think The ugly way is the only way
In fact, inspired by your Publish “computable famous theorems of geometry”, I was trying to construct a right triangle and three squares with sides at triangle sides, trying the Pythagorean theorem. Any ideas?
This should work for specifying that a point is not in a polygon, for instance:
gs = GeometricScene[{"B", "X", "Y", "Z"}, {
t == Triangle[{"X", "Y", "Z"}],
SignedRegionDistance[t, "B"] > 0
}];
RandomInstance[gs]
As for the Pythagorean theorem, see here.
Thank you.

