Open eadf opened 3 years ago
@eadf have you had a chance to work on a fix for pss()
? In any case, I'd be interested to read your thoughts on it (edges cases you've identified etc.)
@vm-am I made an effort to try to figure out the edge cases, but they just kept popping up.
For example: if trying to delegate a pss()
call to pps()
it gladly finds circle events that are too close to the reduced-to-point-segment.
But I will take a look at it again next week or so
@eadf in your example, are both segments missing the circle? Would you please share the input to pss()
?
I have also been trying to reduce pss()
to pps()
(as well as sss()
to pss()
in some cases) by replacing by a point the segment that is the closest to the circle.
It seems to work okay (so far) but I believe we'd better fix this issue during the construction of the circle rather than after the fact and risk to hit more edge cases. @asydorchuk any thoughts?
@vm-am
in your example, are both segments missing the circle?
In my pss()
test code I sort the two dot products and run pps()
on the segment point with the largest error. But I think I've seen examples of both segments not reaching the CE.
Would you please share the input to
pss()
?
I've got a pss()
example where both segments misses the CE here:
0
3
-5138 -5149 -5038 -5142
-5042 -5069 -5165 -5162
-5011 -5195 -5404 -5134
The code "finds" a circle event at (-4953.51, -5113.77)
with site1
=(-5038,-5142) site2
=(-5011,-5195)(-5404,-5134) site3
=(-5165,-5162)(-5042,-5069)
I believe we'd better fix this issue during the construction of the circle rather than after the fact and risk to hit more edge cases.
☝️ I think replacing pps()
with ppp()
(or any combination thereof) was a bad idea. The information needed to ensure that the CE circle does not intersect the segment is required (the CE circle should only touch the endpoints or tangent the segment)
I've changed my pps()
-> ppp()
PR accordingly.
Implementing a CE function that takes the length of the segment into consideration the correct way using sqrt_expr_evaluator_XXX()
(or something similar) is probably beyond my math skills.
1.76.0 produces this voronoi output:
1
here
pss([-985,-362],[-179,453,-238,248],[673,903,-985,-362])
finds a CE @[-2674.2,1851.9];2
here
pss([519,-635],[519,-635,342,-158],[269,-113,507,-171])
finds a CE @ [788.2,-535.1]3
here
pss([-716,412],[-716,412,999,356],[533,65,597,-23])
finds a CE @ [-784.19,-1676.38]4
in example ”primary_29.txt"
pss([-1,1], [0,1,0,0], [0,0,-1,1])
finds a CE @ [-0.59,1.41]In these examples
pss()
solves for CE solutions where the (infinite line) segments tangents the CE, but the segment falls short of reaching that tangent point.