cubic-to-hybrid-quadratic
function cubicToHybridQuadratic(ps: number[][]): [[number, number], [[number, number], [number, number]], [number, number]]
Defined in transformation/degree-or-type/cubic-to-hybrid-quadratic.ts:20
Returns the hybrid quadratic version of the given cubic bezier. For a definition of hybrid quadratic bezier curves please see this article
returns an array of three quadratic bezier points where the middle point is a 'hybrid' point represented as a line (itself represented by two points (a linear bezier curve)) that can be evaluated at a different
t
value (call itth
). If evaluated at the same t value the result is the same as evaluating the original cubic bezier att
.the length of the linear bezier curve mentioned above is a measure of how closely the cubic can be represented as a quadratic bezier curve.
Note!
Green circles are draggable!
Parameters:
Name | Type | Description |
---|---|---|
ps | number[][] | a cubic bezier curve given as an ordered array of its control point coordinates, e.g. [[0,0], [1,1], [2,1], [2,0]] |