template<class T>
T const Interpolate(T const&v1, T const&v2, float s) {
return v1 + (v2 - v1) * s;
}
template<class T>
T const HermiteInterpolate(T const& pos1, T const& dir1,
T const& pos2, T const& dir2, float s)
{
float s_2 = s * s;
float s_3 = s_2 * s;
float b1 = -2.0f * s_3 + 3.0f * s_2;
float b0 = 1.0f - b1;
float b3 = s_3 - s_2;
float b2 = b3 - s_2 + s;
return b0 * V1 + b1 * V2 + b2 * T1 + b3 * T2;
}
_________________
прикрепленные картинки с radikal не смотрю.