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.
- Source
- Parametric.scala
- Alphabetic
- By Inheritance
- Parametric
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class AngularCurve(f: (Angle) => Point) extends Parametric[Angle] with Product with Serializable
A parametric curve that maps angles to points
- final case class NormalizedCurve(f: (Normalized) => Point) extends Parametric[Normalized] with Product with Serializable
A parametric curve that maps normalized to points
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def circle(radius: Double): AngularCurve
A circle
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def cubicBezier(start: Point, cp1: Point, cp2: Point, end: Point): NormalizedCurve
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hypotrochoid(outerRadius: Double, innerRadius: Double, offset: Double): AngularCurve
A hypotrochoid is the curve sketched out by a point
offsetfrom the centre of a circle of radiusinnerRadiusrolling around the inside of a circle of radiusouterRadius. - def interpolate(points: Seq[Point], tension: Double = 0.5): 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
pointshas less than two elements an emptyPathis returned. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logarithmicSpiral(a: Double, b: Double): AngularCurve
Logarithmic spiral
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def quadraticBezier(start: Point, cp: Point, end: Point): NormalizedCurve
Quadratic bezier curve
- def rose(k: Double, scale: Double = 1.0): AngularCurve
Rose curve
- def sine(amplitude: Double, frequency: Double): AngularCurve
A sinusoid
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()