
Hi,
Over on the www-svg@...157... list, there has been some discussion about Catull-Rom splines, triggered by http://schepers.cc/?p=243 and http://schepers.cc/svg/path/dotty.svg :)
These CR curves look exactly like Inkscape's "auto smooth" node type; could someone confirm this? :)
CR curves as per dotty.svg change the 4 segments around the point, although since dotty.svg hasn't got moving points functionality yet, only placing new points, then only the 2 segments before the newly placed point are seen changing as a new point is laid down.
The Inkscape "auto smooth" node type interaction is the opposite in the 0.47 release, where you can't lay down AS nodes but you can change points' type to AS and then move them around, which effects the 4 segments around the point. I haven't checked the trunk source version; does the latest node tool support this?
Cheers Dave

On Thu, Jul 15, 2010 at 6:08 PM, Dave Crossland <dave@...1555...> wrote:
Hi,
Over on the www-svg@...157... list, there has been some discussion about Catull-Rom splines, triggered by http://schepers.cc/?p=243 and http://schepers.cc/svg/path/dotty.svg :)
These CR curves look exactly like Inkscape's "auto smooth" node type; could someone confirm this? :)
Maybe it's not exact but very similar - I made a doodle in dotty.svg, then retraced it in Inkscape and made all nodes autosmooth, and got a very similar outline.
But regardless of exactness, I think you are spot on in that auto-smooth nodes can be very workable compromise that can be made part of SVG core without burdening implementers too much.
Inkscape's auto-smooth nodes are simply beziers with some additional constraints on Bezier handles. These constraints, enforced during editing, make them behave in a very intuitive and useful way. Some on this list even commented that they may be more useful in practice than Spiros. And for the purposes of SVG standardization, they are much less burdensome: no Bezier fallback is necessary - they are already Beziers; the attribute indicating the auto-smoothness can be entirely ignored by renderers - it's only for software that can actually edit the path; and even then it is very easy to implement and involves no scary math that threatens to explode into infinities.

On 15 July 2010 20:44, bulia byak <buliabyak@...400...> wrote:
the attribute indicating the auto-smoothness can be entirely ignored by renderers
But if you animate an autosmooth point (or a regular cubic bezier curve point) the curve around it changes; the question is if the curve around it maintains its smoothness. With normal points, it doesn't, and quickly becomes a 'nasty' curve, with autosmooth points it does for the 4 curve segments surrounding the point, and with spiro points it does for all the curve segments until a corner or tangent point.
This is especially important for glyph shape interpolation (designing a set of thin, regular, bold weights, etc) and also useful in animation ("shape tweening" I think its called.)

On Thu, Jul 15, 2010 at 9:58 PM, Dave Crossland <dave@...1555...> wrote:
On 15 July 2010 20:44, bulia byak <buliabyak@...400...> wrote:
the attribute indicating the auto-smoothness can be entirely ignored by renderers
But if you animate an autosmooth point (or a regular cubic bezier curve point) the curve around it changes; the question is if the curve around it maintains its smoothness.
Yes - by renderers I actually mean "static renderers" without animation. If you're doing animation of path nodes, you should obey that constraint. But again, it's so easy to do, should not be a problem for anyone.
With normal points, it doesn't, and quickly becomes a 'nasty' curve, with autosmooth points it does for the 4 curve segments surrounding the point, and with spiro points it does for all the curve segments until a corner or tangent point.
Yes, Spiros are more nasty in that as well - you may have a lot more to redraw when you move a node. With auto-smooth, it's indeed limited to the 4 closest segment.

On 15 July 2010 21:20, bulia byak <buliabyak@...400...> wrote:
On Thu, Jul 15, 2010 at 9:58 PM, Dave Crossland <dave@...1555...> wrote:
On 15 July 2010 20:44, bulia byak <buliabyak@...400...> wrote:
the attribute indicating the auto-smoothness can be entirely ignored by renderers
But if you animate an autosmooth point (or a regular cubic bezier curve point) the curve around it changes; the question is if the curve around it maintains its smoothness.
Yes - by renderers I actually mean "static renderers" without animation. If you're doing animation of path nodes, you should obey that constraint. But again, it's so easy to do, should not be a problem for anyone.
To you, does having the autosmooth node type as part of the SVG spec makes sense?
With normal points, it doesn't, and quickly becomes a 'nasty' curve, with autosmooth points it does for the 4 curve segments surrounding the point, and with spiro points it does for all the curve segments until a corner or tangent point.
Yes, Spiros are more nasty in that as well - you may have a lot more to redraw when you move a node. With auto-smooth, it's indeed limited to the 4 closest segment.
Yes. (For clarification, by "nasty" curve I mean only visually, and specifically, one with 'kinks')

On Thu, Jul 15, 2010 at 10:41 PM, Dave Crossland <dave@...1555...> wrote:
To you, does having the autosmooth node type as part of the SVG spec makes sense?
With the reservation that I have no experience in standardization and so may overlook something, I'd say yes. It promises a significant gain for very little expense. You probably already have to specify how a node behaves when it is moved during animation - i.e. whether its control points stay or move with it. For autosmooth nodes, you just need to expand that description a bit, adding a new mode or option.
The only problem I see is that it would be very desirable to avoid extending the path grammar, for it is a really basic low-level part of SVG. Ideally, you should still use the same C command for autosmooth nodes as for regular Beziers, but identify those nodes that need autosmooth behavior through some separate attribute, similar to the nodetypes attribute in Inkscape.
Yes. (For clarification, by "nasty" curve I mean only visually, and specifically, one with 'kinks')
In that sense, on the one hand, Spiros are indeed nasty because kinky and capricious, but on the other hand, when well-behaved, they do look noticeably smoother and more "natural" than autosmoothed paths, due to the tricky Spiro math that minimizes curvature for a given set of points. Still, like I said, for many uses autosmoothed paths are good enough.
participants (2)
-
bulia byak
-
Dave Crossland