normal
function normal(ps: number[][]): (t: number) => number[]
function normal(ps: number[][], t: number): number[]
Defined in local-properties-at-t/normal/double/normal.ts:22
Returns a normal vector (not necessarily of unit length) of a bezier curve
at a specific given parameter value t by simply taking the tangent at
that point and rotating it by 90 degrees.
- uses double precision calculations internally
- curried: if
tis omitted a function oftis returned instead (the power basis conversion is then only done once which is much faster if the normal is to be evaluated at manytvalues for the same curve)
Note!
Green circles are draggable!
Parameters:
| Name | Type | Description |
|---|---|---|
ps | number[][] | a linear, quadratic or cubic bezier curve given by its ordered control points, e.g. [[0,0],[1,1],[2,1],[2,0]] |
t? | number | the parameter value where the normal should be evaluated (may be omitted, see above) |