Bezier2

object Bezier2(source)

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun curve(p0: Vec2, p1: Vec2): Line2

Constructs a line segment between two 2D points.

Creates a quadratic Bézier curve defined by three control points.

fun curve(p0: Vec2, p1: Vec2, p2: Vec2, p3: Vec2): Curve2

Creates a cubic Bézier curve defined by four control points.

Link copied to clipboard

Computes the signed distance from a point p to a line defined by two points a and b. The sign of the distance indicates on which side of the line the point p resides.