Parametric Representations Lecture Notes
Parametric Representations: Motivation
- Transformations and rendering processes can be simplified using parametric representations.
- Parametric representations can handle complex objects more easily.
Lecture Overview
- Topics:
- Parametric representation
- Curves
- Surfaces
- Drawing curves
Curves as Functions
- Curves can be represented using functions where changing x affects y.
- Examples: f(x)=x2, f(x)=cos(x)
- Characteristics: For every x, there is only one corresponding y. Thus, there are no overlaps.
- Problem: A single x value cannot represent multiple y values.
Parametric Representation of Curves
- Solution: Use a parameter t to represent both x and y.
- x=x(t)
- y=y(t)
- t represents the distance along the curve.
- t=0: start of the curve.
- t=0.5: halfway point of the curve (assuming total length is 1).
- t=1: end of the curve.
Parametric Representation of Surfaces
- Curves are 2D (x, y), while surfaces are 3D.
- Use two parameters, u and v, to represent a surface.
- x=x(u,v)
- y=y(u,v)
- z=z(u,v)
Parametric Equation of a Line
- Representing a line using two points (x<em>A,y</em>A) and (x<em>B,y</em>B).
- Standard equation: y=mx+c
- Parametric representation using t:
- x=x<em>A+(x</em>B−xA)t
- y=y<em>A+(y</em>B−yA)t
- x<em>B−x</em>A represents the total horizontal displacement.
- y<em>B−y</em>A represents the total vertical displacement.
- t represents the fraction of the total displacement.
- When t=0, x=x<em>A and y=y</em>A.
- When t=1, x=x<em>B and y=y</em>B.
Example: Finding Parametric Equation
- Given points (1,4) and (5,−8), find the parametric equations.
- x=1+(5−1)t=1+4t
- y=4+(−8−4)t=4−12t
- If y=0, find the value of x.
- 0=4−12t⇒t=124=31
- x=1+4(31)=1+34=37
Parametric Representation of a Circle
- Equation: x2+y2=r2
- Parametric representation: Using t to represent the angle, where t represents the percentage of the total 360 degrees.
- x=r⋅cos(θ)
- y=r⋅sin(θ)
Summary of Parametric Representations
- Single function: f(x)
- Parametric curve: Using t to represent x, y, and z.
- Surface: Using u and v to represent x, y, and z.
- t represents distance along the curve.
- u and v represent location on the surface.
- Linear, cubic, or arithmetic functions can be used to represent different shapes.
Bezier Curves
- The shape of the curve is controlled by control vertex points.
- The curve usually lies within the convex hull of the control points.
- The Bezier curve is typically cubic but can be of higher order.
- Function: A Bezier curve is represented as the sum of basis functions.
- P=∑B<em>i(t)P</em>i
- Where P<em>i represents control points and B</em>i(t) represents basic functions.
- The basic function is similar to x(t) and gives a weight to each control point.
- The location of points on the curve depends on the weights of the control points.
- The sum of the weights equals one.
Characteristics of Bezier Curves
- Different control points yield different shapes.
- Basic functions are global, meaning every control point impacts the overall shape of the curve.
- Every control point contributes to the overall shape.
- Curves lie inside the convex hull, ensured by the fact that the sum of basic functions equals one, and each basic function is greater than zero.
- Complex curves can be constructed by combining multiple segments.
Smoothly Connecting Bezier Curve Segments
- Multiple segments can be joined using different control points.
- Smoothness is achieved by ensuring collinearity at the joint control point.
- Types of continuity:
- Zero order: The two segments have a joint control point.
- First order: The segments not only have a joint control point, but the tangents are equal.
- Second order: The second derivative is equal at the joint point.
- Geometric continuity requires derivative continuity.
Bezier Surfaces
- Surfaces are 3D, while curves are 2D.
- Surfaces are controlled by parameters u and v.
- Every point on the surface is defined by u and v.
- Functions involve control points and Bernstein polynomials.
- Surface lies within the convex hull of all control points.
- Transforming a control point significantly impacts the shape of the surface.
- When u and v are constant, it results in Bezier curves.
- Bezier surface can be regarded as several Bezier curves.
Characteristics of Bezier Surfaces
- Increasing control points increases complexity.
- Control is non-local, meaning a single control point can impact the entire surface.
- Surfaces are often constructed from bicubic patches.
- Similar to curves, derivative continuity allows combination of surfaces.
Drawing Curves
- Involves interpolation between control points.
- Given four control points (P<em>0,P</em>1,P<em>2,P</em>3), the first layer of interpolation results in (Q<em>0,Q</em>1,Q<em>2). The second layer results in (R</em>0,R1), and the final interpolation yields point B on the curve.
- Approximating: Passes through only the starting point but not necessarily through all control points.
- Interpolating: Goes through all control points.
- Cubic splines have continuous first or second derivatives at joint control points.
- Basic functions are local, meaning changing a single control point only impacts a local part of the curve.
- Offers finer control compared to Bezier surfaces or curves.
NURBS for Surface Definition
- Allows defining the shape of a surface using control points and basic functions.
- Adjusts overall and local shapes.
- Complex curves result in complex 3D meshes.
- Subdivision algorithms have started to replace this generation method.