Beyond the EU: DORA and NIS 2 Directive's Global Impact
EACA08
1. Problem
Our approach
Example
Future work
Closed formulae for distance functions
involving ellipses.
F. Etayo1 , L. González-Vega1 , G. R. Quintana1 , W. Wang2
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
2. Problem
Our approach
Example
Future work
Contents
1 Problem
2 Our approach
3 Example
4 Future work
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
3. Problem
Our approach
Example
Future work
Introduction
We want to compute the distance between two coplanar
ellipses.
The minimum distance between a given point and one ellipse is
a positive algebraic number: our goal is to determine a
polynomial with this number as a real root.
That distance does not depend on the footpoint. It gives the
distance directly. We can use this formula for analyzing the
Ellipses Moving Problem (EMP).
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
4. Problem
Our approach
Example
Future work
Applications
The EMP is a critical problem in Computer Graphics, with
applications like:
Collision detection
Orbit analysis (non-coplanar ellipses)
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
5. Problem
Our approach
Example
Future work
Previous works
I. Z. E MIRIS , E. T SIGARIDAS , G. M. T ZOUMAS . The
predicates for the Voronoi diagram of ellipses. Proc. ACM
Symp. Comput. Geom., 2006.
I. Z. E MIRIS , G. M. T ZOUMAS . A Real-time and Exact
Implementation of the predicates for the Voronoi Diagram
for parametric ellipses. Proc. ACM Symp. Solid Physical
Modelling, 2007.
C. L ENNERZ , E. S CHÖMER . Efficient Distance
Computation for Quadratic Curves and Surfaces.
Geometric Modelling and Processing Proceedings, 2002.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
6. Problem
Our approach
Example
Future work
Previous works
J.-K. S EONG , D. E. J OHNSON , E. C OHEN . A Higher
Dimensional Formulation for Robust and Interactive
Distance Queries. Proc. ACM Solid and Physical
Modeling, 2006.
K.A. S OHN , B. J ÜTTLER , M.S. K IM , W. WANG .
Computing the Distance Between Two Surfaces via Line
Geometry. Proc. Tenth Pacific Conference on Computer
Graphics and Applications, 236-245, IEEE Press, 2002.
Common aspect: the problem is always solved using foot
points.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
7. Problem
Our approach
Example
Future work
Our approach
We do not make the minimum distance computation depending
on the foot points. We study the ellipse separation problem by
analyzing 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
8. Problem
Our approach
Example
Future work
Our approach
We do not make the minimum distance computation depending
on the foot points. We study the ellipse separation problem by
analyzing 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
9. Problem
Our approach
Example
Future work
Our approach
We do not make the minimum distance computation depending
on the foot points. We study the ellipse separation problem by
analyzing 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
10. Problem
Our approach
Example
Future 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 distance
between 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
11. Problem
Our approach
Example
Future 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
12. Problem
Our approach
Example
Future 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 variable
complex change of variable
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
13. Problem
Our approach
Example
Future work
The distance of a point to an ellipse
Rational change of variable:
1−t2
cos t = 1+t2
2t
sin t = 1+t2
Disadvantage: more complicated.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
14. Problem
Our approach
Example
Future work
The distance of a point to an ellipse
Rational change of variable:
1−t2
cos t = 1+t2
2t
sin t = 1+t2
Disadvantage: more complicated.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
15. Problem
Our approach
Example
Future work
The distance of a point to an ellipse
1
Since z = cos t + i sin t, z = z and we can use the complex
change of variable:
1
z− z
sin t = 2i
1
z+ z
cos t = 2
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
16. Problem
Our approach
Example
Future work
The distance of a point to an ellipse
The new system:
√ √ √ √
(b − a)z 4 + 2(x0 a − iy0 √b)z 3 − 2(x0 a + iy0 b)z + a − b = 0 √
√ √
(b − a)z 4 − 4(x0 a − iy0 b)z 3 − 2(2(x2 + y0 − d))z 2 + 4(x0 a + iy0 b)z + b − a = 0
0
2
Using resultants we eliminate the variable z
(we also eliminate i).
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
17. Problem
Our approach
Example
Future work
The distance of a point to an ellipse
Theorem
If d0 is the distance of a point (x0 , y0 ) to the ellipse ε0 with
center (0, 0) and semiaxes a and b then d = d2 is the smallest
0
nonnegative real root of the polynomial
[x0 ,y ]
F[a,b] 0 (d) = (a − b)2 d4 + 2(a − b)(b2 + 2x2 b + y0 b − 2ay0 − a2 − x2 a)d3
0
2 2
0
+(y0 b2 − 8y0 ba2 − 6b2 a2 + 6a3 y0 − 2x2 a3 + a4 + 6x2 y0 b2 − 2y0 b3
4 2 2
0 0
2 2
+6y0 a2 + 4x2 a2 b + 2b3 a + 6x2 y0 a2 + 2a3 b − 6x4 ab + 4y0 b2 a
4
0 0
2
0
2
4 2 4 2 3 2 2 2 4 2 2 4 2
+6x0 b + 4x0 a + 6b x0 − 10x0 y0 ab + b − 8x0 ab − 6y0 ab)d
−2(ab4 + y0 − a2 b3 + a4 b + 2y0 a2 + 2b2 x6 − a3 b2 − bx2 ay0
4 6
0 0
4
−bx4 ay0 + 3x2 ay0 b2 + 3x2 a2 y0 b − by0 a + b2 y0 x2 + 3x4 b3
0
2
0
2
0
2 6 4
0 0
+3y0 a3 + x2 b4 + x4 a2 y0 − bx6 a − 5x4 ab2 + 3b2 y0 x4 + 3y0 ab2
4
0 0
2
0 0
2
0
4
−2x2 a3 u2 + 3x4 a2 b + 3x2 b2 y0 − 2x2 ab3 − 2y0 a3 b − 3y0 ab3
0 0 0 0
2
0
2 2
−3x2 a3 b − 2x2 b3 y0 − 5y0 a2 b + 4x2 a2 b2 + 4y0 a2 b2 )d
0 0
2 4
0
2
+(x4 + 2x2 b + b2 − 2x2 a − 2ba + a2 + y0 + 2x2 y0 − 2y0 b + 2ay0 )·
0 0 0
4
0
2 2 2
[a,b]
(bx2 + ay0 − ba)2 =
0
2 4
k=0 hk (x0 , y0 )dk
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
18. Problem
Our approach
Example
Future work
Remarks to the theorem
[x ,y ]
The biggest real root of F[a,b] 0 (d) is the square of the
0
maximum distance between (x0 , y0 ) and the points in ε0 .
If x0 is a focus of ε0
√
[ a−b,0]
F[a,b] (d) = (a − b)2 d2 (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 if
d = d20
√
[ a−b,0]
F[a,b] (d2 ) = R4 (y0 + x2 )2 (d2 + 2Rd0 + R2 − y0 − x2 )(d2 − 2Rd0 + R2 − y0 − x2 )
0
2
0 0
2
0 0
2
0
⇒ d0 = |R − y0 + x2 |
2
0
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
19. Problem
Our approach
Example
Future work
The distance between two ellipses
Let ε1 be an ellipse disjoint with ε0 , presented by the
parametrization 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 of
α(s),β(s)
the family of univariate polynomials Fa,b (d).
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
20. Problem
Our approach
Example
Future 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)] = 4 [a,b]
(α(s), β(s))dk = 0
[a,b] k=0 hk
F [α(s),β(s)] :=
¯ 4 ∂ [a,b]
(α(s), β(s))dk =
[a,b] k=0 ∂s hk 0
d is determined by analyzing the implicit curve
[α(s),β(s)]
F[a,b] = 0.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
21. Problem
Our approach
Example
Future work
First case
Since α(s) and β(s) are linear forms on cos(s) and sin(s) this
question is converted into an algebraic problem in the same
way we have proceeded in the case point-ellipse, by performing
the change of variable
1 1 1 1
cos s = w+ , sin s = w−
2 w 2i w
and then using resultants to eliminate w.
We obtain a univariate polynomial of degree 60, Gε1 , whose
ε0
smallest positive real root is the square of d(ε0 , ε1 ).
Gε1 depends polynomially on the parameters of ε0 and ε1 .
ε0
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
22. Problem
Our approach
Example
Future work
Second case
[α(s),β(s)]
d is determined by analyzing the implicit curve F[a,b] = 0 in
the region d ≥ 0 and s ∈ [0, 2π). In order to aply the algorithm
by L. G ONZÁLEZ -V EGA , I. N ÉCULA , Efficient topology
determination of implicitly defined algebraic plane curves.
Computer Aided Geometric Design, 19: 719-743, 2002, we use
the change of coordinates:
1 − u2 2u
cos s = 2
sin s =
1+u 1 + u2
[α(s),β(s)]
and the real algebraic plane curve F[a,b] = 0 is analyzed in
d ≥ 0, u ∈ R.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
23. Problem
Our approach
Example
Future work
Example
We consider ε0 and ε1 . E1 with center (0, 0) and semi-axes of
length 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
24. Problem
Our approach
Example
Future work
Example
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
25. Problem
Our approach
Example
Future work
Example
In this case the minimum distance is given by computing the
real roots of the polynomial:
Gε1 (d) = k1 d4 (d12 −216d11 +...)(d2 −54d+1053)2 (d2 −52d+1700)2 (k2 d12 +k3 d11 +...)3
ε0
where ki are real numbers.
The non multiple factor of degree 12 is the one providing
the smallest and the biggest real roots of Gε1 (d). It is not
ε0
still clear if this pattern appears in a general way.
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang
26. Problem
Our approach
Example
Future 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
27. Problem
Our approach
Example
Future work
Thank you!
F. Etayo, L. González-Vega, G. R. Quintana, W. Wang