Closed jbphet closed 3 years ago
Looks like a bug for sure, presumably with the degeneracy detection.
Reproducing Shape turns into 4 line segments:
window.shape = new kite.Shape().moveTo(
553.2, 309
).cubicCurveTo(
538.2, 271.5,
568.2, 271.5,
553.2, 309
);
I believe the above commit should remove the need for the workaround. Can you verify?
Yep, I was able to remove the workaround code and the shape looks find now.
@jonathanolson - I think you can probably close this, but I wasn't sure if there was anything else that you wanted to verify. I looked at the commit, and it roughly makes sense to me, but I don't have enough expertise in collinear cubic degeneracy to be able to truly evaluate it.
Sounds good, closing!
In the number-line-operation sim, I needed a shape where a loop started and ended at the same point on a number line. The idea was to represent an operation with a value of zero. Here's a picture:
I was able to get this to work using
cubicCurveToPoint
, but I needed to add a small "tweak factor" so that the start and end points weren't exactly the same. Otherwise, the shape looked wrong. Here's a screenshot:Is this a bug? It seems like it to me, but maybe there is some mathematical reason why a cubic curve can't start and end in the same place.
I've added a TODO item in the code where this shape is created, please see
NumberLineOperationNode
, line 508 as of this writing.