openrndr / org.openrndr.math / bezier

bezier

fun bezier(x0: Double, c0: Double, x1: Double, t: Double): Double (source)
fun bezier(x0: Vector2, c0: Vector2, x1: Vector2, t: Double): Vector2 (source)
fun bezier(x0: Vector3, c0: Vector3, x1: Vector3, t: Double): Vector3 (source)
fun bezier(x0: Double, c0: Double, c1: Double, x1: Double, t: Double): Double (source)
fun bezier(x0: Vector2, c0: Vector2, c1: Vector2, x1: Vector2, t: Double): Vector2 (source)
fun <T : LinearType<T>> bezier(x0: T, c0: T, x1: T, t: Double): T (source)
fun <T : LinearType<T>> bezier(x0: T, c0: T, c1: T, x1: T, t: Double): T (source) fun bezier(x0: Vector3, c0: Vector3, c1: Vector3, x1: Vector3, t: Double): Vector3 (source)

Samples a single point on a 3d Bezier curve

Parameters

x0 - start point of the curve

c0 - first control point

c1 - second control point

x1 - end point of the curve

t - 0,1

Return
a sample on the curve