Open
Description
Hi,
Thanks for sharing the work. I want to fit curved line through given points. I am unable to understand how you chose the coefficient for interpolation function e.g. for CatmullRom you use the following function
interpolate(double u, const Vector& P0, const Vector& P1, const Vector& P2, const Vector& P3)
{
Vector point;
point=u*u*u*((-1) * P0 + 3 * P1 - 3 * P2 + P3) / 2;
point+=u*u*(2*P0 - 5 * P1+ 4 * P2 - P3) / 2;
point+=u*((-1) * P0 + P2) / 2;
point+=P1;
return point;
}
Can I use more than four control points ? I tried with more than four point but algorithm considering only 4 control points. Please help me, I am waiting for you reply.
Thanks in advance !!
Metadata
Metadata
Assignees
Labels
No labels