Package icyllis.arc3d.engine.tessellate

# Class WangsFormula

java.lang.Object
icyllis.arc3d.engine.tessellate.WangsFormula

public class WangsFormula extends Object
Wang's formula specifies a depth D to which it is sufficient to subdivide a given degree N Bézier curve in order to ensure that the control points of each new segment lie on a straight line to within some pre-specified tolerance EPS:

      M = max([length( p[i+2] - 2p[i+1] + p[i] ) for (0 ≤ i ≤ n-2)])
      D = log4( N*(N-1)*M / (8*EPS) )

Wang, Guo-Zhao (1984), The subdivision method for finding the intersection between two Bézier curves or surfaces, Zhejiang University Journal.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `WangsFormula()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static float`
  `cubic(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)`
  `static int`
  `cubic_log2(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)`
  `static float`
  `cubic_p4(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)`
  `static float`
  `quadratic(float precision, float x0, float y0, float x1, float y1, float x2, float y2)`
  `static int`
  `quadratic_log2(float precision, float x0, float y0, float x1, float y1, float x2, float y2)`
  `static float`
  `quadratic_p4(float precision, float x0, float y0, float x1, float y1, float x2, float y2)`
  `static float`
  `worst_cubic(float precision, float devWidth, float devHeight)`
  `static int`
  `worst_cubic_log2(float precision, float devWidth, float devHeight)`
  `static float`
  `worst_cubic_p4(float precision, float devWidth, float devHeight)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### WangsFormula

    protected WangsFormula()

- ## Method Details

  - ### quadratic_p4

    public static float quadratic_p4(float precision, float x0, float y0, float x1, float y1, float x2, float y2)

  - ### quadratic

    public static float quadratic(float precision, float x0, float y0, float x1, float y1, float x2, float y2)

  - ### quadratic_log2

    public static int quadratic_log2(float precision, float x0, float y0, float x1, float y1, float x2, float y2)

  - ### cubic_p4

    public static float cubic_p4(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)

  - ### cubic

    public static float cubic(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)

  - ### cubic_log2

    public static int cubic_log2(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)

  - ### worst_cubic_p4

    public static float worst_cubic_p4(float precision, float devWidth, float devHeight)

  - ### worst_cubic

    public static float worst_cubic(float precision, float devWidth, float devHeight)

  - ### worst_cubic_log2

    public static int worst_cubic_log2(float precision, float devWidth, float devHeight)