why simply moving spiro spline causes it to change shape?

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

why simply moving spiro spline causes it to change shape?

Postby brynn » Fri Dec 24, 2010 9:16 pm

Hi Friends,
I've found a new...."what do you see in the clouds" toy -- spiro splines, lol! On paper, I've done this with watercolors, just laying out colors and shapes, and then later looking to see "what's there", then enhancing it with colored pencils. And more recently I've done this with fractals. Ah, but now spiro splines :mrgreen:

Basically, I'm using the Pencil tool, in Spiro mode, triangle in, smoothing 100. Then I draw a rough spiral, or scribble, switch to the Node tool, and move a node around until I get an interesting shape. Some examples I recently posted in Finished Work forum:
viewtopic.php?f=8&t=7029
viewtopic.php?f=8&t=7026
(Yeah, I'm not an artist, just having fun :mrgreen: )

Actually I'm not using the LPE at the moment, so maybe they're not technically spiro splines. But anyway I know that just moving a node will cause the entire thing to change shape, because Inkscape tries to maintain the same smoothness...or something like that. And that's what makes it such an awesome tool for abstraction!

But several times now, I've found a nice interesting shape, and I want to move it over, and start a new one. But it seems that even just moving it over causes it to be redrawn. Sometimes drastically redrawn, just like moving a node! Why is that? Because I'm just using the Selection tool, and click-drag. ALL the nodes move, so there should be no change. At least that seems reasonable to me. I guess in this case, I could use Object to Path, and THEN move it. But that ends the fun abstract part for that particular spline.

Is this a bug? Or else can someone explain why moving it triggers the redraw?
Thanks for your help :D

Edit -- Cut/Paste does the same thing!

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: why simply moving spiro spline causes it to change shape

Postby ~suv » Fri Dec 24, 2010 11:00 pm

Could you attach a sample SVG file with a 'Spiro' path, that changes its shape when you simply move it around with the select tool (not (un-proportionally) scaling, stretching or skewing it)?

brynn wrote:Actually I'm not using the LPE at the moment, so maybe they're not technically spiro splines. But anyway I know that just moving a node will cause the entire thing to change shape, because Inkscape tries to maintain the same smoothness...or something like that.
?
You can't draw 'Spiro' paths without the path effect (LPE) - please check on the status bar: if a path has a path effect applied, it is mentioned there.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: why simply moving spiro spline causes it to change shape

Postby brynn » Sat Dec 25, 2010 2:26 pm

Any of the paths in the file below behave the same way. Note that you sometimes can't see the change until you release the mouse button. Other times, it starts morphing the moment you move it. Also, as I mentioned, Cut and Paste does the same thing. Also, scaling it, proportionally or not.

Please don't tell me I've found another bug?! For some reason, I'm beginning to feel like the proverbial Guinea Pig, lol!!

ss1.svg
(19.17 KiB) Downloaded 179 times

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: why simply moving spiro spline causes it to change shape

Postby ~suv » Sat Dec 25, 2010 5:41 pm

The 'Spiro splines' implementation has some complex math behind it, and with some curves (very 'freely' drawn), minor rounding errors or differences in decimal places of individual nodes when moving the path apparently can cause the result of the recalculated Spiro splines to be vastly different (non-unifom scaling, stretching or skewing is different and in theses cases, differences are to be expected (node relations/distances do change) unless you group the Spiro path first and transform the group instead of the path).

When I drag any of the three paths in your example, yes, the Spiro splines path effects are or can be recalculated differently with nearly every move and produce surprising new "random-esque" curves. [1]

Some related reports:Note that some bugs no longer occur in current Inkscape versions as originally described (there have been changes to the algorithms), but maybe in slight variations.

brynn wrote:Please don't tell me I've found another bug?! For some reason, I'm beginning to feel like the proverbial Guinea Pig, lol!!
This depends on your attitude, I guess… ;) - if bugs are bad, and you think Inkscape is buggy, then maybe every unexpected behavior or glitch turns into the oooogly bug that proves it.
Answering the question "why simply moving spiro spline causes it to change shape?" with "Is this a bug?" makes all spiro paths per se buggy - but the current implementation does allow for many use cases (the net is full of them) with great results, nevertheless - even if some intertwined, or spiraling, paths more often than not seem to be edge-cases that quickly return chaotic results.

brynn wrote:Basically, I'm using the Pencil tool, in Spiro mode, triangle in, smoothing 100.
I would recommend to use a lower smoothing factor for the pencil tool in 'Spiro splines' mode like 50 or - depending on how predictable you want the resulting 'Spiro splines' - even lower around 30. Or draw with the pen (where you have to explicitly place nodes and determine whether you want the node handles to be collinear (smooth) or not).

brynn wrote:Cut/Paste does the same thing!
To be expected with these examples, because the normal 'Paste' places the pasted item under the cursor - thus implicitly moving the object.


[1] I had asked for an example because I never noticed it when experimenting with 'Spiros' - but I usually draw the paths in a more controlled way (as I'm more into technical drawing and interested in trying to take advantage of the geometric nature of the Spiro splines (at least as far as I understand it) - like that a triangle path with 'Spiro' effect and three smooth nodes renders a circle, or a two-segment path with a smooth mid-node acts like drawing an arc (segment of a circle) by three points, etc.).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: why simply moving spiro spline causes it to change shape

Postby brynn » Sun Dec 26, 2010 1:56 pm

Thanks ~suv :D
Off topic:
Happy Holidays!

So in general this behavior has been well-reported, and another report would not be needed?

My comment about guinea pig wasn't really a passive-aggresive way of complaining that Inkscape is buggy. It was more meant as a "why me?" complaint. And I do apologize, as I tend to deplore complaining when it has no other purpose than to whine. But in all honesty, I do wonder why I seem to either discover new ones, or stumble upon known ones SO much more than other users. Or maybe it's just that other users never bother to report them? I'm not sure....

Anyway, you say that if I group it, I can move it etc. without morphing? That would be great, then I can ungroup it, and still have the cool abstract behavior again!

Thanks again ~suv, I always appreciate your help :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: why simply moving spiro spline causes it to change shape

Postby ~suv » Sun Dec 26, 2010 9:49 pm

brynn wrote:Anyway, you say that if I group it, I can move it etc. without morphing?
Grouping doesn't prevent that the calculated path effect changes due to e.g. (lack of) precision or rounding differences.

There is a difference though if you either transform the path which has an LPE applied, or the group which contains a path with an LPE applied: in the second case, the LPE effect is calculated first, then that result is transformed:
transform-LPE-path-vs-grouped-1.png
transform-LPE-path-vs-grouped-1.png (52.94 KiB) Viewed 1523 times
transform-LPE-path-vs-grouped-1.svg
(48.56 KiB) Downloaded 178 times

brynn wrote:That would be great, then I can ungroup it, and still have the cool abstract behavior again!
No, when you ungroup it - with default Inkscape preferences (optimized transforms) - the transform is applied to the path itself, and the result is the same happens as if you transformed the path without group.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: why simply moving spiro spline causes it to change shape

Postby brynn » Sun Dec 26, 2010 10:08 pm

Oh sorry, I misunderstood you.

Thanks again for looking at this :D

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: why simply moving spiro spline causes it to change shape

Postby RobA » Tue Dec 28, 2010 7:32 am

brynn wrote:But in all honesty, I do wonder why I seem to either discover new ones, or stumble upon known ones SO much more than other users. Or maybe it's just that other users never bother to report them? I'm not sure....


My observation is that the posters here are more "users" who realize that inkscape isn't yet even a 0.5 version release, and as such is expected to be buggy.

Others who are more involved sign up at Launchpad and check/create bug reports themselves, and get involved on the devel mailing list and possibly IRC.

-Rob A>


Return to “Help with using Inkscape”