computer graphics programming problem solving and visual communication n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Computer Graphics: Programming, Problem Solving, and Visual Communication PowerPoint Presentation
Download Presentation
Computer Graphics: Programming, Problem Solving, and Visual Communication

Loading in 2 Seconds...

play fullscreen
1 / 15

Computer Graphics: Programming, Problem Solving, and Visual Communication - PowerPoint PPT Presentation


  • 130 Views
  • Uploaded on

Computer Graphics: Programming, Problem Solving, and Visual Communication. Steve Cunningham California State University Stanislaus and Grinnell College PowerPoint Instructor’s Resource. Interpolation and Spline Modeling. Creating curves and surfaces with just a few control points.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Computer Graphics: Programming, Problem Solving, and Visual Communication' - augusta


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
computer graphics programming problem solving and visual communication

Computer Graphics:Programming, Problem Solving, and Visual Communication

Steve Cunningham

California State University Stanislaus and Grinnell College

PowerPoint Instructor’s Resource

interpolation and spline modeling

Interpolation and Spline Modeling

Creating curves and surfaces with just a few control points

interpolations
Interpolations
  • If we have just a few points, we can define curves or surfaces from polygons of relatively low degree that go through the points

OR:

  • We could modify this requirement to have the curves or surfaces influenced by the points
interpolations 2
Interpolations (2)
  • For example, with any three points

P0, P1, P2

we can define a quadratic function of one variable

f0(t)P0+f1(t)P1+f2(t)P2

with the quadratic functions

f0(t)=(1-t)2, f1(t)=2t(1-t), and f2(t)=t2

with domain [0,1] that goes through P0 and P2 and goes towards P1

interpolations 3
Interpolations (3)
  • These three functions are called the quadratic Bernstein basis for the quadratic Bézier curves, and an example curve is:
interpolations 4
Interpolations (4)
  • There are Bernstein basis functions of all degrees; the general form for the n+1 functions of degree n on [0,1] is

Notice that these are the terms in expanding (1-t)n

interpolations 5
Interpolations (5)
  • The cubic Bézier curve is the most commonly used of these. It takes four control points, goes through the two endpoints, and interpolates the others.
  • An example curve is:
other interpolations
Other Interpolations
  • Catmull-Rom spline: a cubic spline that uses four control points and goes through the second and third of them in directions determined by the first and fourth
another way to compute splines
Another Way to Compute Splines
  • Another way to compute spline functions uses matrices and may be more efficient
  • For the Bézier cubic spline, this is:
extending spline curves
Using P0-P1-P2-P3 then P3-P4-P5-P6 is not smooth

Adding midpoints Q0 and Q1 between points P2-P3 and P4-P5:

Extending Spline Curves
spline curves in 3d
Spline Curves in 3D
  • Everything said about spline curves is valid in 3D as well as 2D, and we have:
spline surfaces
Spline Surfaces
  • Simplest surface is a patch, defined by a square array of control points
  • The interpolating functions are used for both variables (u,v) in the square domain [0,1]x[0,1]
  • If the functions are cubic in each variable, the result is a bicubic whose coefficients depend on the control points:
spline surface 2
Spline Surface (2)
  • An example of a single bicubic patch of a Bézier surface, with control points:
spline surface 3
Spline Surface (3)
  • OpenGL gives you some tools that let you avoid the details of programming all the basis functions
  • These are the evaluator functions, and they let you get normals and texture coordinates automatically.
  • The downside is that you can only use the kind of splines that OpenGL gives you.
spline surface 4
Spline Surface (4)
  • Examples of an extended surface with automatic normals (left) and a patch with automatic texture coordinates (right)