Returns the parameter values at which lineSegment intersects this shape.
See also intersectsLineSegment
Returns true if and only if the given point is contained within this shape.
epsilon is a small number used to counteract floating point error. Thus, if
point is within epsilon of the inside of this shape, containsPoint may also
return true.
The default implementation relies on signedDistance.
Subclasses may override this method to provide a more efficient implementation.
Protectedgetpoints at which this shape intersects the given lineSegment.
If this is a closed shape, returns points where the given lineSegment intersects
the boundary of this.
the normal vector to this curve at t.
Computes the signed distance function for this shape.
Divides this shape into two separate shapes at parameter value .
Represents a 2D Bézier curve.
Example:
import { QuadraticBezier, Vec2 } from '@js-draw/math'; const startPoint = Vec2.of(4, 3); const controlPoint = Vec2.of(1, 1); const endPoint = Vec2.of(1, 3); const curve = new QuadraticBezier( startPoint, controlPoint, endPoint, ); console.log('Curve:', curve);Note: Some Bézier operations internally use the
bezier-jslibrary.