SIAMGD09

25
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

description

Presetation of a talk given in San Francisco in 2009 http://www.siam.org/meetings/gdspm09/

Transcript of SIAMGD09

Page 1: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Computing the distance of closest approachbetween ellipses and ellipsoids

L. Gonzalez-Vega, G. R. Quintana

Departamento de MATemáticas, EStadística y COmputaciónUniversity of Cantabria, Spain

2009 SIAM/ACM Joint Conference on Geometric andPhysical Modeling, October 5-8, 2009

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 2: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

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

Page 3: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Introduction

The distance of closest approach of two arbitrary separatedellipses (resp. ellipsoids) is the distance among their centerswhen they are externally tangent, after moving them throughthe line joining their centers.

That distance appears when we study the problem ofdetermining the distance of closest approach of hard particleswhich is a key topic in some physical questions like modelingand simulating systems of anisometric particles, such as liquidcrystals, or in the case of interference analysis of molecules.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 4: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Previous work

A description of a method for solving the problem in the case oftwo arbitrary hard ellipses (resp. ellipsoids) can be found in

X. ZHENG, P. PALFFY-MUHORAY, Distance of closestapproach of two arbitrary hard ellipses in two dimensions,Phys. Rev., E 75, 061709, 2007.X. ZHENG, W. IGLESIAS, P. PALFFY-MUHORAY, Distance ofclosest approach of two arbitrary hard ellipsoids, Phys.Rev. E, 79, 057702, 2009.

An analytic expression for that distance is given as a function oftheir orientation relative to the line joining their centers.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 5: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

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

Page 6: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

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 scaling5 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

Page 7: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

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

ellipses5 Rotating the plane until the distance of closest approach of

the ellipses is a maximum6 The distance of closest approach of the ellipsoids is this

maximum distance

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 8: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Previous work

To deal with anisotropic scaling and the inverse transformationinvolves the calculus of the eigenvectors and eigenvalues of thematrix of the transformation.

Our goal is to find when that computation is not required and ifit is, to simplify it. The way in which we do that extends in anatural way the ellipsoids case.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 9: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Our approach

We use the results shown in:

F. ETAYO, L. GONZÁLEZ-VEGA, N. DEL RÍO, A new approach tocharacterizing the relative position of two ellipses depending onone parameter, Computed Aided Geometric Desing 23,324-350, 2006.

W. WANG, R. KRASAUSKAS, Interference analysis of conics andquadrics, Contemporary Math. 334, 25-36,2003.

W. WANG, J. WANG, M. S. KIM, An algebraic condition for theseparation of two ellipsoids, Computer Aided Geometric Desing18, 531-539, 2001.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 10: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Our approach

Following their notation we define

DefinitionLet A and B be two ellipses (resp. ellipsoids) given by the equationsXTAX = 0 and XTBX = 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 theircharacteristic polynomial has two distinct positive roots.

The ellipses (or ellipsoids) touch each other externally if andonly if the characteristic equation has a positive double root.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 11: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Our approach

We use the previous characterization in order to obtain thesolution of the problem.

We give a closed formula for the polynomial S(t) (dependingpolynomially on the ellipse parameters) whose biggest real rootprovides the distance of closest approach:

Ellipses case: d = t0√x20 + y20

Ellipsoids case: d = t0√x20 + y20 + z20

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 12: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

We consider the two coplanar ellipses given by the equations:

E1 ={(x, y) ∈ R2 : a22x

2 + a33y2 + 2a23xy + 2a31x+ 2a32y + a11 = 0

}E2 =

{(x, y) ∈ R2 : b22x

2 + b33y2 + 2b23xy + 2b31x+ 2b32y + b11 = 0

}We change the reference frame in order to have E1 centered at theorigin and E2 centered at (x0, y0) with axis parallel to the coordinateones:

E1 =

{(x, y) ∈ R2 :

(x cos (α) + y sin (α))2

a+

(x sin (α)− y cos (α))2

b= 1

}

E2 =

{(x, y) ∈ R2 :

(x− x0)2

c+

(y − y0)2

d= 1

}

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 13: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

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 ofvariable (x0, y0) = (x0t, y0t). The equation which gives us thesearched value of t, t0, is S(t) = 0 where:

S(t) = discλH(λ) |(x0,y0)=(x0t,y0t)= s4t8 + s3t

6 + s2t4 + s1t

2 + s0

Making T = t2:

S(T ) = s′4T4 + s′3T

3 + s′2T2 + s′1T + s′0

Searched value of t: square root of the biggest real root of S(T )

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 14: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Distance of closest approach of two separated ellipses

TheoremGiven two separated ellipses E1 and E2 the distance of theirclosest approach is given as

d = t0

√x20 + y20

where t0 is the square root of the biggest positive real root ofS(T ) = S(t) |T=t2= (discλH(λ) |(x0,y0)=(x0t,y0t)) |T=t2 , whereH(λ) is the characteristic polynomial of the pencil determinedby them and (x0, y0) is the center of E2.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 15: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Example

Let A and B be the ellipses:

A :=

{(x, y) ∈ R2 :

7

8x2 +

√3

4xy +

5

8y2 = 10

}B :=

{(x, y) ∈ R2 :

1

4x2 − 3

2x+

1

9y2 − 8

9y = −109

36

}

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 16: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Example

Polynomial whose biggest real root gives the square of theinstant T = T0 when the ellipses are tangent:

SBA(T )(T ) =(466271425

16 + 9019725√3)T 4 +

(− 627564237

32 − 169045352

√3)T 3

+(39363189

16

√3 + 690647377

256

)T 2 +

(− 1186083

16

√3− 58434963

128

)T

+ 4499761256

The two real roots of SBA(T )(T ) are:

T0 = 0.5058481537; T1 = 0.07113873679

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 17: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Positions of A (blue) and B(t) (green)

t0 =√T0 t1 =

√T1

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 18: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Let A1 and A2 be the matrices defining the separated ellipsoids E1

and E2 as XTA1X = 0 and XTA2X = 0 where XT = (x, y, z, 1), andA = (aij), B = (bij), i, j = 1..4Change the reference frame to have E1 centered at the origin and E2,at (x0, y0, z0) with axis parallel to the coordinate ones:

E1 =

{(x, y, z) ∈ R3 :

P 2

a2+Q2

b2+R2

c2= 1

}

E2 =

{(x, y, z) ∈ R3 :

(x− x0)2

d2+

(y − y0)2

f2+

(z − z0)2

g2= 1

}where

P = x(ux2 +

(1− ux2

)cos (α)

)+ (uxuy (1− cos (α))− uz sin (α)) y + . . .

Q = (uxuy (1− cos (α)) + uz sin (α))x+ y(uy2 +

(1− uy2

)cos (α)

)+ . . .

R = (uxuz (1− cos (α))− uy sin (α))x+ (uyuz (1− cos (α)) + ux sin (α)) y + . . .

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 19: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

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 ofvariable (x0, y0, z0) = (x0t, y0t, z0t). The equation which gives us thesearched value of t, t0, is S(t) = 0 where:

S(t) = discλH(λ) |(x0t,y0t,z0t)= s6t12+s5t

10+s4t8+s3t

6+s2t4+s1t

2+s0

Making T = t2:

S(T ) = s′6t6 + s′5t

5 + s′4T4 + s′3T

3 + s′2T2 + s′1T + s′0

Searched value of t: square root of the biggest real root of S(T )

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 20: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Distance of closest approach of two ellipsoids

TheoremGiven two separated ellipsoids E1 and E2 the distance of theirclosest approach is given as

d = t0

√x20 + y20 + z20

where t0 is the square root of the biggest positive real root ofS(T ) = S(t) |T=t2= (discλH(λ) |(x0t,y0t,z0t)) |T=t2 , where H(λ)is the characteristic polynomial of the pencil determined bythem and (x0, y0, z0) is the center of E2.

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 21: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Example

Let A (blue) and B (green) be the ellipsoids:

A :=

{(x, y, z) ∈ R3

:1

4x2+

1

2y2+ z

2= 1

}

B :=

{(x, y, z) ∈ R3

:1

5x2 − 2 x +

1

4y2 − 3 y +

1

2z2 − 5 z = −

51

2

}

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 22: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Example

Polynomial whose biggest real root gives the square of theinstant T = T0 when the ellipsoids are tangent:

SBA(T )(T ) = 16641T 2 (2725362025T 4 − 339879840T 3 + 3362446T 2 − 11232T + 9

)The two real roots of SB

A(T )(T ) are:

T0 = 0.1142222397; T1 = 0.001153709353

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 23: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Positions of A (blue) and B(t) (green)

t0 =√T0 t1 =

√T1

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 24: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Ellipses case:Basic configuration:

Compute the eigenvectors of a 2x2 matrixCompute the real roots of a 4-degree polynomial

Other configurations: roots of a 8-degree polynomialEllipsoids case:

Basic configuration:Compute the eigenvectors of a 3x3 matrixCompute the real roots roots of a 6-degree polynomial

Other configurations: roots of a 12-degree polynomial

L. Gonzalez-Vega, G. R. Quintana GDSPM09

Page 25: SIAMGD09

ProblemDistance of closest approach of two ellipses

Distance of closest approach of two ellipsoidsConclusions

Thank you!

L. Gonzalez-Vega, G. R. Quintana GDSPM09