0
$\begingroup$

enter image description here

Is this Minkowski Sum result correct?

enter image description here

I expected a filled shape as it happens when the two polygons don't overlap (longer translation vector).

Full discussion here: https://github.com/AngusJohnson/Clipper2/discussions/417

EDIT: Result of the same data with a longer vector:

enter image description here

$\endgroup$
6
  • $\begingroup$ Could it be that what you see is not what it does internally? For example, what if the original "pentagon" is actually just a set of five points, the original "line" is actually just a set of two points, and then Minkowski sum will consist of $10$ points. And what if Clipper (or whatever that software is called) is trying to display the quintuplet of points as an actual pentagon, the pair of points as a line and a $10$-tuplet of points - as a decagon (which, as it happens, has intersections so it looks like a hendecagon when filled in)? $\endgroup$
    – user700480
    Commented Jul 24, 2023 at 9:09
  • $\begingroup$ In other words, maybe it works internally but the display of the results is not great? $\endgroup$
    – user700480
    Commented Jul 24, 2023 at 9:09
  • $\begingroup$ What I am trying to understand is if the second figure is actually the Minkowski Sum of the first figure along the horizontal vector. It looks weird to me and it changes completely when the two pentagons don't overlap anymore. $\endgroup$
    – abenci
    Commented Jul 24, 2023 at 14:30
  • $\begingroup$ I understand where you are coming from but ... what if the first set is just five points and the second set is just two points and the resulting set is just ten points and the entire problem is in the fact that the software displays the first set as a pentagon, the second set as a line and the third as ... well ... that hendecagony thingy? If the first set is actually meant to be a pentagon and you have correctly passed that knowledge to the software, then it is a bug. If it is just a quintuple of points, then the defect is all in the presentation! $\endgroup$
    – user700480
    Commented Jul 24, 2023 at 16:37
  • $\begingroup$ What you get is the Minkowski sum of the border of a non-closed regular pentagon and the horizontal line segment (you haven't specified to your software that the polygon was closed : you have given it vertices $ABCDE$ instead of $ABCDEA$... $\endgroup$
    – Jean Marie
    Commented Jul 24, 2023 at 17:38

1 Answer 1

2
$\begingroup$

What you get is the Minkowski sum of the border of a non-closed regular pentagon and a horizontal line segment (you haven't specified to your software that the polygon was closed : you have given it vertices ABCDE instead of ABCDEA).

The longer the horizontal segment, the larger the "crab's claws" aspect : when the horizontal line segment reaches a certain length (here above $L\approx 1.2$ : see Fig. 2), the "crab claws" overlap, eventualy filling the space between them when $L$ is large enough (Fig. 3).

Instead of generating "flat" surfaces, I have generated it by plotting many instances of sums of a point in the first shape and a point in the second shape.

enter image description here

Fig. 1 : Case of a segment with length $L=0.2$.

enter image description here

Fig. 2 : Case of a segment with length $L=1.2$.

enter image description here

Fig. 3 : Case of a segment with length $L=2.2$.

Matlab program having generated these figures :

e=exp(i*2*pi/5); % powers of e represent pentagon vertices
L=0.2;
for n=1:10000 
   % random element on the line segment :
   s=L*rand; 
   % random element on the (non-closed) pentagon :
   k=floor(4*rand);r=rand;
   p=(e^(-3/4))*(r*e^k+(1-r)*e^(k+1));
   M(n)=p+s; % n-th point in Minkowski sum
end;
plot(M,'.b');hold on;
plot((e^(-3/4))*e.^(0:4),'k','linewidth',8);
plot([0,V],[0,0],'k','linewidth',8);axis equal;axis off
$\endgroup$
1
  • $\begingroup$ Any comment ? ... $\endgroup$
    – Jean Marie
    Commented Jul 26, 2023 at 7:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .