babylon.quarks - v1.0.0
    Preparing search index...

    Class Bezier

    A one-dimensional cubic Bézier over [0, 1], from its four control values: p[0] at t = 0, p[3] at t = 1, and p[1], p[2] shaping the slope at either end.

    Index
    • Parameters

      • p1: number
      • p2: number
      • p3: number
      • p4: number

      Returns Bezier

    p: number[]

    The four control values.

    • A copy with the same control values.

      Returns Bezier

    • Sets the inner control values so the slope is d0 at t = 0 and d1 at t = 1, keeping the end values.

      Parameters

      • d0: number
      • d1: number

      Returns void

    • The control values of each derivative of the polynomial with the control values points: the first derivative's, then the second's, and so on.

      Parameters

      • points: number[]

      Returns number[][]

    • The curve's value at t.

      Parameters

      • t: number

      Returns number

    • The curve's slope (first derivative) at t.

      Parameters

      • t: number

      Returns number

    • The de Casteljau construction at t: the four control values, then the three, two and one interpolated values of each step, ten in all; the last is the value at t.

      Parameters

      • t: number

      Returns number[]

    • Splits the curve at t into two curves that trace it exactly: left over [0, t] and right over [t, 1], each reparametrized to [0, 1], with the construction in span.

      Parameters

      • t: number

      Returns BezierSplit

    • The JSON form, the control values as p0 … p3.

      Returns BezierJSON