constrain in a custom shape?
in
Programming Questions
•
3 years ago
Hi all,
I understand how to constrain a balls movements within a box by testing its x,y according to some stored bounds. And I understand how to fill a circular area with graphics using trigonometry.
But is it possible, or how do you approach constraining within a "custom" shape? for example a pentagon or a letterform? Seems like it might involve some serious maths. How difficult is it to extend such a technique to a 3D shape?
Thanks in advance.
1