extraction of tori from minimal point sets - inria · extraction of tori from minimal point sets...

22
Extraction of tori from minimal point sets Andr ´ e GALLIGO (UCA, INRIA, AROMATH team and LJAD), Laurent Bus ´ e (UCA, INRIA, AROMATH team. MEGA 2017, Nice BUS ´ E-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Upload: vanthu

Post on 20-Aug-2019

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Extraction of tori from minimal point sets

Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),Laurent Buse (UCA, INRIA, AROMATH team.

MEGA 2017, Nice

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 2: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Introduction

Extraction of geometric primitives from scanned 3D pointclouds is important in reverse engineering.Basic types of elementary shapes are:planes, spheres, cylinders, cones or tori.RANSAC method “judges“ if a primitive extracted from asmall set of points is relevant to the full point cloud.It is important to compute a shape through the smallestpossible number of points.Mixed data: some points with normals and some otherpoints without normals.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 3: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Reverse engineering steps

State of the Art in Surface Reconstruction from Point Clouds.Matthew Berger, Andrea Tagliasacchi, Lee Seversky, Pierre Alliez,Joshua Levine, Andrei Sharf, Claudio Silva.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 4: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

CAD models

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 5: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Degrees of freedom

A plane (resp. a sphere) is defined by 3 (resp. 4)parameters.It is also uniquely defined by 3 (resp. 4) of its pointschoosen generically, or by a point with its normal (resp.plus another point).

A cylinder (resp. a cone, resp a torus) is defined by 5(resp. 6, resp. 7) parameters/unknowns.But it is not uniquely defined by 5 (resp.6, resp. 7) of itspoints choosen generically.Our work studies and quantifies these anbiguities.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 6: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Methodology

First perform a change of coordinates, in order to fix 6input values. E.g. let P1 at the origin, its normal n1 on thez−axis and choose the abscissa of P2 equal to 0.Choose a set of parameters/unknowns with a ”geometric“meaning, for constructing the surface.Translate our construction into algebraic equations.Provide formulas or efficient algorithms (resultants) tocompute the parameters.

We consider general cases or a selection of special cases, andthen report experiments with random data.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 7: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

4 tori

Figure: Configurations of points with four interpolating smooth tori.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 8: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Our main result

Theorem.Generically, there exist at most eight non-degenerated torithat interpolate three distinct points, two of them beingoriented.

This bound (eight) is reached, even when we restrict to realsmooth tori (which is the useful practical setting).

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 9: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Skeletal circle of a Torus, and two oriented points

A torus T is defined by a skeletal circle C and a radius r > 0.We consider two oriented points p1 := (0,0,0) andN1 = k := (0,0,1); p2 = (0, y2, z2) and N2 = N = (l ,m,n);and we assume k ∧ N 6= 0.Call C the squeletal circle, and let r be the radius of asectional circle.Assume A1 = p1 + rk belongs to C, and A2 = p2 + rN(with the same sign) also belongs to C.Strategy: We will see that (generically) C is uniquelydetermined by (A1,N1) and (A2,N2).Then the equation of T is parameterized by r .Expressing that the third point p3 belongs to the torus T ,provides the solution.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 10: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

3D circles passing through two oriented points

We suppose that two distinct points A1 and A2 and two vectorsN1 and N2 are given.

Consider the bisecting plane Π of the segment [A1A2].For i = 1,2, Ωi the intersection point between Π and theline passing through Ai and parallel to Ni .(Ωi is possibly at infinity.)Proposition:If Ω1 and Ω2 are not both infinite, and Ω1 6= Ω2,then there is exactly one fitting circle C.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 11: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Fitting a 3D circle

A1

A2

~N1~N2

1

2

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 12: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Quantification

For i = 1,2, Ωi := Ai + λiNi .Let

λ1 =‖A1A2‖2

2−→N1 ·−−−→A1A2

, λ2 =‖A1A2‖2

2−→N2 ·−−−→A2A1

. (1)

Then,

Ω =Ω1 + Ω2

2+

(λ21 − λ2

2)

2

−−−→Ω1Ω2

‖Ω1Ω2‖2. (2)

The radius R of the circle satisfies

4R2 = 4(λ21 + λ2

2)− ‖Ω1Ω2‖2 −(λ2

1 − λ22)2

‖Ω1Ω2‖2. (3)

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 13: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Unexpected algebraic properties

We now express the previous formulae with the coordinates ofA1 = (0,0,0), N1 = (0,0,1), N2 = (l ,m,n), A2 = (0, y2, z2).

Lemma:

S = 4‖Ω1Ω2‖2

‖A1A2‖2· (−→N1 ·−−−→A1A2) · (

−→N2 ·−−−→A2A1)

is a polynomial in the input parameters.Indeed,

S = l2(y22z2

2 + z24) + m2(y2

2 − z22 )2

+4 mny2z2(y22 − z2

2 ) + 4 n2y22z2

2.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 14: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

In addition, the following properties holds:4 · S · R2 = ‖A1A2‖2(S + l2y2

2 (y22 + z2

2 )), is a polynomial.

The coordinates of S ·−−→ΩM are polynomials in the input

parameters.

The quantity (−−−→Ω1Ω2 ·

−−→ΩM) · (

−→N1 ·−−−→A1A2) · (

−→N2 ·−−−→A2A1)

is a polynomial in the input parameters, namely

X (ly22z2 + lz2

3) + Y (−my22z2 + mz2

3 − 2ny2z22)+

+Z (my23 −my2z2

2 + 2ny22z2).

It provides a reduced equation of the supporting plane of thecircle.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 15: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Implicit equations of tori.

The squared distance of a point M to the skeletal circle is

(−→N ·−−→ΩM)2 +

(√‖ΩM‖2 − (

−→N ·−−→ΩM)2 − R

)2

.

hence, the equation is:(‖ΩM‖2 + R2 − r2

)2− 4R2

(‖ΩM‖2 − (

−→N ·−−→ΩM)2

)= 0.

Finally, we drop the hypothesis that−→N is a unitary vector:

|N‖2(‖ΩM‖2 + R2 − r2

)2−4R2

(‖N‖2 · ‖ΩM‖2 − (

−→N ·−−→ΩM)2

)= 0.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 16: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Proof of our theorem

Let P1 be at the origin, N1 = (0,0,1), P2 = (0, y2, z2);N2 = (l ,m,n) and P3 = (x3, y3, z3).

Introduce r1, r2, A1 = P1 + r1N1, A2 = P2 + r2N2, with

r12 = r2

2‖N2‖2 = r22(l2 + m2 + n2). (4)

Then the following polynomial quantities:

P := ‖A1A2‖2 = r22l2 + m2r2

2 + n2r22 + 2mr2y2

−2nr1r2 + 2nr2z2 + r12 − 2r1z2 + y2

2 + z22,

Q1 :=−→N1.−−−→A1A2 = nr2 − r1 + z2,

Q2 :=−→N2.−−−→A2A1 = l2r2 + m2r2 + n2r2 + my2 − nr1 + nz2.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 17: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Proof, cont’d

Using the properties given in our Lemma, the implicitequation of the torus writes:

PQ2

1 ·Q22· E(x , y , z, x2, y2, l ,m,n, r1, r2) (5)

where E is a polynomial.The vanishing of P,Q1,Q2 is not relevant to our problem.Symbolic computations show thar E is a polynomialof degree 4 in the variables x , y , z;of degree 8 in the variables l ,m;of degree 6 in the variables n, y2, z2, r2;of degree 7 in the variable r1.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 18: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Proof, end

So, we got two algebraic equationsE(x3, y3, z3, x2, y2, l ,m,n, r1, r2) = 0 ,U := r1

2 − r22(l2 + m2 + n2) = 0

We divide E by U w.r.t. r1 and get S1 + r1S2.So, we have the system

S1 + r1S2 = 0, r12 − r2

2(l2 + m2 + n2). (6)

where S1 and S2 are polynomials of degree 4 and 3.The elimination of r1 yields a polynomialin x3, y3, z3, l ,m,n, y2, z2, r2of degree 8 w.r.t. the variable r2. Then r1 = −fracS1S2.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 19: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

A maximal configuration

Figure: Eight smooth tori that interpolate a point set.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 20: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Report on Experiments with Maple

Proportion of the number of smooth tori found throughten thousands random point sets.

Number of tori 0 1 2 3 4Proportion (%) 7.98 39.42 29.71 16.61 5.01

Number of tori 5 6 7 8Proportion (%) 0.77 0.47 0.02 0.01

The average time was 24 ms(almost independently of the point set).For the applications , we also require that R > r .

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 21: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Conclusion

We studied efficient fitting algorithms to find tori passingthrough minimal sets of points or points with normals.Our analysis reduced to quantify the study a 3D circleinterpolation problem.We got a fast algorithm, with simple techniques inspired byclassical effective algebraic geometry.Its main step consists of evaluating polynomials andapplying rather simple matrix-based closed formulae.The resulting procedure is much more efficient than theexisting extraction procedures; it will be implemented inC + + and included in the specialized sofwares.

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets

Page 22: Extraction of tori from minimal point sets - Inria · Extraction of tori from minimal point sets Andre GALLIGO (UCA, INRIA, AROMATH team and LJAD),´ Laurent Buse (UCA, INRIA, AROMATH

Thank you for your attention

BUSE-GALLIGO, MEGA17, NICE Extraction of tori from minimal point sets