i want to generate a bezier curve pass through several points i input by mouse.These points are more than four,can anyone help me and give me some suggestions about how to implent it?
More thanks.
Good luck!
i want to generate a bezier curve pass through several points i input by
Share
You have to solve the distance between points along the curve first to get your u & v.
Generally, the shortest arc lengths between points approx. the best curve.
p0 and p3 are the endpoints; f and g are two points along the curve.
d1 is distance between p0 and f; d2 between f and g; d3 between g and p3.
Solving for control points, p1 and p2:
Let u=d1/(d1+d2+d3); v=(d1+d2)/(d1+d2+d3)
This is where I link you to:
How to find control points for a BezierSegment given Start, End, and 2 Intersection Pts in C# – AKA Cubic Bezier 4-point Interpolation