Spiro Spline weirdness

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
Mar
Posts: 22
Joined: Thu Aug 13, 2009 4:06 am

Spiro Spline weirdness

Postby Mar » Tue Dec 08, 2009 7:54 pm

Hello,
Spiro Splines are great but they show some unconsistency while editing nodes. Please see attached images.

The image 'spiro 1.jpg' shows a regular path using SS. Note the marked node.
Image 'spiro 2.jpg' shows the exact same path but with that one node shifted about three pixels from its previous position. This causes the spline engine to quite literally spin out of control.
Finally, 'spiro 3.jpg' shows the same edited path moved 20px to the left. This causes the spline to warp in another, seemingly random, fashion. No nodes have been moved since "spiro 2".

Is this a limitation of the engine, a floating point bug or something else?
Attachments
spiro 3.jpg
spiro 3.jpg (88.01 KiB) Viewed 1381 times
spiro 2.jpg
spiro 2.jpg (92.67 KiB) Viewed 1381 times
spiro 1.jpg
spiro 1.jpg (82.65 KiB) Viewed 1381 times

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Spiro Spline weirdness

Postby sas » Tue Dec 08, 2009 8:52 pm

This is a known problem with spiro splines. The basic problem is that the function mapping node positions to curves is not continuous. Near a discontinuity the whole thing tends to go wild (probably in part due to magnification of rounding errors).

A common case is where A, B and C are consecutive nodes, in that order, but A is positioned between B and C. In this case, after the curve goes through A and B, it has to turn back to C, and it could do this either by curving round to the left, or by curving round to the right. If you move the nodes about a bit, it will flip between these two states, and for some intermediate positions it will get so confused that it generates the sort of mess that you have seen.


Return to “Discuss Software Issues”