It has been a long time since my last post. I was busy in the past months, and finally have time to finish dual-quaternion skinning and added some basic animation to my code base.
|The animation editor|
Sub-dividing the curve
A cubic Bezier is defined as:
solving an analytical solution for this is quite complicated. So I just sub-divide the curve into several line segments and stop the sub-division if the points are close to a straight line. After that we can check if the point is lying on the line segments instead. First we start at the 2 end points of Bezier curve and check whether the mid-point(the red cross) need to be sub-divided.
|check whether the red point need to be sub-divided|
|look ahead one more point to avoid inflection point problem|
|Zooming in will sub-divide more points|
This short post describe a way for checking whether a point is on a cubic bezier curve by using line sub-division. In the next post, I will talk about another fun stuff when writing the animation editor.