Inkscape and PowerPoint use cubic Bezier Curves for their freeform paths, but Keynote uses a different interpolation by default. Try adding a smooth freeform shape and it will attempt to match the slope and curvature, I think.

yongchi1

Why we use four points to draw a spline rather than using other number of points (like 3/5/6 etc.)?

zyx

@yongchi1 I think it has to do with the fact that we're specifying two endpoints and two tangents. As mentioned in class, this gives us 8 degrees of freedom, which is the smallest number of d.o.f's needed to piece together curves while maintaining 'seamless-ness'.

keenan

@yongchi1 See also the next slide. :-)

keenan

@HelloWorld Yeah, they may be using something like a Catmull Rom spline which (depending on who you ask...) might be easier or more pleasant to manipulate for certain drawing tasks. Internally, though, these curves all get stored as cubic (or quadratic) Bezier curves. The reason for that is that standard formats (SVG, PDF, etc.) support rational Beziers, and not much else; likewise, any accelerated drawing library will likely implement routines for these kinds of curves and not much else. The reason is (in spirit) the same as why our rasterization pipeline only draws triangles: you want to pick one or two basic primitives, and then build fast computation around those primitives, rather than having lots of different special cases, etc.

merc

Why does it give us eight degrees of freedom instead of 4? Are we accounting for dimensions for each point?

keenan

@merc Right, it depends on how you want to count degrees of freedom: vector degrees of freedom (4 control points), or scalar degrees of freedom (8 total coordinates)? For some problems, you can just get away with counting vector degrees of freedom. But suppose you want to constrain just the x-coordinate of one control point. Now you have to think in terms of scalar degrees of freedom.

Inkscape and PowerPoint use cubic Bezier Curves for their freeform paths, but Keynote uses a different interpolation by default. Try adding a smooth freeform shape and it will attempt to match the slope and curvature, I think.

Why we use four points to draw a spline rather than using other number of points (like 3/5/6 etc.)?

@yongchi1 I think it has to do with the fact that we're specifying two endpoints and two tangents. As mentioned in class, this gives us 8 degrees of freedom, which is the smallest number of d.o.f's needed to piece together curves while maintaining 'seamless-ness'.

@yongchi1 See also the next slide. :-)

@HelloWorld Yeah, they may be using something like a Catmull Rom spline which (depending on who you ask...) might be easier or more pleasant to manipulate for certain drawing tasks. Internally, though, these curves all get stored as cubic (or quadratic) Bezier curves. The reason for that is that standard formats (SVG, PDF, etc.) support rational Beziers, and not much else; likewise, any accelerated drawing library will likely implement routines for these kinds of curves and not much else. The reason is (in spirit) the same as why our rasterization pipeline only draws triangles: you want to pick one or two basic primitives, and then build fast computation around those primitives, rather than having lots of different special cases, etc.

Why does it give us eight degrees of freedom instead of 4? Are we accounting for dimensions for each point?

@merc Right, it depends on how you want to count degrees of freedom: vector degrees of freedom (4 control points), or scalar degrees of freedom (8 total coordinates)? For some problems, you can just get away with counting vector degrees of freedom. But suppose you want to constrain just the x-coordinate of one control point. Now you have to think in terms of scalar degrees of freedom.