Message Boards Message Boards

0
|
5774 Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

[?] Place a point out of a region using GeometricScene?

Posted 5 years ago

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?

5 Replies

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]

enter image description here

gs = GeometricScene[{"B", "X", "Y", "Z"},
   {t = Triangle[{"X", "Y", "Z"}],
     "B" \[NotElement] t}
   ];
RandomInstance[gs]

enter image description here

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]

enter image description here

POSTED BY: Kotaro Okazaki

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.

POSTED BY: Daniel McDonald

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?

Thank you.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract