Answer the question
In order to leave comments, you need to log in
What is the optimal algorithm for finding the Minkowski sum?
Greetings!
In general, subject. You need to find a lot and often. Now the built-in ClippingLib is used, but already for 300 points it counts about 4 seconds - a very long time.
What is given: Polygons are non-self-intersecting, convex and non-convex.
In addition to the algorithm in the English Wikipedia, I also found a description of this:
Find the center of mass of each, shift each so that the center of mass is at the origin (let the shift vectors A1 and A2), draw rays from the origin to the vertices of each polygon. We find the intersection points of these rays and polygons, vectorially add all pairs of points on all rays to find the vertices of the desired polygon, shift the resulting polygon by the vector (-A1, -A2). Everything.
How accurate is this algorithm? Will it be faster than the "classic" one? Maybe there is an even better one?
Answer the question
In order to leave comments, you need to log in
The algorithm is unclear. Here are two convex polygons reduced to the origin - how to resolve the "points of intersection of these rays and polygons"?
There is a feeling that it is possible to give birth to non-singly connected areas - and what to do with this smut?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question