Home > Degrafa > Degrafa Quadratic Spline Preview 2

Degrafa Quadratic Spline Preview 2

March 10, 2009

I made some small changes in the tension algorithm, so the spline is not quite as ‘tight’ as in earlier previews.  The following screenshot illustrates a tension setting of 0.3 (which seems to be a good starting point).

Quadratic Spline (tension = 0.3)

Quadratic Spline (tension = 0.3)

An autoClose parameter was also added.  If true, then an additional knot is added to the spline to create a closed shape.  There is no attempt to match tangents at the join between the first and last knots.  This allows for the creation of shapes that are different from a closed cubic Bezier spline.  The following screenshot shows my pathetic attempt at something resembling a teardrop shape (I’m sure a real designer could do much better).

Auto-closed quadratic spline.

Auto-closed quadratic spline.

One or two more tests and the demo (and code) should be released in a day or two, although I’ll probably make one more change to the tension algorithm.

Categories: Degrafa
%d bloggers like this: