« Return to Thread: SVG Reader Feedback

Re: SVG Reader Feedback

by bART Janssens-2 :: Rate this Message:

Reply to Author | View in Thread

On Mon, May 26, 2008 at 10:59 PM, Timothy M. Shead <tshead@...> wrote:

> To create a Bezier curve, all of the control-point weights must be 1.0.
> You probably aren't setting the knot vector correctly.  My recollection
> is that the knot vector for a Bezier curve of order k is:
>
> * k identical values for the first control point.
> * k identical values for the last control point.
> * k-1 identical values for the other control points.
>
> So for your example of an order 3 curve with 4 control points, a
> reasonable knot vector would be
>
> 0 0 0 1 1 2 2 3 3 3

After failing to understand this from my text book (just as before the
exam ;) I did some experimenting, and finally got it to work. The
curves are of cubic degree, so the order is 4 (degree + 1). There are
4 control points, this means we need 8 elements in the knot vector.
The only useful bit I extracted from the textbook is that knot
multiplicity should be equal to the degree. With this in mind and only
8 slots available, I decided to try the following knot vector, which
seems to work:
0 1 1 1 2 2 2 3
This is the same for all curves extracted from the SVG, so no need to
calculate it. The weights should all be set to 1.

Cheers,

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

 « Return to Thread: SVG Reader Feedback