Skip to main content

generate-self-intersecting

function generateSelfIntersecting(p0: number[], p1: number[], p2: number[], ts: number[]): number[][]

Defined in create/generate-self-intersecting.ts:15

Returns the cubic bezier curve with given starting, 2nd and 3rd control points such that there is a self-intersection.

  • in-exact: the result may not be exact due to floating point round-off
Note!
Green circles are draggable!
0

Parameters:

NameTypeDescription
p0number[]the bezier's initial control point, e.g. [1,2]
p1number[]the bezier's 2nd control point
p2number[]the bezier's 3rd control point
tsnumber[]the two t values where the self-intersection should occur