Re: SVG2 - suggestion for a new path command to close a subpath smoothly

Thanks for bringing this up again.
We discussed this during a weekly conference call and people were quite
interested.

I played around with your example page and the results look reasonable.

The solution needs to work on all types of path types though (including
arc). Do you need any more information than the angle of the control point
and the distance between start and end?

Rik

On Sun, Jan 6, 2013 at 6:07 AM, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>wrote:

> Rik Cabanier:
> > Hi,
> >
> > It would be good to see the formula's that derive the strength of the
> > control points. Even better would be a small library that implements them
> > so  people can experiment with the results.
> > Thinking about it some more, I'm less concerned with arc since the
> > 'direction' of the last control point is probably constant with respect
> to
> > precision.
> > We'd still need to specify what would happen to Catmull-Rom.
> >
>
> Meanwhile I have put together something to analyse and to play with:
> http://hoffmann.bplaced.net/svgueb/pathclosedform.xhtml
>
> With one form one can provide points and control points to get a closed
> cubic curve as result.
> If required, one can use another form to convert affine and quadratic paths
> to cubic paths.
> Currently such a conversion is not defined in SVG.
> But the used formulas can be useful as well to extent the option for
> the animation of path data as well, even beyond the improvements
> of SVG tiny 1.2, currently unfortunately not available in the SVG 2 draft.
>
> To learn something about (closed and open) Catmull-Rom, I found out,
> that this is the same as low quality interpolation, maybe already known
> before
> Leibniz and Newton - it turned out, that I tried this with SVG already
> years
> ago, but to call this simple method Catmull-Rom seems to be new, not
> available in my books about mathematics from the end of the last century
> ;o)
> As an example I provide approximations of a circle for  comparison - as
> expected, with the same number of points, the quality of  Catmull-Rom
> is pretty low, therefore one needs a lot of points to get a useful result
> (title elements provide information about the meaning of the curves).
> But this is a general problem of this low quality interpolation and
> is not related to open or closed boundary conditions.
> Using slightly more advanced interpolation formulas, one gets much
> better results, what can be tested with an approximation of  an
> elliptical arc as well.
>
> However, because derivatives for elliptical arcs are known, if one wants
> to close such segments as well, one should better use the derivatives
> to determine the closing (cubic) segment instead of using an approximation.
> But I think, it is of very limited use to provide an option to close path
> data
> with elliptical arcs smoothly with a cubic segment, because this is a
> completely other curve type than cubic, quadratic and affine segments
> represent.
>
>
> Olaf
>
>
>
>
>

Received on Monday, 7 January 2013 04:20:39 UTC