unit-tangent
function unitTangent(ps: number[][], t: number): number[] | undefined
Defined in local-properties-at-t/tangent/double/unit-tangent.ts:17
Returns the unit tangent vector of an order 0,1,2 or 3 bezier curve at a
specific given parameter value t.
- 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, e.g. [[0,0],[1,1],[2,1],[2,0]] |
t | number | the t parameter |