Catmull-Rom可以平滑的通过所有的标志点。
public static Vector3 CatmullRomPoint(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t)
{
return p1 + (0.5f * (p2 - p0) * t) + 0.5f * (2f * p0 - 5f * p1 + 4f * p2 - p3) * t * t +
0.5f * (-p0 + 3f * p1 - 3f * p2 + p3) * t * t * t;
}