Moulding bezier curve
Bezier curve moulding is changing interpolated curve with direct move of curve instead of control points. For better understanding watch this video.
Existing solution for moulding bezier curve supports 4 degree at max. I discover a solution to mould n-degree. Presentation video showing moulding bezier curve of n-degree with cascade affect of other control points. You can mould only one control point. If you interested about math, you have to know about ABC structure.
In a shortcut:
- A - control point closest to specified Tau
- B - interpolated point on bezier curve at Tau, the point that user moves
- C - middle point on line between between previous and next control points
- T - target point
- a - angle in radians between B and T points against C
If you like to know more about ABC and moulding you can find here:
Here is a math equation, which I created:
For better understanding here is my drawing. The main thought is rotating ABC around angle a to target T point and keep the distance UT and angle.
You can find my scripts here (it contains Unity C# script and html Javascript version):