géométrie algorithmique non linéaire et courbes

104
Géométrie algorithmique non linéaire et courbes algébriques planaires Luis Peñaranda INRIA Nancy-Grand Est 3 décembre 2010

Upload: others

Post on 18-Dec-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Géométrie algorithmique non linéaire et courbes

Géométrie algorithmique non linéaire etcourbes algébriques planaires

Luis Peñaranda

INRIA Nancy-Grand Est

3 décembre 2010

Page 2: Géométrie algorithmique non linéaire et courbes

Presentation outline

introductionresearch fieldthe problemprevious work

algorithmic issuesoverviewdetailscomplexity

implementation issuesisotopcgal algebraic kernel

conclusion

2 of 42

Page 3: Géométrie algorithmique non linéaire et courbes

Where are we standing?

� exact geometric computing� computational geometry� computer algebra tools

� a long history� robot motion planning� CAGD

� recent advances in real solving

3 of 42

Page 4: Géométrie algorithmique non linéaire et courbes

Where are we standing?

� exact geometric computing� computational geometry� computer algebra tools

� a long history� robot motion planning� CAGD

� recent advances in real solving

3 of 42

Page 5: Géométrie algorithmique non linéaire et courbes

Where are we standing?

� exact geometric computing� computational geometry� computer algebra tools

� a long history� robot motion planning� CAGD

� recent advances in real solving

3 of 42

Page 6: Géométrie algorithmique non linéaire et courbes

Exact geometric computing

� the general problem� algorithms oen assume that numbers are real� computers do not like real numbers� inconsistencies

� in computational geometry� numerical errors oen lead to crash

� exact arithmetic� filtered arithmetic

4 of 42

Page 7: Géométrie algorithmique non linéaire et courbes

Exact geometric computing

� the general problem� algorithms oen assume that numbers are real� computers do not like real numbers� inconsistencies

� in computational geometry� numerical errors oen lead to crash

� exact arithmetic� filtered arithmetic

4 of 42

Page 8: Géométrie algorithmique non linéaire et courbes

Topology and some geometry of real algebraicplane curves

input curve: f (x, y) = 0 with f ∈ Q[x, y]

� identify and localize� singular points,

� x-extreme points,� vertical asymptotes.

� isotopic approximation of the curve byan arrangement of polylines

� results in the original coordinate systemof the plane

..

5 of 42

Page 9: Géométrie algorithmique non linéaire et courbes

Topology and some geometry of real algebraicplane curves

input curve: f (x, y) = 0 with f ∈ Q[x, y]

� identify and localize� singular points,

� x-extreme points,� vertical asymptotes.

� isotopic approximation of the curve byan arrangement of polylines

� results in the original coordinate systemof the plane

..

5 of 42

Page 10: Géométrie algorithmique non linéaire et courbes

Topology and some geometry of real algebraicplane curves

input curve: f (x, y) = 0 with f ∈ Q[x, y]

� identify and localize� singular points,� x-extreme points,

� vertical asymptotes.

� isotopic approximation of the curve byan arrangement of polylines

� results in the original coordinate systemof the plane

..

5 of 42

Page 11: Géométrie algorithmique non linéaire et courbes

Topology and some geometry of real algebraicplane curves

input curve: f (x, y) = 0 with f ∈ Q[x, y]

� identify and localize� singular points,� x-extreme points,� vertical asymptotes.

� isotopic approximation of the curve byan arrangement of polylines

� results in the original coordinate systemof the plane

..

5 of 42

Page 12: Géométrie algorithmique non linéaire et courbes

Topology and some geometry of real algebraicplane curves

input curve: f (x, y) = 0 with f ∈ Q[x, y]

� identify and localize� singular points,� x-extreme points,� vertical asymptotes.

� isotopic approximation of the curve byan arrangement of polylines

� results in the original coordinate systemof the plane

..

5 of 42

Page 13: Géométrie algorithmique non linéaire et courbes

Topology and some geometry of real algebraicplane curves

input curve: f (x, y) = 0 with f ∈ Q[x, y]

� identify and localize� singular points,� x-extreme points,� vertical asymptotes.

� isotopic approximation of the curve byan arrangement of polylines

� results in the original coordinate systemof the plane

.

.

5 of 42

Page 14: Géométrie algorithmique non linéaire et courbes

Applications

� curve ploing

� computing arrangements of algebraic curves

the x-extreme points of each curve have to be computed in the samecoordinate system

6 of 42

Page 15: Géométrie algorithmique non linéaire et courbes

Applications

� curve ploing

� computing arrangements of algebraic curves

the x-extreme points of each curve have to be computed in the samecoordinate system

6 of 42

Page 16: Géométrie algorithmique non linéaire et courbes

Previous work: subdivision techniques

.

� fast� localizable (computation in a given

box)� not certified, unless they� reach the separation bound

[Lorensen & Cline, 1987][Alberti, Mourrain & Wintz, 2008][Burr, Choi, Galehouse & Yap, 2008][Lin & Yap, 2009]

7 of 42

Page 17: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods

1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007]

..

8 of 42

Page 18: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007]

..

8 of 42

Page 19: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007]

..

8 of 42

Page 20: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007]

..

8 of 42

Page 21: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007]

..

8 of 42

Page 22: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007]

.

.

8 of 42

Page 23: Géométrie algorithmique non linéaire et courbes

Cylindrical algebraic decomposition methods1. projection

2. liing

3. adjacencies

� assume generic position, or detect it,shear and shear back

� Collins, 1984� Cad2d [Brown & al.]

Top [Gonzalez Vega & Necula, 2002]Insulate [Seidel & Wolpert, 2005]CA [Eigenwillig, Kerber &Wolpert, 2007] .

.

8 of 42

Page 24: Géométrie algorithmique non linéaire et courbes

Our algorithm

� it’s not a CAD� decomposition of the plane into rectangles: the rectangle containing

each critical point may overlap in x� non-genericity of x-overlapping boxes is not an issue

� replaces sub-resultant sequences and computations with algebraiccoefficient polynomials by� Gröbner bases� Rational Univariate Representations

generic non-generic9 of 42

Page 25: Géométrie algorithmique non linéaire et courbes

Our algorithm

� it’s not a CAD� decomposition of the plane into rectangles: the rectangle containing

each critical point may overlap in x� non-genericity of x-overlapping boxes is not an issue

� replaces sub-resultant sequences and computations with algebraiccoefficient polynomials by� Gröbner bases� Rational Univariate Representations

generic non-generic

9 of 42

Page 26: Géométrie algorithmique non linéaire et courbes

Algorithm outline

1. compute isolating boxes for criticalpoints:

� extreme points,� singular points and� asymptotes;

and refine them until they are disjoint

2. determine the topology in therectangles of critical points

3. compute the topology in the rest of therectangles

..

10 of 42

Page 27: Géométrie algorithmique non linéaire et courbes

Algorithm outline

1. compute isolating boxes for criticalpoints:� extreme points,

� singular points and� asymptotes;

and refine them until they are disjoint

2. determine the topology in therectangles of critical points

3. compute the topology in the rest of therectangles

..

10 of 42

Page 28: Géométrie algorithmique non linéaire et courbes

Algorithm outline

1. compute isolating boxes for criticalpoints:� extreme points,� singular points and

� asymptotes;

and refine them until they are disjoint

2. determine the topology in therectangles of critical points

3. compute the topology in the rest of therectangles

..

10 of 42

Page 29: Géométrie algorithmique non linéaire et courbes

Algorithm outline

1. compute isolating boxes for criticalpoints:� extreme points,� singular points and� asymptotes;

and refine them until they are disjoint

2. determine the topology in therectangles of critical points

3. compute the topology in the rest of therectangles

..

10 of 42

Page 30: Géométrie algorithmique non linéaire et courbes

Algorithm outline

1. compute isolating boxes for criticalpoints:� extreme points,� singular points and� asymptotes;

and refine them until they are disjoint

2. determine the topology in therectangles of critical points

3. compute the topology in the rest of therectangles

..

10 of 42

Page 31: Géométrie algorithmique non linéaire et courbes

Algorithm outline

1. compute isolating boxes for criticalpoints:� extreme points,� singular points and� asymptotes;

and refine them until they are disjoint

2. determine the topology in therectangles of critical points

3. compute the topology in the rest of therectangles

..

10 of 42

Page 32: Géométrie algorithmique non linéaire et courbes

Notation

curve: square free polynomial f ∈ Q[x, y]

a point p = (α, β) ∈ C2 is x-critical if f (p) = fy(p) = 0,� singular if fx(p) = 0, and� x-extreme if fx(p) = 0 (i.e. x-critical and non-singular)

11 of 42

Page 33: Géométrie algorithmique non linéaire et courbes

Notation

curve: square free polynomial f ∈ Q[x, y]

a point p = (α, β) ∈ C2 is x-critical if f (p) = fy(p) = 0,

� singular if fx(p) = 0, and� x-extreme if fx(p) = 0 (i.e. x-critical and non-singular)

11 of 42

Page 34: Géométrie algorithmique non linéaire et courbes

Notation

curve: square free polynomial f ∈ Q[x, y]

a point p = (α, β) ∈ C2 is x-critical if f (p) = fy(p) = 0,� singular if fx(p) = 0, and

� x-extreme if fx(p) = 0 (i.e. x-critical and non-singular)

11 of 42

Page 35: Géométrie algorithmique non linéaire et courbes

Notation

curve: square free polynomial f ∈ Q[x, y]

a point p = (α, β) ∈ C2 is x-critical if f (p) = fy(p) = 0,� singular if fx(p) = 0, and� x-extreme if fx(p) = 0 (i.e. x-critical and non-singular)

11 of 42

Page 36: Géométrie algorithmique non linéaire et courbes

The Rational Univariate Representation

S is a bivariate system, RUR univariate polynomial f, such that

t root of f ⇐⇒(gx(t)h(t)

,gy(t)

h(t)

)root of S

gx, gy, h ∈ Q(t)

� the RUR preserves multiplicities� we obtain the RUR from the Gröbner basis of S� the roots of f are isolated with Descartes’ method� interval arithmetic for computing the separating boxes of the roots

of the system S

12 of 42

Page 37: Géométrie algorithmique non linéaire et courbes

The Rational Univariate Representation

S is a bivariate system, RUR univariate polynomial f, such that

t root of f ⇐⇒(gx(t)h(t)

,gy(t)

h(t)

)root of S

gx, gy, h ∈ Q(t)

� the RUR preserves multiplicities� we obtain the RUR from the Gröbner basis of S� the roots of f are isolated with Descartes’ method� interval arithmetic for computing the separating boxes of the roots

of the system S

12 of 42

Page 38: Géométrie algorithmique non linéaire et courbes

Topology at extreme points

1. isolate the extreme system Se =

f (x, y) = 0∂f∂y = 0∂f∂x = 0

2. refine boxes to get only two crossings on the border

..

3. store the multiplicities in the system Se for the connection step (seelater)

13 of 42

Page 39: Géométrie algorithmique non linéaire et courbes

Topology at singularities

1. isolate singular points in boxes

2. compute multiplicities k in fibers

3. refine the box to avoid the curve fyk =∂kf∂yk [Seidel & Wolpert, 2005]

4. refine the box to avoid top/boom crossings

..14 of 42

Page 40: Géométrie algorithmique non linéaire et courbes

Topology at singularities

1. isolate singular points in boxes

2. compute multiplicities k in fibers

3. refine the box to avoid the curve fyk =∂kf∂yk [Seidel & Wolpert, 2005]

4. refine the box to avoid top/boom crossings

..14 of 42

Page 41: Géométrie algorithmique non linéaire et courbes

Topology at singularities

1. isolate singular points in boxes

2. compute multiplicities k in fibers

3. refine the box to avoid the curve fyk =∂kf∂yk [Seidel & Wolpert, 2005]

4. refine the box to avoid top/boom crossings

..14 of 42

Page 42: Géométrie algorithmique non linéaire et courbes

Topology at singularities

1. isolate singular points in boxes

2. compute multiplicities k in fibers

3. refine the box to avoid the curve fyk =∂kf∂yk [Seidel & Wolpert, 2005]

4. refine the box to avoid top/boom crossings

..14 of 42

Page 43: Géométrie algorithmique non linéaire et courbes

Rectangle decomposition of the plane

� the topology is known insidecritical boxes

� compute a verticaldecomposition of the plane withrespect to these boxes

� compute intersections of thecurve with the decomposition

..

15 of 42

Page 44: Géométrie algorithmique non linéaire et courbes

Rectangle decomposition of the plane

� the topology is known insidecritical boxes

� compute a verticaldecomposition of the plane withrespect to these boxes

� compute intersections of thecurve with the decomposition

..

15 of 42

Page 45: Géométrie algorithmique non linéaire et courbes

Rectangle decomposition of the plane

� the topology is known insidecritical boxes

� compute a verticaldecomposition of the plane withrespect to these boxes

� compute intersections of thecurve with the decomposition

..

15 of 42

Page 46: Géométrie algorithmique non linéaire et courbes

Rectangle decomposition of the plane

� the topology is known insidecritical boxes

� compute a verticaldecomposition of the plane withrespect to these boxes

� compute intersections of thecurve with the decomposition

.

.

15 of 42

Page 47: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even .odd

16 of 42

Page 48: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even .odd

16 of 42

Page 49: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even .odd

16 of 42

Page 50: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even

.odd

16 of 42

Page 51: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even .odd

16 of 42

Page 52: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even .odd

16 of 42

Page 53: Géométrie algorithmique non linéaire et courbes

Greedy connection algorithm using multiplicities

.

.?

.even .odd

16 of 42

Page 54: Géométrie algorithmique non linéaire et courbes

Complexity analysis

� the algorithm runs in OB(R d 22 τ 2) , where� R: number of real critical points,� d: degree of the polynomial f,� τ: maximum coefficient bitsize of f.

� if N = max{d, τ} and R is O(d 2), we have OB(N 26)

� does not reflect practical performance

17 of 42

Page 55: Géométrie algorithmique non linéaire et courbes

Complexity analysis

� the algorithm runs in OB(R d 22 τ 2) , where� R: number of real critical points,� d: degree of the polynomial f,� τ: maximum coefficient bitsize of f.

� if N = max{d, τ} and R is O(d 2), we have OB(N 26)

� does not reflect practical performance

17 of 42

Page 56: Géométrie algorithmique non linéaire et courbes

Complexity analysis

� the algorithm runs in OB(R d 22 τ 2) , where� R: number of real critical points,� d: degree of the polynomial f,� τ: maximum coefficient bitsize of f.

� if N = max{d, τ} and R is O(d 2), we have OB(N 26)

� does not reflect practical performance

17 of 42

Page 57: Géométrie algorithmique non linéaire et courbes

Implementation in Maple

Isotop: +7000 lines of Maple code, using� FGb for Gröbner basis (Faugère)� RS for RUR and isolation (Rouillier)

� complete: handles vertical asymptotes and vertical components� certified

� http://vegas.loria.fr/isotop

18 of 42

Page 58: Géométrie algorithmique non linéaire et courbes

Isotop interface

ISOTOP:-topology_real_curve(y^4 - 6*y^2*x + x^2 - 4*y^2*x^2 + 24*x^3,verbosity=0,precision=10,plot_graph=true,nb_splits=10);

19 of 42

Page 59: Géométrie algorithmique non linéaire et courbes

Isotop experiments

we ran large-scale tests, testing around 600 curves� random curves� ACS curves� O. Labs’ tough curves� resultants of degree-3 random surfaces� n translations

∏nj=0 f (x, y+ j)

� symmetric polynomials f 2(x, y) + f 2(x,−y)

20 of 42

Page 60: Géométrie algorithmique non linéaire et courbes

Isotop experiments: input curves

.

.

.d < 10

.10 ≤ d < 20

.20 ≤ d < 30.30 ≤ d < 40

.40 ≤ d < 50

.50 ≤ d ≤ 90

..

.c < 20

.20 ≤ c < 40 .40 ≤ c < 60

.60 ≤ c ≤ 121

degrees number of critical points

21 of 42

Page 61: Géométrie algorithmique non linéaire et courbes

Experiments: results, r = timetimeIsotop

.

.0 < r ≤ ⅓.⅓ < r ≤ 1

.1 < r ≤ 3.3 < r

.aborted

.

.Cad2d.[Brown, 2002]

..

.r ≤ ⅓

.⅓ < r ≤ 1

.1 < r ≤ 3

.3 < r

.timeout

.CA.[E&K&W, 2007]

..

.r ≤ ⅓

.⅓ < r ≤ 1.1 < r ≤ 3

.3 < r

.timeout

.Top.[GV&N, 2002]

.

.r ≤ 1

.1 < r ≤ 3

.3 < r

.timeout.

.Insulate.[S&W, 2005]

22 of 42

Page 62: Géométrie algorithmique non linéaire et courbes

Experiments: conclusions

� faster for� non-generic curves� high degree curves

� slower for� random curves� curves with high-tangency points

� why?

23 of 42

Page 63: Géométrie algorithmique non linéaire et courbes

Experiments: conclusions

� faster for� non-generic curves� high degree curves

� slower for� random curves� curves with high-tangency points

� why?

23 of 42

Page 64: Géométrie algorithmique non linéaire et courbes

Experiments: conclusions

� faster for� non-generic curves� high degree curves

� slower for� random curves� curves with high-tangency points

� why?

23 of 42

Page 65: Géométrie algorithmique non linéaire et courbes

Algebraic algorithms in CGAL� Isotop is in Maple, but

� it is not a standard in the CG community� Maple programs cannot be used as libraries

� in general� lack of algebro-geometric tools in C or C++

� CGAL� C++ library� standard in the community� generic programming

� equip CGAL with algebraic tools� also useful for future algorithms

24 of 42

Page 66: Géométrie algorithmique non linéaire et courbes

Algebraic algorithms in CGAL� Isotop is in Maple, but

� it is not a standard in the CG community� Maple programs cannot be used as libraries

� in general� lack of algebro-geometric tools in C or C++

� CGAL� C++ library� standard in the community� generic programming

� equip CGAL with algebraic tools� also useful for future algorithms

24 of 42

Page 67: Géométrie algorithmique non linéaire et courbes

Algebraic algorithms in CGAL� Isotop is in Maple, but

� it is not a standard in the CG community� Maple programs cannot be used as libraries

� in general� lack of algebro-geometric tools in C or C++

� CGAL� C++ library� standard in the community� generic programming

� equip CGAL with algebraic tools� also useful for future algorithms

24 of 42

Page 68: Géométrie algorithmique non linéaire et courbes

Algebraic algorithms in CGAL� Isotop is in Maple, but

� it is not a standard in the CG community� Maple programs cannot be used as libraries

� in general� lack of algebro-geometric tools in C or C++

� CGAL� C++ library� standard in the community� generic programming

� equip CGAL with algebraic tools� also useful for future algorithms

24 of 42

Page 69: Géométrie algorithmique non linéaire et courbes

Algebraic tools in CGAL

� specific non-linear objects, particular algorithms� arrangements of conics

� specific non-linear objects, kernels� circles� spheres

� curves of arbitrary degree, algebraic kernels� univariate and bivariate� many variables

25 of 42

Page 70: Géométrie algorithmique non linéaire et courbes

Algebraic tools in CGAL

� specific non-linear objects, particular algorithms� arrangements of conics

� specific non-linear objects, kernels� circles� spheres

� curves of arbitrary degree, algebraic kernels� univariate and bivariate� many variables

25 of 42

Page 71: Géométrie algorithmique non linéaire et courbes

Algebraic tools in CGAL

� specific non-linear objects, particular algorithms� arrangements of conics

� specific non-linear objects, kernels� circles� spheres

� curves of arbitrary degree, algebraic kernels� univariate and bivariate� many variables

25 of 42

Page 72: Géométrie algorithmique non linéaire et courbes

Algebraic Kernel

combines algebra and geometry for manipulating non-linear objects

� features� root finding� algebraic number comparison� all related polynomial operations

� concepts and models

� model of univariate algebraic kernel

26 of 42

Page 73: Géométrie algorithmique non linéaire et courbes

Algebraic Kernel

combines algebra and geometry for manipulating non-linear objects

� features� root finding� algebraic number comparison� all related polynomial operations

� concepts and models

� model of univariate algebraic kernel

26 of 42

Page 74: Géométrie algorithmique non linéaire et courbes

Algebraic Kernel

combines algebra and geometry for manipulating non-linear objects

� features� root finding� algebraic number comparison� all related polynomial operations

� concepts and models

� model of univariate algebraic kernel

26 of 42

Page 75: Géométrie algorithmique non linéaire et courbes

Algebraic Kernel

combines algebra and geometry for manipulating non-linear objects

� features� root finding� algebraic number comparison� all related polynomial operations

� concepts and models

� model of univariate algebraic kernel

26 of 42

Page 76: Géométrie algorithmique non linéaire et courbes

Tools we use

� GMP� GNU multiple-precision number library

� RS� univariate polynomials with integer coefficients� interval Descartes algorithm� coded in C� memory management� multiple platforms (Unix, Mac OS, Win)

� MPFR� arbitrary multiple-precision floating-point numbers

� MPFI� arbitrary multiple-precision floating-point intervals

27 of 42

Page 77: Géométrie algorithmique non linéaire et courbes

Tools we use

� GMP� GNU multiple-precision number library

� RS� univariate polynomials with integer coefficients� interval Descartes algorithm� coded in C� memory management� multiple platforms (Unix, Mac OS, Win)

� MPFR� arbitrary multiple-precision floating-point numbers

� MPFI� arbitrary multiple-precision floating-point intervals

27 of 42

Page 78: Géométrie algorithmique non linéaire et courbes

Tools we use

� GMP� GNU multiple-precision number library

� RS� univariate polynomials with integer coefficients� interval Descartes algorithm� coded in C� memory management� multiple platforms (Unix, Mac OS, Win)

� MPFR� arbitrary multiple-precision floating-point numbers

� MPFI� arbitrary multiple-precision floating-point intervals

27 of 42

Page 79: Géométrie algorithmique non linéaire et courbes

Tools we use

� GMP� GNU multiple-precision number library

� RS� univariate polynomials with integer coefficients� interval Descartes algorithm� coded in C� memory management� multiple platforms (Unix, Mac OS, Win)

� MPFR� arbitrary multiple-precision floating-point numbers

� MPFI� arbitrary multiple-precision floating-point intervals

27 of 42

Page 80: Géométrie algorithmique non linéaire et courbes

Our algebraic kernel

� 8000 lines of code

� root isolation� uses RS� gives as result algebraic numbers

� isolating interval: MPFI� pointer to a polynomial

� comparison of algebraic numbers� easy when intervals do not overlap� otherwise, test for equality

� greatest common divisor (gcd)� algebraic number refinement

28 of 42

Page 81: Géométrie algorithmique non linéaire et courbes

Our algebraic kernel

� 8000 lines of code

� root isolation� uses RS� gives as result algebraic numbers

� isolating interval: MPFI� pointer to a polynomial

� comparison of algebraic numbers� easy when intervals do not overlap� otherwise, test for equality

� greatest common divisor (gcd)� algebraic number refinement

28 of 42

Page 82: Géométrie algorithmique non linéaire et courbes

Our algebraic kernel

� 8000 lines of code

� root isolation� uses RS� gives as result algebraic numbers

� isolating interval: MPFI� pointer to a polynomial

� comparison of algebraic numbers� easy when intervals do not overlap� otherwise, test for equality

� greatest common divisor (gcd)� algebraic number refinement

28 of 42

Page 83: Géométrie algorithmique non linéaire et courbes

Auxiliar operations

� gcd� boleneck of the implementation (used for comparisons and square free

factorizations)� two modular implementations� fast detection of coprime polynomials

� refinement� bisection� quadratic refinement

29 of 42

Page 84: Géométrie algorithmique non linéaire et courbes

Auxiliar operations

� gcd� boleneck of the implementation (used for comparisons and square free

factorizations)� two modular implementations� fast detection of coprime polynomials

� refinement� bisection� quadratic refinement

29 of 42

Page 85: Géométrie algorithmique non linéaire et courbes

Benchmarks

� soware� MPII’s algebraic kernel (using CORE NT)� Synaps/Mathemagix code (using NCF2 and GMP NT)� our algebraic kernel

� functionalities� root isolation� algebraic number comparison� application: arrangement construction

30 of 42

Page 86: Géométrie algorithmique non linéaire et courbes

Benchmarks

� soware� MPII’s algebraic kernel (using CORE NT)� Synaps/Mathemagix code (using NCF2 and GMP NT)� our algebraic kernel

� functionalities� root isolation� algebraic number comparison� application: arrangement construction

30 of 42

Page 87: Géométrie algorithmique non linéaire et courbes

Benchmark data

� first time such a big amount of data for polynomials is tested� 60,000 polynomials (3.8 Gb)� several weeks in total

31 of 42

Page 88: Géométrie algorithmique non linéaire et courbes

Root isolation: varying bitsize

degree-12 random polynomials

.0 10000 20000 30000 40000 50000

coe�cient bitsize

0

10

20

30

40

isolationtim

e[m

s]

Our kernelMPII's kernelSYNAPS' kernel

32 of 42

Page 89: Géométrie algorithmique non linéaire et courbes

Root isolation: varying bitsize II

degree-100 random polynomials

.0 5000 10000 15000 20000 25000

coe�cient bitsize

0

50

100

150

200

250

isolationtim

e[m

s]

Our kernelMPII's kernelSYNAPS' kernel

33 of 42

Page 90: Géométrie algorithmique non linéaire et courbes

Root isolation: Mignoe polynomials

f = x d − 2(kx− 1)2

.0 10 20 30 40 50

d

0

1

2

3

4

5

6

isolationtim

e[s]

Our kernelMPII's kernelSYNAPS' kernel

34 of 42

Page 91: Géométrie algorithmique non linéaire et courbes

Root isolation: varying degree

bitsize-1000 random polynomials

.0 500 1000 1500 2000

polynomial degree

0

10

20

30

40

50

60

70

isolationtim

e[s]

Our kernelMPII's kernelSYNAPS' kernel

35 of 42

Page 92: Géométrie algorithmique non linéaire et courbes

Algebraic number comparison

almost-identical polynomials of degree 20

.0 500 1000 1500 2000 2500 3000

coe�cient bitsize

0

250

500

750

1000

comparisontim

e[m

s]

Our bisectionMPII's quadratic

MPII's bisection

36 of 42

Page 93: Géométrie algorithmique non linéaire et courbes

Arrangement benchmarks

test programs� CGAL’s arrangement package (Tel-Aviv University)� parameterised with

� a traits class that uses CORE� a new traits class for our kernel

test data� generate n random polynomials� shi them vertically m times� n(m+ 1) polynomials of bitsize τ and degree d� we fix n = 5 and m = 4 here

37 of 42

Page 94: Géométrie algorithmique non linéaire et courbes

Arrangement benchmarks

test programs� CGAL’s arrangement package (Tel-Aviv University)� parameterised with

� a traits class that uses CORE� a new traits class for our kernel

test data� generate n random polynomials� shi them vertically m times� n(m+ 1) polynomials of bitsize τ and degree d� we fix n = 5 and m = 4 here

37 of 42

Page 95: Géométrie algorithmique non linéaire et courbes

Arrangements: varying bitsize

d = 20

.0 200 400 600 800 1000

coe�cient bitsize

0

50

100

150

200

constructiontim

e[s]

Our kernelCORE

38 of 42

Page 96: Géométrie algorithmique non linéaire et courbes

Arrangements: varying degree

τ = 32

.0 40 80 120 160 200

degree

0

50

100

150

200

constructiontim

e[s]

Our kernelCORE

39 of 42

Page 97: Géométrie algorithmique non linéaire et courbes

Experimentation highlights

� our algebraic kernel is included in CGAL 3.6� MPII kernel is unstable due to external library issues� Synaps kernel is not complete

� root isolation� our kernel is faster for high degrees and bitsizes� Synaps isolation performs much beer in Mignoe’s polynomials

� algebraic number refinement� MPII quadratic refinement is really fast

� arrangement experiments� validate the algebraic kernel approach

40 of 42

Page 98: Géométrie algorithmique non linéaire et courbes

Experimentation highlights

� our algebraic kernel is included in CGAL 3.6� MPII kernel is unstable due to external library issues� Synaps kernel is not complete� root isolation

� our kernel is faster for high degrees and bitsizes� Synaps isolation performs much beer in Mignoe’s polynomials

� algebraic number refinement� MPII quadratic refinement is really fast

� arrangement experiments� validate the algebraic kernel approach

40 of 42

Page 99: Géométrie algorithmique non linéaire et courbes

Experimentation highlights

� our algebraic kernel is included in CGAL 3.6� MPII kernel is unstable due to external library issues� Synaps kernel is not complete� root isolation

� our kernel is faster for high degrees and bitsizes� Synaps isolation performs much beer in Mignoe’s polynomials

� algebraic number refinement� MPII quadratic refinement is really fast

� arrangement experiments� validate the algebraic kernel approach

40 of 42

Page 100: Géométrie algorithmique non linéaire et courbes

Experimentation highlights

� our algebraic kernel is included in CGAL 3.6� MPII kernel is unstable due to external library issues� Synaps kernel is not complete� root isolation

� our kernel is faster for high degrees and bitsizes� Synaps isolation performs much beer in Mignoe’s polynomials

� algebraic number refinement� MPII quadratic refinement is really fast

� arrangement experiments� validate the algebraic kernel approach

40 of 42

Page 101: Géométrie algorithmique non linéaire et courbes

Conclusions

� algorithm development� curve topology analysis� no special treatment of non-generic cases,� results in the original coordinate system� uses Rational Univariate Representations, to avoid sub-resultant

sequences

� implementation� Maple implementation of the topology algorithm� CGAL univariate algebraic kernel� thorough benchmarking

� analysis of algorithms� output-sensitive complexity analysis

41 of 42

Page 102: Géométrie algorithmique non linéaire et courbes

Conclusions

� algorithm development� curve topology analysis� no special treatment of non-generic cases,� results in the original coordinate system� uses Rational Univariate Representations, to avoid sub-resultant

sequences

� implementation� Maple implementation of the topology algorithm� CGAL univariate algebraic kernel� thorough benchmarking

� analysis of algorithms� output-sensitive complexity analysis

41 of 42

Page 103: Géométrie algorithmique non linéaire et courbes

Conclusions

� algorithm development� curve topology analysis� no special treatment of non-generic cases,� results in the original coordinate system� uses Rational Univariate Representations, to avoid sub-resultant

sequences

� implementation� Maple implementation of the topology algorithm� CGAL univariate algebraic kernel� thorough benchmarking

� analysis of algorithms� output-sensitive complexity analysis

41 of 42

Page 104: Géométrie algorithmique non linéaire et courbes

Perspectives

� improve handling of some curves� algebraic approach that is always efficient� arrangements of curves

� topology of surfaces, meshing� include Isotop in Maple� bivariate and multivariate algebraic kernel� tighter complexity bounds

42 of 42