evaluate
function evaluate(ps: number[][]): (t: number) => number[]
function evaluate(ps: number[][], t: number): number[]
Defined in local-properties-at-t/evaluate/double/evaluate.ts:24
Returns the resulting point of evaluating the given bezier curve at the
given parameter t.
- uses power bases conversion and subsequently Horner's Method to evaluate the polynomial in double precision floating point arithmetic.
- curried: if
tis omitted a function oftis returned instead (the power basis conversion is then only done once which is much faster if the curve is to be evaluated at manytvalues)
The resulting point p is returned as the pair [x,y], where x and y are
double precision floating point numbers.
Note!
Green circles are draggable!
Parameters:
| Name | Type | Description |
|---|---|---|
ps | number[][] | an order 1, 2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]] |
t? | number | the parameter value where the bezier should be evaluated (may be omitted, see above) |