Package icyllis.arc3d.granite.tessellate
Class WangsFormula
java.lang.Object
icyllis.arc3d.granite.tessellate.WangsFormula
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic floatcubic(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) static intcubic_log2(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) static floatcubic_p4(float precision, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) static floatquadratic(float precision, float x0, float y0, float x1, float y1, float x2, float y2) static intquadratic_log2(float precision, float x0, float y0, float x1, float y1, float x2, float y2) static floatquadratic_p4(float precision, float x0, float y0, float x1, float y1, float x2, float y2) static floatworst_cubic(float precision, float devWidth, float devHeight) static intworst_cubic_log2(float precision, float devWidth, float devHeight) static floatworst_cubic_p4(float precision, float devWidth, float devHeight)
-
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)
-