You are on page 1of 8

Proceedings of ISCIS 1999, Kuşadası, Turkey, pp.

916-923

CONVERSIONS BETWEEN PARAMETRIC and


IMPLICIT FORMS
for
COMPUTER GRAPHICS and VISION
* Cem ÜNSALAN ** Aytül ERÇĐL
*Boğaziçi University, Dept. of Electrical & Electronics Engineering
unsalan@boun.edu.tr
**Boğaziçi University, Dept. of Industrial Engineering
ercil@boun.edu.tr

ABSTRACT: Since parametric and implicit forms have complementary advantages with
respect to certain geometric operations, it can be useful to convert from one form to the
other. A new method based on polar/spherical coordinate representations is introduced to
convert parametric form of a curve to a corresponding implicit form and vice versa.
Keywords: Curves in plane, curves in space, parametric form, implicit form,
polar/spherical coordinates

1. Introduction
The development of Computer Aided Graphics Design (CAGD) has seen two
distinct approaches for representing surfaces in 3D space:
1. Parametric methods with a representation of the form (x(u,v),y(u,v), z(u,v)),
which maps a 2D domain containing (u,v) to 3D space.
2. Implicit methods that define a surface as a set of points {(x,y,z) such that
F(x,y,z) = 0}
The use of parametric surfaces has been quite successful for the general
representation and design of free-form surfaces and remains dominant in computer
graphics and geometric modeling. The implicit approach is philosophically more closely
related to the concepts of Constructive Solid Geometry (CSG) and solid modeling and is
receiving increased attention. Implicit surface functions naturally describe the interior of
an object, whereas a parametric description of an object usually consists of piecewise
surface patches. Both approaches have long lists of pros and cons [1]. Although the
parametric formulation is useful for tracing, rendering and surface fitting, many
operations like surface intersection desire one of the surfaces to be represented implicitly.
Moreover, the implicit representation can be used for testing whether a point lies on the
boundary and to represent an object as a semi-algebraic set and implicit forms are finding
wider applications in computer vision, mainly in the area of object recognition [2,3,4,5]
Since parametric and implicit forms have complementary advantages with
respect to certain geometric operations, it can be useful to convert from one form to the
other. Conversion from parametric to implicit form is known as implicitization and every
rational surface and curve can be represented implicitly as the zero set of an irreducible1
homogeneous polynomial f(x,y,z,w)=0 for surfaces, and f(x,y)=0 for 2D curves [6].

1
If a change of variables cannot reduce the degree of the polynomial
expression than it is assumed to be irreducible

0
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

Sederberg [6] applies resultants to eliminate parameters from polynomials; Hoffman [7]
details the use of the Gröbner bases for the same purpose; and Hoffman [8] describes the
Wu-Ritt method. The conversion from implicit to parametric form is known as
parameterization. Parameterization is not always possible, however; for example,
implicit surfaces that are defined by certain polynomials of fourth and higher degree
cannot be parameterized by rational functions [9]. Conversion is always possible for
nondegenerate quadrics and for cubics that have a singular point.
In this paper a new method based on polar coordinate representations in 2D and
spherical coordinate representations in 3D are introduced to convert parametric form to a
corresponding implicit form. Parametric form is represented in polar or spherical
coordinates and conversion is achieved. Also a new method is introduced to covert
implicit form to a corresponding parametric form. In this method polar and spherical
coordinate representations are used.
The layout of the paper is as follows. In section two, conversion from parametric
to implicit form is given for 2D and 3D curves. In section three, conversion from implicit
to parametric form is given for 2D and 3D surfaces. Conclusions are given in section
four.

2. Conversion from Parametric Form to Implicit Form


There are three known techniques for implicitization of parametric forms. All of
these techniques reduce the problem of implicitizing rational surfaces to eliminating two
variables from three parametric equations. In general, it is believed that techniques based
on elimination theory can result in extraneous factors along with the implicit
representation and their separation can be a difficult task. Furthermore, these algorithms
are not able to implicitize parametric surfaces like bicubic patches in a reasonable amount
of time and space [9].
A new method based on polar representation for 2D curves and spherical
representation for 3D surfaces is introduced to convert a parametric form to a
corresponding implicit form in this section. The technique is illustrated with several
examples.

2.1 Conversion in 2D
In this section a method based on polar coordinate transformations will be used
to carry out implicit to parametric conversion in 2D. The method is originated from
defining slope function of a curve in parametric form and equating this form to its
implicit correspondence. Using standard change of variable formulas from rectangular to
polar coordinate representations, implicitization is simply achieved. The following
theorem gives mathematical basis for this conversion method.

Theorem 1: Let α n
be a parametrized curve in R s.t. α : ( a, b) → R n with
α (t ) = (h(t ), g (t )) , where (a, b) is an open interval in R . The implicit representation
of this curve is given as:
−1 y −1 y
h2 ( f ( )) + g 2 ( f ( )) = x 2 + y 2 (1)
x x
g (t )
where f (t ) is an injective function of the form f (t ) =
h (t )

1
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

Proof: See [11]


Example 1: Let h(t ) = sin t and g (t ) = sin t cos t
y
f (t ) = cos t t = cos −1 ( )
x
The corresponding implicit form will be:
y y y
x 2 + y 2 = sin 2 (cos −1 ) + sin 2 (cos −1 ) cos 2 (cos −1 )
x x x
Simplifying this equation will yield: x −x + y =0
4 2 2

The parametric curve for this example is plotted in Figure 1. The corresponding
implicit form obtained using theorem 1 is plotted in Figure 2.
y y
0.5
0.5
0.4
0.4

0.3 0.3

0.2 0.2

0.1 0.1

0 0

-0.1 -0.1

-0.2 -0.2

-0.3 -0.3

-0.4 -0.4

-0.5 x
-0.5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

Figure 1. Plot of the parametric Figure 2. Plot of the implicit curve


of example 2. curve of example 2.

2.2 Conversion in 3D
The method presented in the previous section is applied to curves in 3D in this
section. The difference is that in 3D we will have two slope functions for a space curve.
The same equalities will be used for these two slope functions. Using standard change of
variable formulas from cartesian to spherical coordinate representations, implicitization is
simply achieved. The following theorem gives mathematical basis for this conversion
method.
Theorem 3: Let α be a parametrized space curve in R s.t.
n
α : ( a, b) → R n with
α (t ) = (h(t ), g (t ), k (t )) , where (a, b) is an open interval in R .
The implicit representation of this curve is given as:
y y z
h 2 ( f 1−1 ( )) + g 2 ( f 1−1 ( )) + k 2 ( f 2−1 ( )) = x 2 + y 2 + z 2 (2)
x x x +y
2 2

g (t )
where f 1 (t ) is an injective function of the form f 1 (t ) =
h(t )
k (t )
and f 2 (t ) is an injective function of the form f 2 (t ) =
g 2 (t ) + h 2 (t )
Proof: See [11]
Example 2: If we have a space curve, representing a cylindrical spiral in 3D given as
α (t ) = (h(t ), g (t ), k (t )) .

2
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

h(t ) = a cos t g (t ) = a sin t k (t ) = t


sin t y t az
f 1 (t ) = t = arctan ; f 2 (t ) = t=
cos t x a x2 + y2
x 2 + y 2 + z 2 = a 2 (cos 2 t + sin 2 t ) + t 2
which simplifies to x2 + y2 = a2

3.Conversion from Implicit Form to Parametric Form


In this section, a new method is introduced to convert an implicit form to a
corresponding parametric form. This method basically depends on rewriting implicit
polynomial in polar form for 2D and spherical form in 3D and solving the radius in terms
of angles. For this reason the proposed method is applicable to any degree of
polynomials, where roots of the polynomial can be explicitly obtained in algebraic form.
In this paper, implicit forms up to sum of five successive homogeneous polynomials are
given.

3.1 Conversion in 2D
In this section, conversion from implicit form to parametric form is studied. The
conversion is based on using the polar coordinate representation of the implicit
polynomial.
n k
Theorem 4: A polynomial of the form ∑ a m x m y ( n −m) + ∑ bm x m y ( k − m) = 0 (3)
m=0 m=0
(sum of two homogeneous polynomials) can be converted to parametric form
α (θ ) = ( h(θ ), g (θ )) as:
k

∑b m cos m θ sin ( k − m ) θ
h(θ ) = n − k − m=0
n
cos θ (4)
∑a
m=0
m cos θ sin
m (n−m)
θ
k

∑b m cos m θ sin ( k − m ) θ
g (θ ) = n − k − m=0
n
sin θ (5)
∑a
m =0
m cos θ sin
m ( n−m)
θ
Parameter values to obtain real valued parametric form, specifies parameter range.
Proof: See [11]
In the following examples, implicit forms obtained in section 2.1 are considered.
To show that converted forms correspond to the same parametric curves, suitable
reparametrizations are used for each example.
Example 3: Consider the implicit curve x + y − 3xy = 0
3 3

Substituting the polar to rectangular coordinate conversion formulas for x and y, and
solving for r, we obtain

3
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

(r cos θ ) 3 + (r sin θ ) 3 − 3(r cos θ )(r sin θ ) = 0

3 cos θ sin θ
r=
cos 3 θ + sin 3 θ
3 cos 2 θ sin θ 3 cos θ sin 2 θ
h(θ ) = g (θ ) = θ ∈ [0,2π ]
cos 3 θ + sin 3 θ cos 3 θ + sin 3 θ

If we reparametrize this equation using t = tan θ


3t 3t 2
We obtain h( t ) = g (t ) = which is the same parametric form
1+ t 3 1+ t 2
given in Example 1.

2 n −l
Theorem 5: A polynomial of the form ∑∑a
l =0 m =0
ml xm y ( n −l −m ) = 0 (6)

(three homogeneous polynomials of consecutive degrees) can be converted to two


parametric forms as:
α 1 (t ) = (h1 (t ), g 1 (t )) (7) α 2 (t ) = (h2 (t ), g 2 (t )) (8)

− p − p 2 − 4sq − p − p 2 − 4sq
h1 (θ ) = cos θ (9) g 1 (θ ) = sin θ (10)
2s 2s
− p + p 2 − 4 sq − p + p 2 − 4 sq
h2 (θ ) = cosθ (11) g 2 (θ ) = sin θ (12)
2s 2s
where
n n −1
s = ∑ a m 0 cos m θ sin ( n − m ) θ (13) p = ∑a m1 cos m θ sin ( n −1− m ) θ (14)
m=0 m=0
n−2
q = ∑ a m 2 cos m θ sin ( n − 2− m ) θ (15)
m =0
Parameter values to obtain real valued parametric form, specifies parameter range.
Proof: See [11]
Example 4: x + y − 2 x − 2 y + 1 = 0
2 2

r 2 − 2r (cos θ + sin θ ) + 1 = 0
To find real valued roots of this equation, the following constraint has to be satisfied
 π
4(cos θ + sin θ ) 2 − 4 ≥ 0 which is satisfied for θ ∈ 0, 
 2
The solutions of the above equation are:
r1 = cos θ + sin θ − sin 2θ r2 = cos θ + sin θ + sin 2θ
and the corresponding two parametric curves are obtained as:
h1 (θ ) = r1 cos θ g 1 (θ ) = r1 sin θ

4
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

 π
h2 (θ ) = r2 cos θ g 2 (θ ) = r2 sin θ θ ∈ 0, 
 2
The implicit polynomial form of the curve given in this example is plotted in
Figure 5. Corresponding two parametric forms obtained from theorem 5 are plotted in
Figure 6 and Figure 7.
y
2

1.8

1.6

1.4

1.2

0.8

0.6

0.4

0.2
x
0
0 0.5 1 1.5 2

Figure 5. Plot of the implicit form


of curve given in example 7
y
2

1.8

1.6

1.4
y
1.2
1
1

0.8

0.6

0.4

0.2
x x
0
0 1 0 0.5 1 1.5 2

Figure 6. Plot of the first part of Figure 7. Plot of the second part
parametric curve in example 4 of parametric curve in example 4

3 n−l
Theorem 6: A polynomial of the form ∑∑a
l =0 m =0
ml x m y ( n−l − m) = 0 (16)

(four homogeneous polynomials of consecutive degrees) can be converted to three


parametric forms as:
α 1 (t ) = (h1 (t ), g 1 (t )) (17) α 2 (t ) = (h2 (t ), g 2 (t )) (18)
α 3 (t ) = (h3 (t ), g 3 (t )) h1 (θ ) = ( A + B) cos θ
(19) (20)
A+ B A− B
g 1 (θ ) = ( A + B) sin θ (21) h2 (θ ) = (− + − 3 ) cos θ (22)
2 2
A+ B A− B
g 2 (θ ) = (− + − 3 ) sin θ (23)
2 2
A+ B A− B
h3 (θ ) = (− − − 3 ) cos θ (24)
2 2
A+ B A− B
g 3 (θ ) = (− − − 3 ) sin θ (25) where
2 2

5
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

b b2 a3 b b2 a3
A= − +3 + (26) B= − − 3 + (27)
2 4 27 2 4 27
1 q p2 1 p3 pq u
a = (3 − 2 ) (28) b= (2 3 − 9 2 + 27 ) (29)
3 s s 27 s s s
s, p, q are defined in equations 21 to 23.
n −3
u = ∑ a m 3 cos m θ sin ( n − 3− m) θ (30)
m=0
Parameter values to obtain real valued parametric form, specifies parameter range.
Proof: See[11]
4 n −l
Theorem 7: A polynomial of the form ∑∑a
l =0 m =0
ml xm y ( n −l −m ) = 0 (31)

(five homogeneous polynomials of consecutive degrees) can be converted to four


parametric forms as:
α 1 (t ) = (h1 (t ), g 1 (t )) (32) α 2 (t ) = ( h2 (t ), g 2 (t )) (33)
α 3 (t ) = (h3 (t ), g 3 (t )) (34) α 4 (t ) = (h 4 (t ), g 4 (t )) (35)
p R D p R D
h1 (θ ) = (− + + ) cos θ (36) g 1 (θ ) = ( − + + ) sin θ (37)
4s 2 2 4s 2 2
p R D p R D
h2 (θ ) = (− + − ) cos θ (38) g 2 (θ ) = ( − + − ) sin θ (39)
4s 2 2 4s 2 2
p R E p R E
h3 (θ ) = (− + + ) cos θ (40) g 3 (θ ) = ( − + + ) sin θ (41)
4s 2 2 4s 2 2
p R E p R E
h4 (θ ) = (− + − ) cos θ (42) g 4 (θ ) = ( − + − ) sin θ (43)
4s 2 2 4s 2 2
Let l be any root of the equation
q pu p 2v qv u 2
l 3 − l 2 + ( 2 − 4v )l − 3 + 4 2 − 2 = 0 (44)
s s s s s
p q 3p2 q 4 pqs − 8us 2 − p 3
R= − + l (45) D= −R −2 +
2
(46)
4s s 4s 2 s 4s 3 R
3p2 q 4 pqs − 8us 2 − p 3
E= − R 2
− 2 − (47)
4s 2 s 4s 3 R
s, p, q are defined in equations 21 to 23. u is defined in equation 40.
n−4
v = ∑ a m 4 cos m θ sin ( n − 4 − m ) θ (48)
m=0
Parameter values to obtain real valued parametric form, specifies parameter range.
Proof: See [11]

6
Proceedings of ISCIS 1999, Kuşadası, Turkey, pp. 916-923

3.2 Conversion in 3D
The methods applied in the previous section are also applicable in 3D [11].

4. Conclusions
In this paper, conversion methods between parametric implicit forms of curves
in 2D and 3D are considered. The conversion between these two forms is important
because each form has advantages and disadvantages. Having a conversion formula
between these two forms allow us to use advantages of both forms at the same time.
A new method is introduced to convert a parametric form of a curve to the
corresponding implicit form. The method depends on finding slope function of the curve
in parametric form and implicit form and equating them and using standard change of
variable formulas from cartesian to polar/spherical coordinates. The strength of this
method over existing methods is its simplicity.
Conversion from implicit form to a corresponding parametric form is also
introduced. This conversion method also depends on polar/spherical coordinate
representations and finding roots of radius function. The method is applicable to any
degree of polynomial that roots of the polynomial can be obtained explicitly.
Conversion formulas introduced in this paper are applicable for broad range of
functions in parametric form and implicit form. One main advantage of these two
conversion methods is that, their ease of usage.

References
1. J. Bloomenthal, ed. Introduction to Implicit Surfaces, San Francisco, Morgan
Kaufmann Publishers, Inc., 1995.
2. H. Çivi, C. Christopher, A. Erçil, “The classical theory of invariants and object
recognition using algebraic curves and surfaces” Technical Report FBE-IE-06/97-07,
Boğaziçi University, 1997,
3. M. Hebert, J. Ponce, T. Boult, A. Gross, eds. Object Representation in Computer
Vision. Springer Lecture Notes in Computer Science Series. Springer-Verlag, 1995
4. J. Subrahmonia, D. Cooper, D. Keren, “Practical Reliable Bayesian Recognition of
2D and 3D Objects Using Implicit Polynomials and Algebraic Invariants”Technical
Report LEMS-107. Division of Engineering, Brown University, June 1992.W. H.
Beyer, CRC Standard Mathematical Tables, Florida, CRC Press: 1979
5. G. Taubin and D. B. Cooper, “Recognition and Positioning of 3D Piecewise
Algebraic Objects Using Euclidean Invariants,” IBM Research Division, T.J. Watson
Research Center, 1990.
6. T. W. Sederberg, D. C. Anderson and R. N. Goldman, “Implicit Representation of
Parametric Curves and Surfaces” in Computer Vision, Graphics and Image
Processing, pp. 72-84, Academic Press, 1984.
7. C. Hoffman, Geometric and Solid Modeling: An Introduction, San Francisco,
Morgan Kauffman, 1989.
8. C. Hoffman, "Implicit Curves and Surfaces in Computer-Aided Geometric Design",
IEEE Computer Graphics and Applications, V. 13, No. 1, 1993, pp. 79-88.
9. D. Manocha and J.F. Canny, “Implicit Representation of Rational Parametric
Surfaces”, Journal of Symbolic Computation, Vol. 13, pp. 485-510, 1992.
10. W. H. Beyer, CRC Standard Mathematical Tables, Florida, CRC Press: 1979
11. Ünsalan, C. and Erçil, A. “Conversions between Parametric and Implicit Forms
using Polar/Spherical Coordinate Representations,” Boğaziçi University Research
Report, FBE-IE-09/98-10, 1998

You might also like