tangent
function tangent(ps: number[][]): (t: number) => number[]
function tangent(ps: number[][], t: number): number[]
Defined in local-properties-at-t/tangent/double/tangent.ts:21
Returns the tangent vector (not necessarily of unit length) of an
order 0,1,2 or 3 bezier curve at a specific given parameter value t, i.e.
returns the [x,y] value of the once differentiated (with respect to t)
bezier curve's power basis when evaluated at t.
- alias: evaluate1stDerivative
- 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 tangent 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, e.g. [[0,0],[1,1],[2,1],[2,0]] |
t? | number | the t parameter (may be omitted, see above) |