27
Problem Our approach Example Future work Closed formulae for distance functions involving ellipses. F. Etayo 1 , L. González-Vega 1 , G. R. Quintana 1 , W. Wang 2 1 Departamento de Matemáticas, Estadística y Computación Universidad de Cantabria 2 Department of Computer Science University of Hong Kong XI Encuentro de Álgebra Computacional y Aplicaciones, Universidad de Granada 2008 F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

EACA08

Embed Size (px)

DESCRIPTION

Talk I gave at EACA08 in Granada 2008 http://www.ugr.es/~eaca2008/es.php

Citation preview

Page 1: EACA08

ProblemOur approach

ExampleFuture work

Closed formulae for distance functionsinvolving ellipses.

F. Etayo1, L. González-Vega1, G. R. Quintana1, W. Wang2

1Departamento de Matemáticas, Estadística y ComputaciónUniversidad de Cantabria

2Department of Computer ScienceUniversity of Hong Kong

XI Encuentro de Álgebra Computacional y Aplicaciones,Universidad de Granada 2008

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 2: EACA08

ProblemOur approach

ExampleFuture work

Contents

1 Problem

2 Our approach

3 Example

4 Future work

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 3: EACA08

ProblemOur approach

ExampleFuture work

Introduction

We want to compute the distance between two coplanarellipses.

The minimum distance between a given point and one ellipse isa positive algebraic number: our goal is to determine apolynomial with this number as a real root.

That distance does not depend on the footpoint. It gives thedistance directly. We can use this formula for analyzing theEllipses Moving Problem (EMP).

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 4: EACA08

ProblemOur approach

ExampleFuture work

Applications

The EMP is a critical problem in Computer Graphics, withapplications like:

Collision detectionOrbit analysis (non-coplanar ellipses)

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 5: EACA08

ProblemOur approach

ExampleFuture work

Previous works

I. Z. EMIRIS, E. TSIGARIDAS, G. M. TZOUMAS. Thepredicates for the Voronoi diagram of ellipses. Proc. ACMSymp. Comput. Geom., 2006.I. Z. EMIRIS, G. M. TZOUMAS. A Real-time and ExactImplementation of the predicates for the Voronoi Diagramfor parametric ellipses. Proc. ACM Symp. Solid PhysicalModelling, 2007.C. LENNERZ, E. SCHÖMER. Efficient DistanceComputation for Quadratic Curves and Surfaces.Geometric Modelling and Processing Proceedings, 2002.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 6: EACA08

ProblemOur approach

ExampleFuture work

Previous works

J.-K. SEONG, D. E. JOHNSON, E. COHEN. A HigherDimensional Formulation for Robust and InteractiveDistance Queries. Proc. ACM Solid and PhysicalModeling, 2006.K.A. SOHN, B. JÜTTLER, M.S. KIM, W. WANG.Computing the Distance Between Two Surfaces via LineGeometry. Proc. Tenth Pacific Conference on ComputerGraphics and Applications, 236-245, IEEE Press, 2002.

Common aspect: the problem is always solved using footpoints.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 7: EACA08

ProblemOur approach

ExampleFuture work

Our approach

We do not make the minimum distance computation dependingon the foot points. We study the ellipse separation problem byanalyzing the univariate polynomial provided by the distance.

Parameters of our problem: center coordinates, axes length...

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 8: EACA08

ProblemOur approach

ExampleFuture work

Our approach

We do not make the minimum distance computation dependingon the foot points. We study the ellipse separation problem byanalyzing the univariate polynomial provided by the distance.

Parameters of our problem: center coordinates, axes length...Is there any advantage?

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 9: EACA08

ProblemOur approach

ExampleFuture work

Our approach

We do not make the minimum distance computation dependingon the foot points. We study the ellipse separation problem byanalyzing the univariate polynomial provided by the distance.

Parameters of our problem: center coordinates, axes length...Is there any advantage?

Yes: the distance behaves continuously but footpoints don’t.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 10: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

We consider the parametric equations of an ellipse, ε0:

x =√a cos t, y =

√b sin t t ∈ [0, 2π)

in order to construct a function fd which gives the distancebetween a point (x0, y0) and the ellipse:

fd := (x0 −√a cos t)2 + (y0 −

√b sin t)2 − d

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 11: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

We want to solve a system of equations:{fd(t) = 0∂fd∂t (t) = 0

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 12: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

We want to solve a system of equations:{fd(t) = 0∂fd∂t (t) = 0

There are two posibilities:rational change of variablecomplex change of variable

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 13: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

Rational change of variable:

cos t = 1−t21+t2

sin t = 2t1+t2

Disadvantage: more complicated.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 14: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

Rational change of variable:

cos t = 1−t21+t2

sin t = 2t1+t2

Disadvantage: more complicated.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 15: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

Since z = cos t+ i sin t, z = 1z and we can use the complex

change of variable:

sin t = z− 1z

2i

cos t = z+ 1z

2

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 16: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

The new system:

{(b− a)z4 + 2(x0

√a− iy0

√b)z3 − 2(x0

√a+ iy0

√b)z + a− b = 0

(b− a)z4 − 4(x0√a− iy0

√b)z3 − 2(2(x2

0 + y20 − d))z2 + 4(x0√a+ iy0

√b)z + b− a = 0

Using resultants we eliminate the variable z(we also eliminate i).

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 17: EACA08

ProblemOur approach

ExampleFuture work

The distance of a point to an ellipse

TheoremIf d0 is the distance of a point (x0, y0) to the ellipse ε0 withcenter (0, 0) and semiaxes a and b then d = d2

0 is the smallestnonnegative real root of the polynomial

F[x0,y0][a,b] (d) = (a− b)2d4 + 2(a− b)(b2 + 2x2

0b + y20b− 2ay20 − a2 − x2

0a)d3

+(y40b2 − 8y20ba

2 − 6b2a2 + 6a3y20 − 2x20a

3 + a4 + 6x20y

20b

2 − 2y20b3

+6y40a2 + 4x2

0a2b + 2b3a + 6x2

0y20a

2 + 2a3b− 6x40ab + 4y20b

2a

+6x40b

2 + 4x40a

2 + 6b3x20 − 10x2

0y20ab + b4 − 8x2

0ab2 − 6y40ab)d

2

−2(ab4 + y40 − a2b3 + a4b + 2y60a

2 + 2b2x60 − a

3b2 − bx20ay

40

−bx40ay

20 + 3x2

0ay20b

2 + 3x20a

2y20b− by60a + b2y40x

20 + 3x4

0b3

+3y40a3 + x2

0b4 + x4

0a2y20 − bx

60a− 5x4

0ab2 + 3b2y20x

40 + 3y40ab

2

−2x20a

3u20 + 3x4

0a2b + 3x2

0b2y20 − 2x2

0ab3 − 2y20a

3b− 3y20ab3

−3x20a

3b− 2x20b

3y20 − 5y40a2b + 4x2

0a2b2 + 4y20a

2b2)d

+(x40 + 2x2

0b + b2 − 2x20a− 2ba + a2 + y40 + 2x2

0y20 − 2y20b + 2ay20)·

(bx20 + ay20 − ba)

2 =∑4

k=0 h[a,b]k

(x0, y0)dk

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 18: EACA08

ProblemOur approach

ExampleFuture work

Remarks to the theorem

The biggest real root of F [x0,y0][a,b] (d) is the square of the

maximum distance between (x0, y0) and the points in ε0.If x0 is a focus of ε0

F[√a−b,0]

[a,b](d) = (a− b)2d2(d2 + 2(b− 2a)d+ b2)

⇒ d = (√a−√a− b)2, (

√a+√a− b)2

In the case of a circumference a = b = R2 and ifd = d2

0

F[√

a−b,0][a,b] (d20) = R4(y20 + x2

0)2(d20 + 2Rd0 + R2 − y20 − x20)(d20 − 2Rd0 + R2 − y20 − x

20)

⇒ d0 = |R−√y20 + x2

0|

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 19: EACA08

ProblemOur approach

ExampleFuture work

The distance between two ellipses

Let ε1 be an ellipse disjoint with ε0, presented by theparametrization x = α(s), y = β(s), s ∈ [0, 2π). Then

d(ε0, ε1) = min{√

(x1 − x0)2 + (y1 − y0)2 : (x0, y0) ∈ ε0, (x1, y1) ∈ ε1}

is the square root of the smallest nonnegative real root ofthe family of univariate polynomials F

α(s),β(s)a,b (d).

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 20: EACA08

ProblemOur approach

ExampleFuture work

The distance between two ellipses

In order to determine d(ε0, ε1) we are analyzing two posibilities:d is determined as the smallest positive real number s.t.there exist s ∈ [0, 2π) solving F

[α(s),β(s)][a,b]

=∑4k=0 h

[a,b]k (α(s), β(s))dk = 0

F̄[α(s),β(s)][a,b]

:=∑4k=0

∂∂sh[a,b]k (α(s), β(s))dk = 0

d is determined by analyzing the implicit curveF

[α(s),β(s)][a,b] = 0.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 21: EACA08

ProblemOur approach

ExampleFuture work

First case

Since α(s) and β(s) are linear forms on cos(s) and sin(s) thisquestion is converted into an algebraic problem in the sameway we have proceeded in the case point-ellipse, by performingthe change of variable

cos s =12

(w +

1w

), sin s =

12i

(w − 1

w

)and then using resultants to eliminate w.We obtain a univariate polynomial of degree 60, Gε1ε0 , whosesmallest positive real root is the square of d(ε0, ε1).Gε1ε0 depends polynomially on the parameters of ε0 and ε1.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 22: EACA08

ProblemOur approach

ExampleFuture work

Second case

d is determined by analyzing the implicit curve F [α(s),β(s)][a,b] = 0 in

the region d ≥ 0 and s ∈ [0, 2π). In order to aply the algorithmby L. GONZÁLEZ-VEGA, I. NÉCULA, Efficient topologydetermination of implicitly defined algebraic plane curves.Computer Aided Geometric Design, 19: 719-743, 2002, we usethe change of coordinates:

cos s =1− u2

1 + u2sin s =

2u1 + u2

and the real algebraic plane curve F [α(s),β(s)][a,b] = 0 is analyzed in

d ≥ 0, u ∈ R.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 23: EACA08

ProblemOur approach

ExampleFuture work

Example

We consider ε0 and ε1. E1 with center (0, 0) and semi-axes oflength 3 and 2. E2 centered in (2,−3) and with semi-axes,parallel to the coordinate axes, of length 2 and 1.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 24: EACA08

ProblemOur approach

ExampleFuture work

Example

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 25: EACA08

ProblemOur approach

ExampleFuture work

Example

In this case the minimum distance is given by computing thereal roots of the polynomial:

Gε1ε0 (d) = k1d4(d12−216d11+...)(d2−54d+1053)2(d2−52d+1700)2(k2d

12+k3d11+...)3

where ki are real numbers.

The non multiple factor of degree 12 is the one providingthe smallest and the biggest real roots of Gε1

ε0(d). It is not

still clear if this pattern appears in a general way.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 26: EACA08

ProblemOur approach

ExampleFuture work

Future work

Continue studying the continuous motion case.Generalize to ellipsoids.Non-coplanar ellipses.Other conics.

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang

Page 27: EACA08

ProblemOur approach

ExampleFuture work

Thank you!

F. Etayo, L. González-Vega, G. R. Quintana, W. Wang