Rastering Algebraic Curves and Surfaces

Cheng-Ling Lin, WPI CS Department


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:

  1. Translating the origin to (u,v), that is

    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.

  2. Construct a polynomial of one variable F(z) whose coefficients are functions of coefficients of f such that F(0) = |f(0,0)| > 0 and

    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)

  3. Rewrite the curve equation f(x,y) as a sum of homogeneous terms, that is put all terms together if they have same degree.

    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

  4. Then we got our boundary polynimial equation F(z) with

    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.


  1. The paper has another section extend the algorithm to support Desingularization, we did't go through it.
  2. The same algorithm can be extend to 3D curves and surfaces easily, just adding Z value into the polynomial equations.
  3. Not prove yet, but for the evaluation equation

    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.


Paper from IEEE Computer Graphics and Applications 1994-03, by Gabriel Taubin, IBM T.J. Waston Research Center.

[Return to CS563 '95 talks list]