Parametric

doodle.core.Parametric$
See theParametric companion trait
object Parametric

A collection of parametric curves.

A parametric curve is a function from some input---usually a normalized number or an angle---to a Point.

Attributes

Companion:
trait
Source:
Parametric.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

final case class AngularCurve(f: Angle => Point) extends Parametric[Angle]

A parametric curve that maps angles to points

A parametric curve that maps angles to points

Attributes

Source:
Parametric.scala
Graph
Supertypes
trait Product
trait Equals
trait Angle => Point
class Object
trait Matchable
class Any
final case class NormalizedCurve(f: Normalized => Point) extends Parametric[Normalized]

A parametric curve that maps normalized to points

A parametric curve that maps normalized to points

Attributes

Source:
Parametric.scala
Graph
Supertypes
trait Product
trait Equals
trait Normalized => Point
class Object
trait Matchable
class Any

Value members

Concrete methods

def circle(radius: Double): AngularCurve

A circle

A circle

Attributes

Source:
Parametric.scala
def cubicBezier(start: Point, cp1: Point, cp2: Point, end: Point): NormalizedCurve

Attributes

Source:
Parametric.scala
def hypotrochoid(outerRadius: Double, innerRadius: Double, offset: Double): AngularCurve

A hypotrochoid is the curve sketched out by a point offset from the centre of a circle of radius innerRadius rolling around the inside of a circle of radius outerRadius.

A hypotrochoid is the curve sketched out by a point offset from the centre of a circle of radius innerRadius rolling around the inside of a circle of radius outerRadius.

Attributes

Source:
Parametric.scala
def interpolate(points: Seq[Point], tension: Double): NormalizedCurve

Interpolate a spline (a curve) that passes through all the given points, using the Catmul Rom formulation (see, e.g., https://en.wikipedia.org/wiki/Cubic_Hermite_spline)

Interpolate a spline (a curve) that passes through all the given points, using the Catmul Rom formulation (see, e.g., https://en.wikipedia.org/wiki/Cubic_Hermite_spline)

The tension can be changed to control how tightly the curve turns. It defaults to 0.5.

The Catmul Rom algorithm requires a point before and after each pair of points that define the curve. To meet this condition for the first and last points in points, they are repeated.

If points has less than two elements an empty Path is returned.

Attributes

Source:
Parametric.scala

Logarithmic spiral

Logarithmic spiral

Attributes

Source:
Parametric.scala

Quadratic bezier curve

Quadratic bezier curve

Attributes

Source:
Parametric.scala
def rose(k: Double, scale: Double): AngularCurve

Rose curve

Rose curve

Attributes

Source:
Parametric.scala
def sine(amplitude: Double, frequency: Double): AngularCurve

A sinusoid

A sinusoid

Attributes

Source:
Parametric.scala