1 A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves ‹#›/23 Curves and Surfaces A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves ‹#›/23 To do • Continue to work on ray programming assignment • Start thinking about final project A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves ‹#›/23 Curved Surfaces • Motivation – Exact boundary representation for some objects – More concise representation that polygonal mesh – Easier to model with and specify for many man-made objects and machine parts (started with car bodies) A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves ‹#›/23 Curve and surface Representations • Curve representation – Function: y = f(x) – Implicit: f(x, y) = 0 – Subdivision: (x, y) as limit of recursive process – Parametric: x = f(t), y = g(t) • Curved surface representation – Function: z = f(x, y) – Implicit: f(x, y, z)=0 – Subdivision: (x, y, z) as limit of recursive process – Parametric: x = f(s, t), y=g(s, t), z = h(s, t)
6
Embed
Curves and Surfaces - Inspiring Innovation · CMSC 635 January 15, 2013 Spline curves ‹#›/23 To do • Continue to work on ray programming assignment • Start thinking about
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Curves and Surfaces
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
To do • Continue to work on ray
programming assignment • Start thinking about final project
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Curved Surfaces • Motivation
– Exact boundary representation for some objects
– More concise representation that polygonal mesh
– Easier to model with and specify for many man-made objects and machine parts (started with car bodies)
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Curve and surface Representations
• Curve representation – Function: y = f(x) – Implicit: f(x, y) = 0 – Subdivision: (x, y) as limit of
recursive process – Parametric: x = f(t), y = g(t)
• Curved surface representation – Function: z = f(x, y) – Implicit: f(x, y, z)=0 – Subdivision: (x, y, z) as limit of
recursive process – Parametric: x = f(s, t), y=g(s, t), z
= h(s, t)
2
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Parametric Surfaces • Boundary defined by parametic
function – x = f(u, v) – y = f(u, v) – Z = f(u, v)
• Example (sphere): – X = sin (θ) cos (φ) – Y = sin (θ) sin (φ) – Z = cos(θ)
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Parametric Representation • One function vs. many (defined
piecewise) • Continuity • A parametric polynomial curve of
order n:
• Advantages of polynomial curves – Easy to compute – Infinitely differentiable everywhere
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Spline Constructions • Cubic spline is the most common
form • Common constructions
– Bezier: 4 control points – B-splines: approximating C2, local
• C2 continuity: – Must have C1 continuity, and – Same second derivatives: Qi ’’(1) =
Qi+1 ’’(0) • Most engineering applications (e.g.,
those in car and airplane industry) require at least C1 continuity
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Splines • More useful form of representation compared to the
Bezier curve • How they work: Parametric curves governed by
control points • Mathematically: Several representations to choose
from. More complicated than vertex lists. See chapter 22 of the book for more information.
Simple parametric representation:
• Advantage: Smooth with just a few control point • Disadvantage: Can be hard to control • Uses:
– representation of smooth shapes. Either as outlines in 2D or with Patches or Subdivision Surfaces in 3D
– animation Paths – approximation of truncated Gaussian Filters
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
A Simple Animation Example • Problem: create a car
animation that is driving up along the y-axis with velocity [0, 3], and arrive at the point (0, 4) at time t=0. Animate its motion as it turns and slows down so that at time t=1, it is at position (2, 5) with velocity [2, 0].
• Solution – First step: generate a mathematical
description. – Second step: choose the curve
representation • Hermite curve: r(t)=GMT(t)
• Exercise: Bezier curve representation?
6
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Catmull Rom Spline • Can be used to solve the following
problem.
• Solution: – Math representation – Curve construction
• Catmull Rom spline to construct the vectors from the two or three neighbors
take home exercise: read chap 22 in the book and construct the curve and the B-spline using the Chen code.
A D V A N C E D C O M P U T E R G R A P H I C S
CMSC 635 January 15, 2013 Spline curves ‹#›/23
Subdivision curves
• A simple idea – Using the midpoint of the
edge from one point to the next, replace that point with a new one to create a new polygon to construct a new curve.
– problem with this? • Further readings:
– Laplacian interpolation and smoothing (Gabriel Taubin @ Brown)