Minkowski Sum bug? #417
Replies: 5 comments 1 reply
-
Yep, it looks like a bug. I'll investigate. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
In the original case that I submitted to you the problem is probably generated by the fact that the pentagon at the beginning and the one at the end of the path intersect |
Beta Was this translation helpful? Give feedback.
-
And it is ...
and what it looks like but without the union operation in Clipper.Minkowski.cs (ln 71) so you can better see what's happening:
And again, but this time with the pentagon rotated ...
|
Beta Was this translation helpful? Give feedback.
-
Hi Angus, I also asked this forum https://math.stackexchange.com/questions/4741496/is-this-minkowski-sum-result-correct for opinions regarding the result I get, and the most voted and frequent answer is that I gave an input polygon that is not closed. Of course I checked to close it. What do you think about this closed/open topic? Another thing that makes me think that the result is obviously wrong is that the Minkowski sum of two convex polygons must be convex (see https://math.stackexchange.com/questions/2410875/the-minkowski-sum-of-two-convex-sets-is-convex ), while the result of the figure is clearly not convex. Taking a closer look at your code, it seems to me that the Minkowski base method does its job well. In my opinion, the error could be more in the merge operation you do afterwards. |
Beta Was this translation helpful? Give feedback.
-
Hi,
![image](https://user-images.githubusercontent.com/83703490/218967760-a8200e19-8caf-4070-97eb-6d2350a0e930.png)
I'm trying to do the Minkowski Sum between a pentagon and a small linear segment.
Below is the C# code I'm using.
`
double r = 5;
The result I get does not satisfy me because I expected to obtain a convex polygon with 5 vertices and I don't understand if there is some enum to change inside the MinkowskiSum parameter or if it is a bug
Beta Was this translation helpful? Give feedback.
All reactions