We can present planar curves parametrically or implicitly. There exist some efficient methods to render several families of parametric curves, but implicit curves are difficult to render. This paper introduced an algorithm to render implicit curves and surfaces with constant width and handle sigular points correctly.
The algorithm introduced by this paper can be divided into two major parts; Recursive subdivision and test for zero.
With the idea of recursive subdivision, we first looking at the original square as a low-resolution pixel, discarding pixels not cut by the curve, and subdividing those that might be cut. The dividing process will continue until the resolution reach our expectation - usually, it is a physical pixel for display.
The test for zero algorithm, also known as intersection test, is used to
compute whether the algebraic curve Z(f) defined by polynomial of two
variables f(x,y) intersects the box B((u,v),s)={(x,y):max{|x-u|,|y-v|
Following is a brief description of the algorithm:
f(x,y) = f'(x-u, y-v)
Then we can concentrate on finding a sufficient condition for the polynomial equation not to have zero in the box
B((0,0),s) = {(x,y):||(x,y)||
We can assume that f(0,0)!=0, because otherwise the curve is passing the
center of the box.
ForAll s>0 for ForAll (x,y) belongs to B((0,0),s):|f(x,y)| >= F(s)
Clearly, if s smaller than the first positive solution of F (if any), the polynomial does not have zero in B((0,0),s)
f(x,y) = SumOf f(degree 1) + SumOf f(degree 2) ... SumOf f(degree d)
apply the triangular inequality
f(x,y) >= |f(degree 0)| - SumOf |f(degree 1..d)|
Consider each one which sum the same degree terms
|SumOf f(degree h)| <= SumOf |f(degree h)| ...ABS(SUM) <= SUM(ABS) <= SumOf |coefficient of f(degree h)| . max{|xy|} <= Fh(zh)
where max{|xy|} - is the maximum of xy for all degree of x + degree of y = h
Fh - Sum of the coefficients of terms of f(x,y) with hdegree h h = degree of x + degree of y
zh - z with degree h
f(x,y) >= F(z)
We can replace z by s (half size of box), because z is between 0 to s.
To compute the intersection of curve with box, we only have to evaluate F(z), if the recult is positive, the curve is out side of the box.
F(s) = |f(degree 0)| - SumOf |f(degree 1..d)|
where |f(degree 0)| is the only item which can made the F(s) positive, thus decide the curve outside of the box. by removing the absolute operation from it, we may got all points inside the curve instead of the shell of curve only. If it is true, the results of two curves can be combined by boolean operations to generate more complicate results. In my implementation, I had done it and seems that it works.
cllin@cs.WPI.EDU