vsketch.curves#

Overview#

Function#

cubic_bezier_path(x1, y1, x2, y2, x3, y3, x4, y4, detail)

Compute a piece-wise linear path approximating a quadratic bezier. Length of individual

cubic_bezier_point(x1, y1, x2, y2, x3, y3, x4, y4, t)

Evaluate a bezier curve at a given point, based on t in [0, 1].

cubic_bezier_tangent(x1, y1, x2, y2, x3, y3, x4, y4, t)

Evaluate a bezier curve at a given point, based on t in [0, 1].

Functions#

vsketch.curves.cubic_bezier_path(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, x4: float, y4: float, detail: float) numpy.ndarray#

Compute a piece-wise linear path approximating a quadratic bezier. Length of individual segments is close to but never greater than detail.

vsketch.curves.cubic_bezier_point(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, x4: float, y4: float, t: float) tuple[float, float]#

Evaluate a bezier curve at a given point, based on t in [0, 1].

vsketch.curves.cubic_bezier_tangent(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, x4: float, y4: float, t: float) tuple[float, float]#

Evaluate a bezier curve at a given point, based on t in [0, 1].