Prev: W4, Next: W6, Quiz of the week: Q5
Links: Zoom, TopHat (223815), Calculator:
Slide:

# Smoothness of Curves

📗 Smoothness of curves are usually defined by whether there are abrupt changes.
➭ Breaks or gaps.
➭ Corners.
➭ Changes in higher derivatives.
📗 Mathematically, continuity at a point at \(u\) is defined as the \(\lim_{x \to  u^{-}} f\left(x\right) = f\left(u\right) = \lim_{x \to  u^{+}} f\left(x\right)\).

# Parametric vs Geometric Continuity

📗 A curve is \(C\left(n\right)\) continuous if all derivatives up to \(n\) match.
➭ \(C\left(0\right)\) if \(f\left(u\right)\) is continuous.
➭ \(C\left(1\right)\) if \(f'\left(u\right)\) is continuous.
➭ \(C\left(2\right)\) if \(f''\left(u\right)\) is continuous.
📗 A curve is \(G\left(n\right)\) continuous if the directions of the derivatives match.
➭ \(G\left(0\right)\) if there are no gaps.
➭ \(G\left(1\right)\) if there are no corners.
➭ \(G\left(2\right)\) if the curve looks smooth.
📗 \(C\left(n\right)\) continuity depends on the parameterization of a curve.
📗 \(G\left(n\right)\) continuity only depends on the curve, not its parameterization.



# Polynomial Fit

📗 Given \(n\) points, to find a polynomial curve that passes through all the points, a polynomial of degree \(n - 1\) is needed.
➭ The coefficients are hard to compute (regression).
➭ The curve is hard to control.
➭ There can be unwanted wiggles.
➭ The resulting curve is \(C\left(\infty\right)\).
📗 Alternative 1: piecewise linear interpolation.
➭ The line segments are easy to control and predict.
➭ Only \(C\left(0\right)\).
📗 Alternative 2: piecewise polynomials (Hermite spline): Wikipedia.
➭ Connect the curves so that \(p'_{1}\) of the first segment is the same as \(p'_{0}\) of the second segment.
➭ This uses Hermite form polynomial.
➭ It requires specifying the derivatives at every point.
➭ The result is \(C\left(1\right)\).
📗 Alternative 3: piecewise polynomials (Cardinal spline): Wikipedia.
➭ Compute the derivative using the previous and next control points, meaning \(p'_{0} = s \left(p_{1} - p_{-1}\right)\) and \(p'_{1} = s \left(p_{2} - p_{0}\right)\), where \(s\) specifies the tension.
➭ When \(s = \dfrac{1}{2}\), the resulting spline is called Catmull-Rom spline.
➭ This works for closed loop too. Try this in Workbook 5.
➭ The result is \(C\left(1\right)\).

# Hermit Spline [TopHat]

📗 The curve is not \(C\left(1\right)\) or \(G\left(1\right)\).
📗 Change the derivatives so that the resulting curve is \(C\left(1\right)\).
📗 Change the derivatives so that the resulting curve is \(G\left(1\right)\) but not \(C\left(1\right)\).
Demo curve_tangent_too



# Cardinal Catmull-Rom Spline [TopHat]

📗 Catmull-Rom splines have \(p'_{0} = \dfrac{1}{2} \left(p_{1} - p_{-1}\right)\) and \(p'_{1} = \dfrac{1}{2} \left(p_{2} - p_{0}\right)\) for every curve segment connecting \(p_{0}\) and \(p_{1}\) and use the previous \(p_{-1}\) and next control \(p_{2}\) control points to compute the derivatives at \(p_{0}\) and \(p_{1}\). Try this in Workbook 5 and Project 1.
Demo cardinal

# Chaikin's Algorithm

📗 Another subdivision curve that does not interpolate the control points is the B-spline (basis spline): Wikipedia.
📗 Chaikin's corner cutting algorithm can be used and the limit curve is a (uniform) quadratic B-spline.
📗 Quadratic B-spline can also be written in the form \(f\left(u\right) = \dfrac{1}{2} \left(1 - u\right)^{2} p_{1} + \left(-u^{2} + u + \dfrac{1}{2}\right) p_{2} + \dfrac{1}{2} u^{2} p_{3}\) (see Workbook readings for more details).
📗 Quadratic B-spline is \(C\left(1\right)\).
Demo cut_corner

# B Splines

📗 Cubic B-spline is \(C\left(2\right)\) and can be written as \(f\left(u\right) = \dfrac{1}{6} \left(-u^{3} + 3 u^{2} - 3 u + 1\right) p_{1} + \dfrac{1}{6} \left(3 u^{3} - 6 u^{2} + 4\right) p_{2} + \dfrac{1}{6} \left(-3 u^{3} + 3 u^{2} + 3 u + 1\right) p_{3} + \dfrac{1}{6} u^{3} p_{4}\) (see Workbook readings for more details).
📗 Cubic B-spline can be converted into Bezier curves with different control points \(\dfrac{1}{6} \left(p_{1} + 4 p_{2} + p_{3}\right)\), \(\dfrac{1}{3} \left(2 p_{2} + p_{3}\right)\), \(\dfrac{1}{3} \left(p_{2} + 2 p_{3}\right)\), \(\dfrac{1}{6} \left(p_{2} + 4 p_{3} + p_{4}\right)\): Wikipedia.
📗 In general, a degree n B-spline is \(C\left(n - 1\right)\).



# Arc Length Parameterization

📗 Parameterization with \(u\) in the Hermite form is also called the natural parameterization.
📗 Changing \(u\) at a constant speed does not move \(f\left(u\right)\) along the curve at a constant speed.
📗 Arc-length parameterization is a reparameterization of a curve so that changing the parameter \(t\) at a constant speed moves \(f\left(u\right)\) along the curve at a constant speed.
➭ Analytically computing the arc-length parameterization is difficult.
➭ It can be approximated numerically by making a table of points with distances between them.

# Distance Table [TopHat]

📗 Given the following curve, find the point that divides the curve into two parts with equal arc length.
Demo arc_length

# Lecture Summary

📗 Curve continuity.
📗 Polynomial fit.
📗 Hermite and Cardinal splines.
📗 Chaikin algorithm.
📗 B splines.
📗 Arc length parameterization.



# Midterm Exam Format

📗 March 6 from 5:45 to 7:15 in Social Sciences 6210 or online with Honorlock (Form).
📗 30 "select-multiple" multiple-choice questions.
📗 Notes on paper are allowed. Calculators are allowed. Other devices are not allowed (in particular, cannot use your phone as calculator).
📗 Questions are similar to weekly surveys (QS1-QS5) and past exams including: Piazza.
➭ 2023 Exam 1: A1-A8, B1-B5, B7-B8, C1, C5-C9
➭ 2022 Exam 1: A1-A5, A7-A8, B3-B5, B7, B9, C1-C9
➭ 2021 Exam 1: A1-A9, B2-B7
➭ 2020 Midterm: Q20-Q36, Q39-Q43
➭ 2019 Midterm: Q6-Q25, Q31-Q39
📗 Questions on past exams that will not be on this midterm:
➭ 2023 Exam 1: B6, C2-C4
➭ 2022 Exam 1: A6, B1-B2, B6, B8
➭ 2021 Exam 1: A10, B1, B8-B10
➭ 2020 Midterm: Q1-Q19, Q36-Q38
➭ 2019 Midterm: Q1-Q5, Q26-Q30
📗 Review session March 3 Sunday and March 5 Tuesday.


📗 Notes and code adapted from the course taught by Professor Michael Gleicher.
📗 Please use Ctrl+F5 or Shift+F5 or Shift+Command+R or Incognito mode or Private Browsing to refresh the cached JavaScript: Code.
📗 You can print the notes: .
📗 Anonymous feedback can be submitted to: Form.

Prev: W4, Next: W6, Quiz of the week: Q5





Last Updated: May 07, 2024 at 12:22 AM