Bezier Curves, cubic Hermite splines
Bezier curves are used in computer graphics to draw shapes, for CSS animation and in many other places. Links: https://javascript.info/bezier-curve, Bezier game, khan academy on linear and Bezier interpolation in animation
15 flashcards · Computer Science · by lakesare
How does the Bezier curve order relate to the number of points?
For two points we have a linear curve (that’s a straight line), for three points – quadratic curve (parabolic), for four points – cubic curve. 2 points curve (=> linear): 3 points curve (=> quadratic/parabolic): 4 points curve (cubic): As the algorithm is recursive, we can build Bezier curves of any order, that is: using 5, 6 or more control points. But in practice many points are less useful. Usually we take 2-3 points, and for complex lines glue several curves together. That’s simpler to deve…
What's a convex hull?
The convex hull of a set of N points is the smallest perimeter fence enclosing the points.
What's the value of bezier curves for intersection tests?
A Bezier curve is always inside the convex hull of control points: Which means we can check convex hulls for a fast negative result! If convex hulls do not intersect, then curves do not either. So checking for the convex hulls intersection first can give a very fast “no intersection” result. Checking the intersection or convex hulls is much easier, because they are rectangles, triangles and so on (see the picture above), much simpler figures than the curve.
Visualize how this Bezier curve is built.
0.2
1
Explain this formula: What is α? What is P(tk-1)? What is P(tk)?
α - interpolation parameter, moves linearly between 0 and 1. P(tk-1) - point A, the position P(t) started from. P(tk) - point B, the position P(t) ended in. Linear interpolation between two positions P(tk−1) and P(tk), as time t moves between tk−1 and tk, the interpolation parameter α moves linearly between 0 and 1.
What does cspline stand for?
Cubic Spline
Write parametric equation of a line in a scalar form:
How to guarantee smoothness between 2 Bezier curves?
last control point of A, last point of A, and first control point of B have to be on a straight line. Quadratic and cubic Bézier curves are most common. Higher degree curves are more computationally expensive to evaluate. When more complex shapes are needed, low order Bézier curves are patched together, producing a Bézier spline. A Bézier spline is commonly referred to as a "path" in vector graphics standards (like SVG) and vector graphics programs (like Adobe Illustrator, CorelDraw and Inkscap…
What is polynomial interpolation?
Interpolation of a given data set by the polynomial of lowest possible degree that passes through all points of the dataset.
What's a spline?
A chain of several polynomials of a lower degree.
Explain this theorem.
This theorem can be viewed as a generalization of the well-known fact that 2 points uniquely determine a straight line, 3 points uniquely determine the graph of a quadratic polynomial, 4 points uniquely determine the graph of a cubic polynomial, and so on. Two caveats:(1) the points are required to have different x-coordinates, and(2) the "quadratic polynomial" might actually be a linear or constant polynomial, the "cubic polynomial" might actually be a quadratic, linear, or constant polynomial…
What's the difference between polynomial interpolation VS splines?
polynomial interpolation - tries to find a single formula to fit all points splines - tries to connect many cubic formulas
If we have 3 points, what will the formula for the polynomial that goes through them look like?
y = a0 + a1x + a2x2 A polynomial that goes through 3 points will have a degree of 2. So we have 3 formulas, and 3 unknowns (a0, a1, and a2).