1/29
Looks like no tags are added yet.
Why not just polygons for curves?
Polygons are bad at curves; you need many of them and they only approximate curvature.
Implicit representation
The object is the set of points where f(p) = 0. In 2D f(x,y) = 0 is a curve, in 3D f(x,y,z) = 0 is usually a surface.
Implicit circle
(x - xc)^2 + (y - yc)^2 - r^2 = 0
Implicit sphere
(x - xc)^2 + (y - yc)^2 + (z - zc)^2 - r^2 = 0
Implicit line (normal form)
n . (q - p0) = 0, where n is perpendicular to the line direction (p1 - p0).
Why does n . (q - p0) = 0 describe a line?
For any q on the line, q - p0 is parallel to the line, so its dot product with the perpendicular n is 0.
Implicit pros
Compact, captures curvature exactly, and the normal is easy to get.
Normal of an implicit surface
The gradient: grad f = (df/dx, df/dy, df/dz).
Implicit con
Hard to display, because the equation doesn't hand you any points; you have to search for the surface.
Parametric representation
Position as a function of a parameter, p = f(t). Sweep t over its range to trace the whole curve.
Why are parametric curves easy to draw?
Evaluate enough t values and connect the points.
Parametric circle
(x, y) = (xc + r cos t, yc + r sin t), t in [0, 2pi].
Is a parameterization unique?
No. (r cos 2t, r sin 2t) for t in [0, pi] gives the same circle traced twice as fast.
Unit parameterization
Most common. Parameter u runs from 0 (start) to 1 (end). Circle: (r cos 2pi u, r sin 2pi u).
Arc-length parameterization
Parameter s is distance along the curve, so |df/ds| is constant. Useful for some maths, less common.
Parametric 3D surface
p = f(u, v): two parameters, because a surface of a 3D solid is 2-dimensional (like longitude and latitude).
Piecewise curve
Split a complex curve into pieces, each with its own simpler function.
Piecewise pros and cons
Pros: simpler functions, can represent any curve with enough pieces. Cons: more than one function, and you must manage the joins.
C0 / G0 continuity
f1(1) = f2(0). No gap, the pieces touch, but there can still be a sharp corner.
C1 continuity
f1'(1) = f2'(0). Tangent vectors equal in both direction and magnitude (speed).
G1 continuity
f1'(1) = k f2'(0), k > 0. Tangents point the same direction but speed can differ. Looks smooth.
Cn continuity
The first n derivatives are equal at the join. C2 = matching acceleration.
Gn continuity
The nth derivatives are proportional at the join. G2 = matching curvature.
Which implies which: Cn or Gn?
Cn implies Gn, but not the other way round.
C (parametric) continuity in plain English
Smoothness of the curve AND its parameterization. A car driving along f(t) moves smoothly.
G (geometric) continuity in plain English
Smoothness of the shape only, i.e. the track the car leaves in the snow.
Why does G continuity exist?
The parameterization can make derivatives point the same way with different magnitudes: the curve looks smooth but isn't C1.
Car bodies need at least what continuity?
G2 (matching curvature), for aerodynamics.
Main difference between Cn and Gn (review Q)
Cn needs the first n derivatives exactly equal (direction and magnitude). Gn only needs them proportional. Gn = smooth shape; Cn = smooth shape and parameterization.