Lecture 11 - Spline curves (notes)

Lecture 11 - Spline curves (notes) - Lecture 11...

Info icon This preview shows pages 1–3. Sign up to view the full content.

Lecture 11: Introduction to Spline Curves Splines are used in graphics to represent smooth curves and surfaces. They use a small set of control points (knots) and a function that generates a curve through those points. This allows the creation of complex smooth shapes without the need for manipulating many short line segments or polygons at the cost of a little extra computation time when the objects of a scene are being designed. We will start with a simple, but not very useful spline. Taking the equation y = f ( x ) , we can express f as a polynomial function, say: y = a 2 x 2 + a 1 x + a 0 Let us choose any three points P 0 , P 1 and P 2 at coordinates ( x 0 , y 0 ) , ( x 1 , y 1 ) and ( x 2 , y 2 ) . We can substitute each set of coordinates into the equation to get three simultaneous equations which we can solve for the un- knowns a 2 , a 1 and a 0 . We now have the equation of a curve that interpolates (passes through) the three chosen points. It is of course a parabola, or parabolic spline. Notice that we don’t have any control over the curve. There is only one parabola that will fit the data as shown in Figure 1. P 0 P 1 P 2 y = a 2 x 2 + a 1 x + a 0 Figure 1: A non-parametric spline Parametric Splines We can improve our choice by using a parametric spline. Let us consider first a quadratic polynomial spline written in vector notation as. P = a 2 μ 2 + a 1 μ + a 0 (1) This equation gives the vector location of a point P in terms of constant vectors a 0 , a 1 and a 2 and a scalar parameter μ . The locations of a 0 , a 1 and a 2 determine the shape of the spline. For two dimensional curves we now therefore have six unknowns (rather than the three in the parabola above). We can use these extra degrees of freedom to control the shape of the curve. We will use the convention that 0 μ 1 over the range of interest. Hence at μ = 0 the curve is at the first point to be interpolated, and at μ = 1 it is at the last. Now consider interpolating the same three points as before: ( P 0 , P 1 and P 2 at ( x 0 , y 0 ) , ( x 1 , y 1 ) and ( x 2 , y 2 ) ). When μ = 0 , the curve passes through the first point, say P 0 , and so, substituting μ = 0 into Equation 1, we can write P 0 = a 0 . Similarly, when μ = 1 the point passes through the last point, say P 2 , and this gives us the equation: P 2 = a 2 + a 1 + a 0 , substituting for a 0 we get P 2 - P 0 = a 2 + a 1 . (2) We have now met all the conditions except for the requirement that the curve must pass through P 1 . We can choose μ anywhere in the range 0 < μ < 1 , and get a third equation to solve for the curve parameters. In other words we can now pick one of a whole family of different curves: Each one will interpolate the three points and have its own particular value of μ that we can choose for P 1 . For example, choosing μ = 1 / 2 in Equation 1 and substituting P 0 for a 0 , we get P 1 - P 0 = a 2 / 4 + a 1 / 2 (3) Interactive Computer Graphics Lecture 11 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

We can now solve equations 2 and 3 and find the values of a 1 and a 2 . We can then draw the curve, for this choice of μ at P 1 , as shown on the left in Figure 2. Further possible curves using the same three points and
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '14
  • Bezier Curves

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern