struct

PF2d::Bezier::Cubic(T)

Inherits PF2d::Bezier::Curve < Struct < Value < Object

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Constructors

new(p1 : PF2d::Vec2(T), p2 : PF2d::Vec2(T), p3 : PF2d::Vec2(T), p4 : PF2d::Vec2(T))
Source

Class methods

cube_root(x : Number)
Source
derivative(t : Float64, p1 : Number, p2 : Number, p3 : Number, p4 : Number)

The derivative represents the rate of change of the interpolation at t

Source
extrema(p1 : Number, p2 : Number, p3 : Number, p4 : Number, &)

Find the values that lie at the extrema of the function, i.e. where the rate of change is 0 these points are typically at the edges of a 2d curve

Source
interpolate(t : Float64, p1 : Number, p2 : Number, p3 : Number, p4 : Number)

Find the value at t along the curve (between 0.0 and 1.0)

Source
roots(p1 : Number, p2 : Number, p3 : Number, p4 : Number, &)

Solves roots so that t = 0

Source
second_derivative(t : Float64, p1 : Number, p2 : Number, p3 : Number, p4 : Number)
Source

Instance methods

control_points
Source
p1=(p1 : Vec2(T))
Source
p2=(p2 : Vec2(T))
Source
p3=(p3 : Vec2(T))
Source
p4=(p4 : Vec2(T))
Source
point_pointers
Source
points
Source
split(t : Float64)

Split this curve into two curves at t

Source
to_f

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_f32

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_f64

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_i

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_i128

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_i16

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_i32

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_i64

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_i8

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_quads

Split this cubic curve into two quadratic curves

Source
to_u

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_u128

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_u16

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_u32

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_u64

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source
to_u8

Cubic bezier is a type of spline segment with 4 control points. The curve intersects points 0 and 3, while points 1 and 2 control the curve

For information on the implementation see https://pomax.github.io/bezierinfo

Source