unit-normal
function unitNormal(ps: number[][], t: number): number[] | undefined
Defined in local-properties-at-t/normal/double/unit-normal.ts:19
Returns the unit normal vector of a bezier curve at a specific given
parameter value t (the tangent at that point rotated by 90 degrees and
normalized).
- uses double precision calculations internally
- returns
undefinedif the tangent vanishes att(e.g. at a cusp) since the curve has no well-defined direction there
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 |