You are on page 1of 16

The stability of intersection points of

curves and surfaces


by
Andrew Williams
Supervisor: Dr Joab Winkler
May 2010
1
Abstract
The numerical stability of the intersection points of curves and surfaces is
investigated. Where the equation of a curve does not have an exact solution
therefore this means the curve can contain some perturbation. This report
considers the numerical condition of a point on a curve that contains per-
turbation, and therefore the stability of the intersection between two curves.
Examples are presented of where self-intersection, cusps, and isolated points
can occur. The report extends the numerical condition of a point on a curve
to the point on the surface and therefore to the intersection point of three
surfaces.
Keywords: Numerical condition, curves and surface, perturbation
2
Contents
Abstract 2
1 Introduction 4
2 Research Background 4
3 Project Description 6
3.1 Points of intersection for singular curve points . . . . . . . . . 8
3.2 The stability of the intersection point of two curves . . . . . . 8
3.3 Algebraic linear approach . . . . . . . . . . . . . . . . . . . . 11
3.4 Numerical condition of a point on a surface . . . . . . . . . . 11
3.5 Numerical condition of the intersection point of three surfaces 12
4 Aim 13
5 Design 13
5.1 Intersections of one bivariate polynomial . . . . . . . . . . . . 13
5.2 Intersection of two bivariate polynomials . . . . . . . . . . . 13
5.3 Intersection of a bivariate polynomial and a surface . . . . . . 13
5.4 Intersection of 3 Surfaces . . . . . . . . . . . . . . . . . . . . 13
6 Summary 14
7 Work Plan 14
References 14
3
1 Introduction
The aim of this project is the development of a suite of MATLAB programs
that enable the stability of intersection points of curves and surfaces to be
plotted. Important calculations can then be made from these plots. This
project involves programming with bivariate polynomials (curves).
The stability of intersections between curves and surfaces relates to the
perturbation theory. Every point on a bivariate polynomial (curve), where
the equation of the curve does not have an exact solution therefore means
that each point has some perturbation. The perturbation theory consists of
the mathematical methods which are then used when a problem(equation)
cannot be solved precisely. Instead we can begin with the exact solution
from a related problem, therefore an approximate solution is found. The
perturbation theory is only appropriate if the problem(equation) can be
built if we add a small term to the mathematical explanation of a related
problem that can be solved exactly.
The use of curves and surfaces are extensively im many dierent elds
such as computer aided design and manufacture, computer aided geometric
design, computer graphics, robotics and computer animation. In computer
graphics and solid modelling systems, the intersection between two solid
objects become the intersections of curves and quadric surfaces, where al-
gorithms used depend on the underlying representation scheme. when there
is an intersection between two quadric surfaces, this then can be calcu-
lated by using methods such as matrix algebra and parametric equations.
[Xiao-xia et al. 2006] uses polynomial equations to compute the intersec-
tions of quadric curves and quadric surfaces because using the cross-iteration
method has numerical instabilities which gives problems with the accuracy
of the solution. The algorithm produced by [Xiao-xia et al. 2006] can then
be used to increase the stability of the intersection of between curves and
surfaces.
2 Research Background
The requirement for intensive calculation during the processing of curves
and surfaces strenghens the question concerning the numerical stability of
the equations and algorithms applied.
[Nagaska, 2007] discuss variations of factors of a polynomial when its
coeceints are perturbed slightly, by using polynomial 2-norm to measure
these perturbations. [Nagaska, 2007] give a lower bound of perturbations
needed for changing a given polynomial reducible, giving a numerical anal-
ysis.
[Bini and Marco, 2006] proposes a new approach and new algorithm for
calculating the intersection of two plane curves. [Bini and Marco, 2006] uses
4
the Ehrlich-Aberth iteration complemented with some computational tools.
For an algebraic algorithm, when calculating the intersection of two
curves, the following steps are required. Step one is to compute the implicit
equation f(x, y) = 0 for the rst curve, this is known as the implicitization
step. The second step is to insert the parameterization of the second curve
into f(x, y) = 0 to obtain the rational equation. The third step is a com-
putation of the roots, and the fourth step involves the calculation of the
probable intersection points. The fth and nal step is the inversion step.
Using this method it limits to only curves that are of a small degree, this
is because that solving steps one and two symbolically leads to very large
polynomial coecents.
When the issue of the stability of intersections of curves and surfaces
occurs in computer-aided geometric design systems, [Song et al. 2004] de-
scribes that computer-aided geometric design systems depend mainly on
using polynomial and rational parametric surfaces, these are used to repre-
sent free-form shapes, examples are aircraft wings and ship hulls. However
in certain applications it may not be likely to exactly specify the area of the
surface that is desired. When there are solid models along their curves where
they intersect, it is often essential to trim surface patches. In general it is
not possible to represent the exact intersections for free-form surfaces using
these rational parameterizations.
[Kajiya, 1982] treats the intersection problem by describing an algorithm
which takes use of ray tracing methods to then display bivariate polynomial
surface patches, this is obtained by developing a new intersection algorithm.
This algorithm uses algebraic geometry to obtain numerical procedure which
nds the intersection between the ray and the patch. [Kajiya, 1982] focuses
on how to handle silhouette edges that appear and dissappear.
The use of parametric curves and surfaces for designing geometric objects
is used in most geometric and solid modelling systems. A recurring operation
in solid modelling is evaluating the intersection of two rational parametric
surfaces. The numerical stability of the intersection point is a key problem
and it is believed that any good surface intersection technique has to balance
the goals of accuracy, robustness and eciency. [Manocha and Canny, 2004]
present a novel representation for the surface intersection problem. They use
results from linear algebra and numerical analysis to produce eecnt and nu-
merically accurate algorithms for curve intersection. [Manocha and Canny, 2004]
express the algebraic set as a matrix determinant, which is more compact
and ecient representation.
The self-intersection when dealing with freeform curves and surfaces is
an important problem in the integration of geometric and solid modelling
systems. Some papers look into the approach of elimination of the self-
intersections found in curves and surfaces. [Pekermana et al. 2008] present
several algorithms which are used for self-intersection detection and also can
be used for the elimination of the self-intersection for freeform curves and
5
surfaces. The use of a binomial-line criterion and a algebraic elimination
procedure results in both the local and the global self-intersections being
eliminated.
3 Project Description
A polynomial is described to be an expression of nite length which is
constructed using variables and constants. The expression only uses the
operations, addition, subtraction, multiplication, and non-negative, whole-
number exponents. For example
x
2
3x + 2 (1)
is a polynomial but
x
2

3
x
+ 2x
3
2
(2)
is not, due to the second term contains division by the variable x and due
to the third term uses an exponent that is not a whole number. Each part
which is added, is called a term. These polynomial terms use variables
which are raised to whole number exponents.
x
2
3x + 2 (3)
has 3 terms including the leading term and the constant term. To calculate
the number of terms [Winkler, 2008] states that a polynomial of degree n in
d variables has,
m =
_
n + d
d
_
(4)
terms. A bivariate polynomial is a polynomial in two variables, Bivariate
polynomials have the form f (x,y). A two variable polynomial is called a
bivariate polynomial for example;
f(x, y) = (x
3
+ x
2
y + xy
2
+ y
3
) + (x
2
+ xy + y
2
) + (x + y) + 1 (5)
has two variables x and y, with 10 terms, n=3 and d =2.
The numerical condition of a point on a curve for the bivariate polyno-
mial f(x, y). The curve has the coecients a
k
k = 1, ..., m, with respect to
the basis (x, y) =
k
(x, y), k = 1, ..., m, gives the equation
f(x, y) =
m

k=1
a
k

k
(x, y) (6)
If we consider the possible displacements (x, y) of a point on the curve
f(x,y) due to a perturbation x, (x
0
+ x, y
0
+ y) is assumed to lie on the
6
perturbed curve it must therefore satisfy:
f(x
0
+ x, y
0
+ y) =
m

k=1
a
k

k
(x
0
+ x, y
0
+ y) (7)
If we perform Taylor series expansion about (x
0
, y
0
) on both sides of (7) we
then get:
n

i=0
1
i!
(x
0

x
+y
0

y
)
i
f(x
0
, f
0
) =
m

k=1
a
k
n

k=0
1
i!
(x
0

x
+y
0

y
)
i

k
(x
0
, y
0
),
(8)
if f(x
0
, y
0
) is a regular point of the curve, then f
2
x
+f
2
y
= 0, then at (x
0
, y
0
)
gives:
x
0
f
x
|f|
+ y
0
f
y
|f|
=
1
|f|
m

k=1
a
k

k
(x
0
, y
0
), (9)
[Farouki and Rajan, 1988] Gives an example of both linear perturbation
for a regular point and whole curve. [Farouki and Rajan, 1988] States that
the linear perturbation region for a regular point (x
0
, y
0
) of an algebraic
curve f(x,y)=0, this is because there is a random error of maximum relative
magnitude in a single coecient
r
of the curve in the basis {
k
(x, y)}.
(Fig. 1) [Farouki and Rajan, 1988] Also states that the linear perturbation
region for a whole curve is dened by osetting each regular point of the
curve by an amount
+

C(x, y) n
If n is the unit normal vector to the curve at (x
0
, y
0
),
n = [n
x
n
y
] =
1
|f|
[f
x
f
y
] (10)
If the componentwise error model
|a
k
| |a
k
|, (11)
is used and the perturbation r then putting this into (9) gives
| n.r|
| n.r|
C(x
0
, y
0
) (12)
r = [x
o
y
0
], and f = f(x
0
, y
0
) where
C(x
0
, y
0
) =
1
| n.r||f|
m

k=1
|a
k
||(x
0
, y
0
)| (13)
The result given by (13) is the condition number for the regular point (x
0
, y
0
)
displacement of normal component. When the coecients of the curve (6)
are perturbed, the displaced location of the regular point of the curve lies.
This is within a strip of width C(x
0
, y
0
) on either side of the curve tangent.
For the regular curve point this strip is known as the linear perturbation
region.
7
3.1 Points of intersection for singular curve points
A regular point can be dened by the condition ||f = 0, singular points
refer to the point when the equation does not hold. If f
x
and f
y
both equal
zero but when at least one of f
xx
, f
xy
, f
yy
= 0 at the regular point with
coordinates (x
0
, y
0
), this point is referred to being a double point of the
curve. When a double point occurs, the curve has two tangents with the
directional cosines (, ) are the solutions of equation (14)
f
xx

2
+ 2f
xy
+
2
f
yy
= 0, (14)
depending on the discriminant D [Bruce and Giblin, 1992].
D = f
xx
f
yy
f
2
xy
= 0 (15)
here the double point is called a node and solutions are known as to be
distinct. If D > 0 the tangents are a complex conjugate and the node is
an isolated point. If D < 0 the tangents are real and the node is a self-
intersection. However if D = 0 the tangents coincide and more methods
are needed to analyse [Bruce and Giblin, 1992] this case known as a cusp.
Examples of all three are shown in Fig. 2
[Anderson et al. 1997] Provides computationally manageable conditions
to determine whether a curve or patch self-intersects. [Anderson et al. 1997]
give conditions that allow avoidance of self-intersections, they give limits on
the size of the control-point perturbations so that the perturbed curve or
patch has no self-intersection. These methods refer mainly to computer-
aided geometric design, graphics and animation.
if we consider the possible displacements (x, y) at point on C for which
equation (15) holds and f
x
= f
y
= 0 therefore the retention of the lowest
order terms in (8) gives
f
xx
(x
0
2
) + 2f
xy
x
0
y
0
+ (y
0
)
2
f
yy
=
+

2
m

k=1
a
k

k
(x
0
, y
0
), (16)
The displaced singular point is contained within the perturbation region
bounded by two curves corresponding to whether is larger or smaller than
the singular point.
3.2 The stability of the intersection point of two curves
If we use two parametric curves f(x, y), g(x, y), and we wish to know the
intersection points, such that f(x
0
, y
0
) = g(x
0
, y
0
). Generally there are two
possible approaches to solve such polynomial equations.
1. Algebriac approach, this is using exact arithmetic. It is a very robust
approach but tends to be slow.
2. A numerical approach, this is using approximate calculations that use
machine accuracy. The approach is not very robust.
8
Figure 1: Linear Perturbation Region for a regular point and for a whole
curve
Here I derive an expression for the numerical condition of the intersection
point of two curves, the exact for depends of the nature of the intersection
point whether it is regular or singular nature. if we consider two curves
f(x, y) and g(x, y) both equal to zero,
f(x, y) =
p

k=1
a
k

k
(x, y) (17)
and
g(x, y) =
q

k=1
b
k

k
(x, y) (18)
with the point of intersection of (x
0
, y
0
) and it is assumed that the point is
on both curves then inputting into equation (8) gives
_
f
x
f
y
g
x
g
y
_ _
x
0
y
0
_
=
_
p
k=1
a
k

k
(x, y)

q
k=1
b
k

k
(x, y)
_
(19)
9
Figure 2: Self-Intersection, Cusp and Isolated Points
all functions and their derivatives are evaluated at (x
0
, y
0
). Using the Jaco-
bian J which is the matrix of all rst order partial derivatives, the solution
requires the inversion of a matrix, the solution of this equation is
_
x
0
y
0
_
=
1
J
_
g
y
f
y
g
x
g
x
_ _
p
k=1
a
k

k
(x, y)

q
k=1
b
k

k
(x, y)
_
(20)
the Jacobian J is J = f
x
g
y
f
y
g
x
. Joab [Winkler, 2008] shows that.
||r||
||r||
C(x
0
, y
0
) (21)
and
C(x
0
, y
0
) =
1
|J|||r||

|g|
p

k=1
|a
k

k
| +|f|
q

k=1
|b
k

k
|

(22)
stands for the condition number of the regular point of intersection for the
curves f(x, y) = 0 and g(x, y) = 0 with the coordinates of the points being
(x
0
, y
0
). Extending this for two curves becomes more complicated.
10
3.3 Algebraic linear approach
The numerical stability of the linear algebraic equation must be considered,
because the derivation of the conditional number requires the inversion of
(19).
If we re-write equation (19) as Ar=t, with each letter representing a matrix
respectively. Therefore E{t} = 0, this implies that E{r} also is equal to
zero. Joab [Winkler, 2008] then uses this information to create another
expression which is for the condition number of the point of intersection
between two curves. If
r =
_
||E{rr
T
}||
_1
2
||r||
and t =
_
||E{tt
T
}||
_1
2
||t||
this follows that
r
t
=
||t||
s
2
||S
1
U
T
t||
(23)
3.4 Numerical condition of a point on a surface
The numerical condition of a regular point (x
0
, y
0
, z
0
) on a curve can be
extended to the numerical condition of a regular point on a surface which can
be represented by f(x, y, z) = 0, for example this equation has 3 variables
f(x, y, z) = 3x
2
+ 3y
2
3z
2
1 = 0
f(x, y, z) =
m

k=1
a
k

k
(x, y, z) (24)
The possible displacements of the intersection(x, y, z) for the regular
point on the surface with a perturbation in the single coecient has to
satisfy
f(x + x
0
, y + y
0
z + z
0
) = a
k

k
(x + x
0
, y + y
0
z + z
0
) (25)
Using equation (23), equations (12) and (13) can easily be changed to
accommodate 3 variables.
| n.r|
| n.r|
C(x
0
, y
0
) (26)
r = [x
o
y
0
], and f = f(x
0
, y
0
, z
0
) where
C(x
0
, y
0
, z
0
) =
1
| n.r||f|
m

k=1
|a
k
||(x
0
, y
0
, z
0
)| (27)
therefore equation (14) can also be changed to accommodate 3 variables,
where , , represents the direction cosines, so therefore

2
f
xx
+
2
f
yy
+
2
f
zz
+ 2f
xy
+ 2f
xz
+ 2f
yz
= 0 (28)
11
The higher and lower bounds of the perturbation region in the area of the
double point is dened by:
(x)
2
f
xx
+(y)
2
f
yy
+(z)
2
f
zz
+2xyf
xy
+2xzf
xz
+2yzf
yz
=
+

2
m

k=0
|a
k

k
(x
0
, y
0
, z
0
)|
(29)
The left hand side of the equation (27) can be diagonlised by a rotation
which eliminates the cross terms. The nature of the singularity is a function
of the matrix M. This is dened below.
M =
_
_
f
xx
f
xy
f
xz
f
xy
f
yy
f
yz
f
xz
f
yz
f
zz
_
_
(30)
3.5 Numerical condition of the intersection point of three
surfaces
The intersection point of two curves can be extended to the intersection
point with coordinates (x
0
, y
0
, z
0
) of three surfaces.
f(x, y, z) =
p

k=1
a
k

k
(x, y, z) (31)
g(x, y, z) =
q

k=1
a
k

k
(x, y, z) (32)
h(x, y, z) =
r

k=1
a
k

k
(x, y, z) (33)
If we simplify things.
r =
_
_
x
0
y
0
z
0
_
_
, p =
_
_

p
k=1
a
k

k
(x
0
, y
0
, z
0
)

q
k=1
a
k

k
(x
0
, y
0
, z
0
)

r
k=1
a
k

k
(x
0
, y
0
, z
0
)
_
_
, (34)
then r = M
1
p = Jp, with the elements of J are J
i,j
, i, j = 1, 2, 3.
[Winkler, 2008] Implements these, substituting the componetwise error model
(11) into the resulting expression yields the upper bound.
||r||
2

2
_
|J
1,1
|
p

k=1
|a
k

k
| +|J
1,2
|
q

k=1
|b
k

k
| +|J
1,3
|
r

k=1
|c
k

k
|
_
2
+
2
_
|J
2,1
|
p

k=1
|a
k

k
| +|J
2,2
|
q

k=1
|b
k

k
| +|J
2,3
|
r

k=1
|c
k

k
|
_
2
+
2
_
|J
3,1
|
p

k=1
|a
k

k
| +|J
3,2
|
q

k=1
|b
k

k
| +|J
3,3
|
r

k=1
|c
k

k
|
_
2
12
4 Aim
The aim of this project is to investigate the numerical stability of the in-
tersection points of bivariate polynomials and surfaces. The project will
analyze the perturbation region of the intersection points of both singular
intersections and multiple intersections.
5 Design
5.1 Intersections of one bivariate polynomial
Firstly I will create a one bivariate polynomial and plot this using matlab.
Next I will add perturbations to the curve and plot the region of perturba-
tions for a single curve of self-intersection. To nd self-intersections of the
bivariate polynomial, an example of calculating the self-intersection point in
MATLAB has been created by Antoni J. Canos, I can use some of the meth-
ods pointed out by Antoni to help analyse when the curve self-intersects and
see how perturbations eect the self-intersection point.
5.2 Intersection of two bivariate polynomials
The rst step is to create another bivariate polynomial that intersects with
the rst curve created. I will then add perturbations to the rst curve and
plot the region where the intersections occur. Next I will add perturbations
to the second curve and plot this region. The nal step will be to plot the
region of the intersection of both curves when perturbations are added.
5.3 Intersection of a bivariate polynomial and a surface
The rst step is to create a surface and plot this using MATLAB. I then use a
curve that I created previously to intersect with with this surface. The next
step is to add perturbations to the curve and plot the intersection region.
Then I shall add perturbations to the surface and plot the intersection region.
The nal step will be to add perturbations to both the curve and the surface
and plot this intersection region.
5.4 Intersection of 3 Surfaces
The rst step is to create two more surfaces and make sure that all 3 surfaces
intersect at one intersection point. The next step is to use perturbation for
all 3 surfaces and then plot this intersection region.
13
6 Summary
I will investigate the stability of the point on a curve and the intersection
points for a singular curve and for when two curves intersect. Further from
this I will investigate the stability of a point on a surface and the intersection
points between a curve and a surface as well as surface to surface intersection.
7 Work Plan
(Fig. 3)
References
[Anderson et al. 1997] Anderson, L. E., Peters, T. J. and Stewart, N. F.,
(1997) Self-intersection of composite curves and surfaces.
[Bini and Marco, 2006] Bini, D. and Marco, A., (2006) Computing curve
intersection by means of simultaneous iterations, Springer Science +
Business Media.
[Bruce and Giblin, 1992] Bruce, J. W. and Giblin, P.J.,(1992) Curves and
Singularities, Press Syndicate of the University of Cambridge, (2).
[Farouki and Rajan, 1988] Farouki, R.T. and Rajan, V.T., (1988) On the
numerical condition of algerbraic curves and surfaces 1. Implicit equa-
tions, Computer Aided Geometric Design, (5), pp. 215-252,
[Kajiya, 1982] Kajiya, J., (1982) Ray Tracing Parametric Patches, Califor-
nia Institute of Technology.
[Manocha and Canny, 2004] MANOCHA, D. and CANNY, J.F., (2004) A
NEW APPROACH FOR SURFACE INTERSECTION, International
Journal of Computational Geometry and Applications 1(4), pp. 491-
516.
[Nagaska, 2007] Nagasaka, K., (2007) Towards Certied Irreducibility Test-
ing of Bivariate Approximate Polynomials, Doctoral Program of Math-
ematics, Univ. of Tsukuba Tsukuba City, Japan.
[Pekermana et al. 2008] Pekermana, D., Elberb, G. and Kimc, M., (2008)
Self-intersection detection and elimination in freeform curves and sur-
faces, Computer-Aided Design 40, pp. 150-159.
[Song et al. 2004] Song, X., Sederberg, T. W., Zheng, J., Farouki, R. and T,
Hass J., (2004) Linear perturbation methods for topologically consis-
tent representations of free-form surface intersections, Computer Aided
Geometric Design 21, pp. 303-319.
14
[Winkler, 2008] Winkler, J., (2008) The numerical condition of an intersec-
tion point of two curves, and the intersection of two surfaces, University
of Sheeld: Department of Computer Science.
[Xiao-xia et al. 2006] Xiao-xia, C., Jun-hai, Y. and Yu-jian, C., (2006) An
Intersection algorithm based on transformation, Mech. Eng. China, (3),
pp. 364-369.
15
Figure 3: Gantt Chart
16