This WeekWeekWeek TopicTopicWeek 1Week 1 Coordinate Systems, Basic FunctionsCoordinate Systems, Basic Functions
Week 2Week 2 Trigonometry Trigonometry and Vectors (Part 1)and Vectors (Part 1)
Week 3Week 3 Vectors (Part 2)Vectors (Part 2)
Week 4Week 4 Vectors (Part 3: Locus)Vectors (Part 3: Locus)
Week 5Week 5 Tutorial A: Question and answer session for Tutorial A: Question and answer session for weeks 1-4weeks 1-4
Week 6Week 6 Matrices (Part 1)Matrices (Part 1)
Week 7Week 7 Matrices (Part 2) and Matrices (Part 2) and TransformationsTransformations
Week 8Week 8 Complex numbersComplex numbers
Week 9Week 9 CurvesCurves
Week 10Week 10 Tutorial B: Question and answer session focusing Tutorial B: Question and answer session focusing on weeks 6-9on weeks 6-9
Short Course in: Mathematics and Analytic Geometry
Week 9Week 9CurvesCurves
LERP – Linear Interpolation
Given two position vectors Given two position vectors rr11 and and rr22, a linear , a linear
interpolation is a straight line joining their interpolation is a straight line joining their respective points Prespective points P11 and P and P22..
LERP – Linear Interpolation Oh! But, hang on a minute! LERP is just the line Oh! But, hang on a minute! LERP is just the line
equation defined in the interval: 0 equation defined in the interval: 0 t t 1: 1:
SLERP – Spherical Linear Interpolation SLERP is an extension on LERP to the case of a SLERP is an extension on LERP to the case of a
curve interpolation on a spheroid.curve interpolation on a spheroid. In the most simplest case, we have two orthogonal In the most simplest case, we have two orthogonal
unit position vectors unit position vectors rr00 and and rr11 and we interpolate and we interpolate
between 0 and between 0 and π/2 radians with a parameter in the π/2 radians with a parameter in the interval interval 0 0 t t 1. 1.
SLERP – Spherical Linear Interpolation In the general case, position vectors In the general case, position vectors rr00 and and rr11 are are
not orthogonal and we want to interpolate between not orthogonal and we want to interpolate between 0 and 0 and some angle some angle . .
SLERP – Spherical Linear Interpolation The general SLERP The general SLERP
Formula is derived as follows:Formula is derived as follows:
Quaternion SLERP
Instead of vectors we can plug in unit quaternion Instead of vectors we can plug in unit quaternion to interpolate unit quaternion at parametric angles:to interpolate unit quaternion at parametric angles:
Where:Where:
Parametric Curves Any 2D curve can be projected in 3D space onto a Any 2D curve can be projected in 3D space onto a
parametric plane:parametric plane:
Parametric Curves Similarly, in polar coordinates where Similarly, in polar coordinates where f(f()) define define
radius length: radius length:
Or in cylindrical space (in this case, an elliptic Or in cylindrical space (in this case, an elliptic spiral):spiral):
Bezier Curves However, some parametric curves can be However, some parametric curves can be
inflexible and difficult to design. inflexible and difficult to design. Ideally, we would like to construct curves in a Ideally, we would like to construct curves in a
predictable way from some fixed points.predictable way from some fixed points. We could join points with LERPs to form a We could join points with LERPs to form a
piecewise curve:piecewise curve:
Bezier Curves
But, the curve is not But, the curve is not
smooth:smooth: Bezier curves can be Bezier curves can be
constructed as a recursive system of LERPs (De constructed as a recursive system of LERPs (De Casteljau's algorithm). For example: Casteljau's algorithm). For example:
Bezier Curves
Bezier Curves The general form of Bezier curves follows a binomial The general form of Bezier curves follows a binomial
expansion pattern:expansion pattern:
Inverse Bezier Let us assume we want a cubic Bezier curve: Let us assume we want a cubic Bezier curve:
That interpolates points That interpolates points pp11 and and pp22 at times at times tt11 and and tt22
respectively (remember, the ends are fixed):respectively (remember, the ends are fixed):
We solve for control points We solve for control points rr11 and and rr22, by finding , by finding
the inverse of the matrix:the inverse of the matrix:
Catmull-Rom Spline
Using Tangents like this, curves can be joined with C1 continuity.
Cubic B-Splines With B-Splines, continuity is always one degree With B-Splines, continuity is always one degree
lower than the degree of each curve piece. lower than the degree of each curve piece. Therefore, a cubic B-Spline has continuity CTherefore, a cubic B-Spline has continuity C22. The . The following curve connects pfollowing curve connects pii to p to pi+1i+1, for 0, for 0t t 1: 1:
Cubic B-Splines do not interpolate their end Cubic B-Splines do not interpolate their end points.points.
Cubic B-Splines
In general, a B-Spline can be defined as follows In general, a B-Spline can be defined as follows (the (the ttii are called are called knotsknots):):
Bezier Surfaces Bezier curves can be extended to surfaces on unit Bezier curves can be extended to surfaces on unit
squares.squares.
B-Spline Surfaces