3 ms·
Is GJK a suitable algorithm for preventing collisions of 2D text being randomly placed in a canvas at random angles? I’m assuming the bounding boxes of the tex
by uptown 5y ago
Is GJK a suitable algorithm for preventing collisions of 2D text being randomly placed in a canvas at random angles?
I’m assuming the bounding boxes of the text would provide the vertices.
Is there anything better?
- plafl 5y agoYou can use GJK for 2D also. You don't need to compute the bounding boxes as GJK will automatically "convexify" the body although if you "precompute" the bounding boxes it will be better. You just need to compute the support function in an arbitrary direction. If you want to use bounding boxes then you can do it faster using the separating axis theorem.