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) = x^2, 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.
- 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 (xA, yA) and (xB, yB).
- Standard equation: y = mx + c
- Parametric representation using t:
- x = xA + (xB - x_A)t
- y = yA + (yB - y_A)t
- xB - xA represents the total horizontal displacement.
- yB - yA represents the total vertical displacement.
- t represents the fraction of the total displacement.
- When t = 0, x = xA and y = yA.
- When t = 1, x = xB and y = yB.
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 \,\Rightarrow\, t = \frac{4}{12} = \frac{1}{3}
- x = 1 + 4(\frac{1}{3}) = 1 + \frac{4}{3} = \frac{7}{3}
Parametric Representation of a Circle
- Equation: x^2 + y^2 = r^2
- Parametric representation: Using t to represent the angle, where t represents the percentage of the total 360 degrees.
- x = r \cdot cos(\theta)
- y = r \cdot sin(\theta)
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 = \sum Bi(t) Pi
- Where Pi represents control points and Bi(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 (P0, P1, P2, P3), the first layer of interpolation results in (Q0, Q1, Q2). The second layer results in (R0, R_1), 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.