Skip to main content

to-power-basis-dd

function toPowerBasisDd(ps: number[][]): number[][][]

Defined in to-power-basis/to-power-basis/double-double/to-power-basis-dd.ts:27

Returns the power basis representation of a bezier curve of order cubic or less.

  • intermediate calculations are done in double-double precision
  • returns the power basis x and y coordinate polynomials from highest power to lowest, e.g. if x(t) = at^3 + bt^2 + ct + d and y(t) = et^3 + ft^2 + gt + h then the result is returned as [[a,b,c,d],[e,f,g,h]], where the a,b,c,... are in double-double precision

Parameters:

NameTypeDescription
psnumber[][]an order 0,1,2 or 3 bezier curve given by an ordered array of its control points, e.g. [[0,0],[1,1],[2,1],[2,0]]