내가 여기있는 아래의 코드에서 찾고있다 : http://tehc0dez.blogspot.co.uk/2010/04/nice-curves-catmullrom-spline-in-c.html정규화 된 거리는 어떻게 계산합니까?
/// <summary>
/// Calculates interpolated point between two points using Catmull-Rom Spline
/// </summary>
/// <remarks>
/// Points calculated exist on the spline between points two and three.
/// </remarks>/// <param name="p0">First Point</param>
/// <param name="p1">Second Point</param>
/// <param name="p2">Third Point</param>
/// <param name="p3">Fourth Point</param>
/// <param name="t">
/// Normalised distance between second and third point
/// where the spline point will be calculated
/// </param>
/// <returns>
/// Calculated Spline Point
/// </returns>
static public PointF PointOnCurve(PointF p0, PointF p1, PointF p2,
PointF p3, float t)
{
PointF ret = new PointF();
float t2 = t * t;
float t3 = t2 * t;
ret.X = 0.5f * ((2.0f * p1.X) + (-p0.X + p2.X) * t +
(2.0f * p0.X - 5.0f * p1.X + 4 * p2.X - p3.X) * t2 +
(-p0.X + 3.0f * p1.X - 3.0f * p2.X + p3.X) * t3);
ret.Y = 0.5f * ((2.0f * p1.Y) + (-p0.Y + p2.Y) * t +
(2.0f * p0.Y - 5.0f * p1.Y + 4 * p2.Y - p3.Y) * t2 +
(-p0.Y + 3.0f * p1.Y - 3.0f * p2.Y + p3.Y) * t3);
return ret;
}
매개 변수를 내가 이해하지 못하는 것은 두 번째와 세 번째 점 사이의 정규화 된 거리로 설명 t이다. 이 컨텍스트에서 정규화 된 거리는 무엇이며 어떻게 계산합니까?