Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "cubic-closest-point"

Index

Functions

Const closestPointCubic

  • closestPointCubic(p: ReadonlyVec, a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, d: ReadonlyVec, out?: Vec, res?: undefined | number, iter?: undefined | number, eps?: undefined | number): Vec
  • Performs recursive search for closest point to p on cubic curve defined by control points a,b,c,d. The res and recur params are used to control the recursion behavior. If eps is given, the search is terminated as soon as a point with a shorter squared distance than eps is found.

    {@link @thi.ng/math#minError}

    Parameters

    • p: ReadonlyVec

      query point

    • a: ReadonlyVec

      control point 1

    • b: ReadonlyVec

      control point 2

    • c: ReadonlyVec

      control point 3

    • d: ReadonlyVec

      control point 4

    • Default value out: Vec = []
    • Optional res: undefined | number

      search steps per iteration

    • Optional iter: undefined | number

      iterations

    • Optional eps: undefined | number

      epsilon value

    Returns Vec

Generated using TypeDoc