1 / 20

This Week

This Week. Short Course in: Mathematics and Analytic Geometry. Week 9 Curves. LERP – Linear Interpolation. Given two position vectors r 1 and r 2 , a linear interpolation is a straight line joining their respective points P 1 and P 2. LERP – Linear Interpolation.

gella
Download Presentation

This Week

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. This Week

  2. Short Course in: Mathematics and Analytic Geometry Week 9Curves

  3. LERP – Linear Interpolation • Given two position vectors r1 and r2, a linear interpolation is a straight line joining their respective points P1 and P2.

  4. LERP – Linear Interpolation • Oh! But, hang on a minute! LERP is just the line equation defined in the interval: 0  t  1:

  5. SLERP – Spherical Linear Interpolation • SLERP is an extension on LERP to the case of a curve interpolation on a spheroid. • In the most simplest case, we have two orthogonal unit position vectors r0 and r1 and we interpolate between 0 and π/2 radians with a parameter in the interval 0  t  1.

  6. SLERP – Spherical Linear Interpolation • In the general case, position vectors r0 and r1 are not orthogonal and we want to interpolate between 0 and some angle .

  7. SLERP – Spherical Linear Interpolation • The general SLERP Formula is derived as follows:

  8. Quaternion SLERP • Instead of vectors we can plug in unit quaternion to interpolate unit quaternion at parametric angles: • Where:

  9. Parametric Curves • Any 2D curve can be projected in 3D space onto a parametric plane:

  10. Parametric Curves • Similarly, in polar coordinates where f() define radius length: • Or in cylindrical space (in this case, an elliptic spiral):

  11. Bezier Curves • However, some parametric curves can be inflexible and difficult to design. • Ideally, we would like to construct curves in a predictable way from some fixed points. • We could join points with LERPs to form a piecewise curve:

  12. Bezier Curves • But, the curve is not smooth: • Bezier curves can be constructed as a recursive system of LERPs (De Casteljau's algorithm). For example:

  13. Bezier Curves

  14. Bezier Curves • The general form of Bezier curves follows a binomial expansion pattern:

  15. Inverse Bezier • Let us assume we want a cubic Bezier curve: • That interpolates points p1 and p2 at times t1 and t2 respectively (remember, the ends are fixed): • We solve for control points r1 and r2, by finding the inverse of the matrix:

  16. Catmull-Rom Spline Using Tangents like this, curves can be joined with C1 continuity.

  17. Cubic B-Splines • With B-Splines, continuity is always one degree lower than the degree of each curve piece. Therefore, a cubic B-Spline has continuity C2. The following curve connects pi to pi+1, for 0t 1: • Cubic B-Splines do not interpolate their end points.

  18. Cubic B-Splines • In general, a B-Spline can be defined as follows (the ti are called knots):

  19. Bezier Surfaces • Bezier curves can be extended to surfaces on unit squares.

  20. B-Spline Surfaces

More Related