The document discusses computing the distance of closest approach between ellipses and ellipsoids. It summarizes previous work that used transformations to reduce the problem to distances between a circle and ellipse. The authors propose a new approach using the characteristic polynomial of the pencil determined by the ellipses/ellipsoids. They provide a closed formula for the distance as the square root of the largest real root of a polynomial depending on the ellipse/ellipsoid parameters. Examples are given for computing distances between two ellipses and two ellipsoids.
Distance of Closest Approach Between Ellipses and Ellipsoids
1. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Computing the distance of closest approach
between ellipses and ellipsoids
L. Gonzalez-Vega, G. R. Quintana
Departamento de MATemáticas, EStadística y COmputación
University of Cantabria, Spain
2009 SIAM/ACM Joint Conference on Geometric and
Physical Modeling, October 5-8, 2009
L. Gonzalez-Vega, G. R. Quintana GDSPM09
2. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Contents
1 Problem
2 Distance of closest approach of two ellipses
3 Distance of closest approach of two ellipsoids
4 Conclusions
L. Gonzalez-Vega, G. R. Quintana GDSPM09
3. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Introduction
The distance of closest approach of two arbitrary separated
ellipses (resp. ellipsoids) is the distance among their centers
when they are externally tangent, after moving them through
the line joining their centers.
That distance appears when we study the problem of
determining the distance of closest approach of hard particles
which is a key topic in some physical questions like modeling
and simulating systems of anisometric particles, such as liquid
crystals, or in the case of interference analysis of molecules.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
4. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Previous work
A description of a method for solving the problem in the case of
two arbitrary hard ellipses (resp. ellipsoids) can be found in
X. Z HENG , P. PALFFY-M UHORAY, Distance of closest
approach of two arbitrary hard ellipses in two dimensions,
Phys. Rev., E 75, 061709, 2007.
X. Z HENG , W. I GLESIAS , P. PALFFY-M UHORAY, Distance of
closest approach of two arbitrary hard ellipsoids, Phys.
Rev. E, 79, 057702, 2009.
An analytic expression for that distance is given as a function of
their orientation relative to the line joining their centers.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
5. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Previous work (Zheng,Palffy-Muhoray)
Ellipses case:
1 Two ellipses initially distant are given.
2 One ellipse is translated toward the other along the line
joining their centers until they are externally tangent.
3 PROBLEM: to find the distance d between the centers at
that time.
4 Transformation of the two tangent ellipses into a circle and
an ellipse.
5 Determination of the distance d of closest approach of the
circle and the ellipse.
6 Determination of the distance d of closest approach of the
initial ellipses by inverse transformation.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
6. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Previous work (Zheng,Palffy-Muhoray)
Ellipses case:
1 Two ellipses initially distant are given.
2 One ellipse is translated toward the other along the line
joining their centers until they are externally tangent.
3 PROBLEM: to find the distance d between the centers at
that time.
4 Transformation of the two tangent ellipses into a circle and
an ellipse. ⇒ Anisotropic scaling
5 Determination of the distance d of closest approach of the
circle and the ellipse.
6 Determination of the distance d of closest approach of the
initial ellipses by inverse transformation.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
7. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Previous work (Zheng,Iglesias,Palffy-Muhoray)
Ellipsoids case:
1 Two ellipsoids initially distant are given.
2 Plane containing the line joining the centers of the two
ellipsoids.
3 Equations of the ellipses formed by the intersection of this
plane and the ellipsoids.
4 Determining the distance of closest approach of the
ellipses
5 Rotating the plane until the distance of closest approach of
the ellipses is a maximum
6 The distance of closest approach of the ellipsoids is this
maximum distance
L. Gonzalez-Vega, G. R. Quintana GDSPM09
8. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Previous work
To deal with anisotropic scaling and the inverse transformation
involves the calculus of the eigenvectors and eigenvalues of the
matrix of the transformation.
Our goal is to find when that computation is not required and if
it is, to simplify it. The way in which we do that extends in a
natural way the ellipsoids case.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
9. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Our approach
We use the results shown in:
F. E TAYO, L. G ONZÁLEZ -V EGA , N. DEL R ÍO, A new approach to
characterizing the relative position of two ellipses depending on
one parameter, Computed Aided Geometric Desing 23,
324-350, 2006.
W. WANG , R. K RASAUSKAS, Interference analysis of conics and
quadrics, Contemporary Math. 334, 25-36,2003.
W. WANG , J. WANG , M. S. K IM, An algebraic condition for the
separation of two ellipsoids, Computer Aided Geometric Desing
18, 531-539, 2001.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
10. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Our approach
Following their notation we define
Definition
Let A and B be two ellipses (resp. ellipsoids) given by the equations
X T AX = 0 and X T BX = 0 respectively, the degree three (resp.
four) polynomial
f (λ) = det(λA + B)
is called the characteristic polynomial of the pencil λA + B
Two ellipses (or ellipsoids) are separated if and only if their
characteristic polynomial has two distinct positive roots.
The ellipses (or ellipsoids) touch each other externally if and
only if the characteristic equation has a positive double root.
L. Gonzalez-Vega, G. R. Quintana GDSPM09
11. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Our approach
We use the previous characterization in order to obtain the
solution of the problem.
We give a closed formula for the polynomial S(t) (depending
polynomially on the ellipse parameters) whose biggest real root
provides the distance of closest approach:
Ellipses case: d = t0 x 2 + y0
0
2
Ellipsoids case: d = t0 x 2 + y0 + z0
0
2 2
L. Gonzalez-Vega, G. R. Quintana GDSPM09
12. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
We consider the two coplanar ellipses given by the equations:
E1 = (x, y) ∈ R2 : a22 x2 + a33 y 2 + 2a23 xy + 2a31 x + 2a32 y + a11 = 0
E2 = (x, y) ∈ R2 : b22 x2 + b33 y 2 + 2b23 xy + 2b31 x + 2b32 y + b11 = 0
We change the reference frame in order to have E1 centered at the
origin and E2 centered at (x0 , y0 ) with axis parallel to the coordinate
ones:
(x cos (α) + y sin (α))2 (x sin (α) − y cos (α))2
E1 = (x, y) ∈ R2 : + =1
a b
(x − x0 )2 (y − y0 )2
E2 = (x, y) ∈ R2 : + =1
c d
L. Gonzalez-Vega, G. R. Quintana GDSPM09
13. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Let A1 and A2 be the matrices associated to E1 and E2 .
Characteristic polynomial of the pencil λA2 + A1 :
H(λ) = det(λA2 + A1 ) = h3 λ3 + h2 λ2 + h1 λ + h0
Compute the discriminant of H(λ), and introduce the change of
variable (x0 , y0 ) = (x0 t, y0 t). The equation which gives us the
searched value of t, t0 , is S(t) = 0 where:
S(t) = discλ H(λ) |(x0 ,y0 )=(x0 t,y0 t) = s4 t8 + s3 t6 + s2 t4 + s1 t2 + s0
Making T = t2 :
S(T ) = s4 T 4 + s3 T 3 + s2 T 2 + s1 T + s0
Searched value of t: square root of the biggest real root of S(T )
L. Gonzalez-Vega, G. R. Quintana GDSPM09
14. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Distance of closest approach of two separated ellipses
Theorem
Given two separated ellipses E1 and E2 the distance of their
closest approach is given as
d = t0 x 2 + y0
0
2
where t0 is the square root of the biggest positive real root of
S(T ) = S(t) |T =t2 = (discλ H(λ) |(x0 ,y0 )=(x0 t,y0 t) ) |T =t2 , where
H(λ) is the characteristic polynomial of the pencil determined
by them and (x0 , y0 ) is the center of E2 .
L. Gonzalez-Vega, G. R. Quintana GDSPM09
15. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Example
Let A and B be the ellipses:
√
2 7 2 3 5
A := (x, y) ∈ R : x + xy + y 2 = 10
8 4 8
1 2 3 1 8 109
B := (x, y) ∈ R2 : x − x + y2 − y = −
4 2 9 9 36
L. Gonzalez-Vega, G. R. Quintana GDSPM09
16. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Example
Polynomial whose biggest real root gives the square of the
instant T = T0 when the ellipses are tangent:
466271425
√ √
B
SA(T ) (T ) = + 9019725 3 T 4 + − 627564237 − 16904535 3 T 3
16 √ 32 √ 2
+ 39363189 3 + 690647377 T 2 + − 1186083
16 256 16 3 − 58434963 T
128
+ 4499761
256
B
The two real roots of SA(T ) (T ) are:
T0 = 0.5058481537; T1 = 0.07113873679
L. Gonzalez-Vega, G. R. Quintana GDSPM09
17. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Positions of A (blue) and B(t) (green)
t0 = T0 t1 = T1
L. Gonzalez-Vega, G. R. Quintana GDSPM09
18. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Let A1 and A2 be the matrices defining the separated ellipsoids E1
and E2 as X T A1 X = 0 and X T A2 X = 0 where X T = (x, y, z, 1), and
A = (aij ), B = (bij ), i, j = 1..4
Change the reference frame to have E1 centered at the origin and E2 ,
at (x0 , y0 , z0 ) with axis parallel to the coordinate ones:
P2 Q2 R2
E1 = (x, y, z) ∈ R3 : + 2 + 2 =1
a2 b c
(x − x0 )2 (y − y0 )2 (z − z0 )2
E2 = (x, y, z) ∈ R3 : 2
+ 2
+ =1
d f g2
where
P = x ux2 + 1 − ux 2 cos (α) + (ux uy (1 − cos (α)) − uz sin (α)) y + . . .
Q = (ux uy (1 − cos (α)) + uz sin (α)) x + y uy 2 + 1 − uy 2 cos (α) + . . .
R = (ux uz (1 − cos (α)) − uy sin (α)) x + (uyuz (1 − cos (α)) + ux sin (α)) y + . . .
L. Gonzalez-Vega, G. R. Quintana GDSPM09
19. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Characteristic polynomial of the pencil λA2 + A1 :
H(λ) = det(λA2 + A1 ) = h4 λ4 + h3 λ3 + h2 λ2 + h1 λ + h0
Compute the discriminant of H(λ), and introduce the change of
variable (x0 , y0 , z0 ) = (x0 t, y0 t, z0 t). The equation which gives us the
searched value of t, t0 , is S(t) = 0 where:
S(t) = discλ H(λ) |(x0 t,y0 t,z0 t) = s6 t12 +s5 t10 +s4 t8 +s3 t6 +s2 t4 +s1 t2 +s0
Making T = t2 :
S(T ) = s6 t6 + s5 t5 + s4 T 4 + s3 T 3 + s2 T 2 + s1 T + s0
Searched value of t: square root of the biggest real root of S(T )
L. Gonzalez-Vega, G. R. Quintana GDSPM09
20. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Distance of closest approach of two ellipsoids
Theorem
Given two separated ellipsoids E1 and E2 the distance of their
closest approach is given as
d = t0 x 2 + y0 + z0
0
2 2
where t0 is the square root of the biggest positive real root of
S(T ) = S(t) |T =t2 = (discλ H(λ) |(x0 t,y0 t,z0 t) ) |T =t2 , where H(λ)
is the characteristic polynomial of the pencil determined by
them and (x0 , y0 , z0 ) is the center of E2 .
L. Gonzalez-Vega, G. R. Quintana GDSPM09
21. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Example
Let A (blue) and B (green) be the ellipsoids:
3 1 2 1 2 2
A := (x, y, z) ∈ R : x + y +z =1
4 2
3 1 2 1 2 1 2 51
B := (x, y, z) ∈ R : x − 2x + y − 3y + z − 5z = −
5 4 2 2
L. Gonzalez-Vega, G. R. Quintana GDSPM09
22. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Example
Polynomial whose biggest real root gives the square of the
instant T = T0 when the ellipsoids are tangent:
SA(T ) (T ) = 16641 T 2 2725362025 T 4 − 339879840 T 3 + 3362446 T 2 − 11232 T + 9
B
B
The two real roots of SA(T ) (T ) are:
T0 = 0.1142222397; T1 = 0.001153709353
L. Gonzalez-Vega, G. R. Quintana GDSPM09
23. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Positions of A (blue) and B(t) (green)
t0 = T0 t1 = T1
L. Gonzalez-Vega, G. R. Quintana GDSPM09
24. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Ellipses case:
Basic configuration:
Compute the eigenvectors of a 2x2 matrix
Compute the real roots of a 4-degree polynomial
Other configurations: roots of a 8-degree polynomial
Ellipsoids case:
Basic configuration:
Compute the eigenvectors of a 3x3 matrix
Compute the real roots roots of a 6-degree polynomial
Other configurations: roots of a 12-degree polynomial
L. Gonzalez-Vega, G. R. Quintana GDSPM09
25. Problem
Distance of closest approach of two ellipses
Distance of closest approach of two ellipsoids
Conclusions
Thank you!
L. Gonzalez-Vega, G. R. Quintana GDSPM09