Catmull rom

Páginas: 3 (748 palabras) Publicado: 27 de junio de 2011
Catmull-Rom splines
Christopher Twigg March 11, 2003

1

Definition

Catmull-Rom splines are a family of cubic interpolating splines formulated such that the tangent at each point pi iscalculated using the previous and next point on the spline, τ (pi+1 − pi−1 ). The geometry matrix is given by    0 1 0 0 pi−2 −τ 0 τ 0  pi−1    p(s) = 1 u u2 u3   2τ τ − 3 3 − 2τ −τ   pi  −τ2 − τ τ − 2 τ pi+1 Catmull-Rom splines have C 1 continuity, local control, and interpolation, but do not lie within the convex hull of their control points. Note that the tangent at point p0 is notclearly defined; oftentimes we set this to τ (p1 − p0 ) although this is not necessary for the assignment (you can just assume the curve does not interpolate its endpoints). The parameter τ is known as“tension” and it affects how sharply the curve bends at the (interpolated) control points (figure 2). It is often set to 1/2 but you can use any reasonable value for this assignment.

2

DerivationConsider a single Catmull-Rom segment, p(s). Suppose it is defined by 4 control points, pi−2 , pi−1 , pi , and pi+1 , as in figure 3. We know that since it is cubic, it can be expressed by thepolynomial form, p(s) = c0 + c1 u + c2 u2 + c3 u3
3

(1) (2)

=
k=0

ck u k

p0

p2 p3

p4

p1

τ(p2 - p )
0

Figure 1: A Catmull-Rom spline

1

τ = 0.2

τ = 0.5

τ = 0.75Figure 2: The effect of τ

pi-1

p i-2) τ(p i-

pi+1
) τ(p i+1-p i-1

pi pi-2

Figure 3: Catmull-Rom spline derivation

Now, we need to express some constraints. Examining figure 3, we find thefollowing, p(0) = pi−1 p(1) = pi p (0) = τ (pi − pi−2 ) p (1) = τ (pi+1 − pi−1 ) (you should make sure you understand where these come from). Now, we can combine these constraints with (2) to get thefollowing, c0 c0 + c1 + c2 + c3 c1 c1 + 2c2 + 3c3 = pi−1 = pi = τ (pi − pi−2 ) = τ (pi+1 − pi−1 ) (3) (4) (5) (6)

Now, we can substitute (3) and (5) into (4) and (6) to get equations in where...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Pixar
  • Roma
  • Roma
  • Roma
  • roma
  • roma
  • Roma
  • roma

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS