Classdesc

A HobbyCurve/HobbyPath calculation class: compute a set of optimal cubic Bézier curves from a sequence of vertices.

Requires

CubicBezierCurve

Requires

Vertex

Constructors

Properties

vertices: Vertex[]

Member

vertices

Memberof

HobbyPath

Instance

utils: {
    normalize: ((vec) => Vertex);
    rho: ((a, b) => number);
    rotate: ((vert, sin, cos) => Vertex);
    rotateAngle: ((vert, alpha) => Vertex);
    sherman: ((a, b, c, d, s, t) => number[]);
    thomas: ((a, b, c, d) => number[]);
} = ...

Type declaration

  • normalize: ((vec) => Vertex)
  • rho: ((a, b) => number)
      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

  • rotate: ((vert, sin, cos) => Vertex)
  • rotateAngle: ((vert, alpha) => Vertex)
  • sherman: ((a, b, c, d, s, t) => number[])
      • (a, b, c, d, s, t): number[]
      • Parameters

        • a: number[]
        • b: number[]
        • c: number[]
        • d: number[]
        • s: number
        • t: number

        Returns number[]

  • thomas: ((a, b, c, d) => number[])
      • (a, b, c, d): number[]
      • Parameters

        • a: number[]
        • b: number[]
        • c: number[]
        • d: number[]

        Returns number[]

Methods

  • Computes the control point coordinates for a Hobby curve through the points given.

    Parameters

    • Optional circular: boolean

      If true, then the path will be closed.

    • Optional omega: number

      The 'curl' or the path.

    Returns IControlPoints

    An object with two members: startControlPoints and endControlPoints (Array).

    Name

    hobbyControls

    Memberof

    HobbyPath

    Instance