abstract struct PF2d::Bezier::Curve(T)

Direct Known Subclasses

Defined in:

pf2d/bezier.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def at(t : Float64) : Vec2(T) #

Get the point at percentage t < 0 < 1 of the curve


[View source]
abstract def control_points : Tuple(Vec2(T), Vec2(T)) #

[View source]
def extrema(&) #

Get the points at the extrema of this curve


[View source]
def horizontal_intersects(y, &) #

The points at which a line at y intercepts the curve


[View source]
def initialize #

[View source]
def length(steps : UInt32 = 10) #

Get the length of the curve by calculating the length of line segments Increase steps for accuracy


[View source]
def normal(t : Float64) #

Get the normal to a point at t < 0 < 1 on the spline


[View source]
abstract def points #

[View source]
def rect #

[View source]
def tangent(t : Float64) #

Get the tangent to a point at t < 0 < 1 on the spline


[View source]
def x_values #

[View source]
def y_values #

[View source]