bezierBy

fun bezierBy(heading1: Vector2, heading2: Vector2, delta: Vector2): PolygonBuilder

Draw a bezier curve using relative values. A bezier curve is defined by the start and end points A and B, as well as control points B and C (which the line does NOT pass through).

A = previous point
B = previousPoint + heading1
C = D - heading2
D = A + delta

Parameters

heading1

The heading of the first control point from the previous point

heading2

The heading of the second control point from the end point

delta

The position of the end point relative to the previous point