Robust Computation in Engineering, Geometry and Duality ICONS 2012 Reunion Island Courtesy of http://www.google.cz Václav Skala University of West Bohemia, Plzen, Czech Republic VSB‐Technical University, Ostrava, Czech Republic http://www.VaclavSkala.eu Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 1 Plzen (Pilsen) City Plzen is an old city [first records of Plzen castle 976] city of culture, industry, and brewery. City, where today’s beer fermentation process was invented that is why today’s beers are called Pilsner ‐ world wide Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 2 Ostrava City Ostrava is • an industrial city of coal mining & iron melting • 3rd largest city Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 3 University of West Bohemia 17530 students + 987 PhD students Computer Science and Engineering Mathematics (including Geomatics) Physics Cybernetics Mechanics (Computational) • Over 50% of income from research and application projects • NTIS project (investment of 27 mil. EUR) • 2nd in the ranking of Czech technical / informatics faculties 2009, 2012 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 4 “Real science” in the XXI century Courtesy of Czech Film, Barrandov Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 5 History of Mathematics • Euclid ‐ synthetic geometry 300 BC • Descartes ‐ analytic geometry 1637 Main line • Gauss – complex algebra 1798 • Hamilton – quaternions 1843 • Grassmann – Grasmann Algebra 1844 • Cayley – Matrix Algebra 1854 • Clifford – Clifford algebra 1878 • Gibbs – vector calculus 1881 • Sylvester – determinants 1878 • Ricci – tensor calculus 1890 • Cartan – differential forms 1908 • Dirac, Pauli – spin algebra 1928 Hestenes – Space‐time algebra 1966 Î Geometry Algebra 1984 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 6 Robust Computation in Engineering, Geometry and Duality • Typical engineering and geometrical problems • Euclidean and projective spaces • Duality, property of dual transformation • Algorithm complexity and dual problems • Robustness & influence to algorithm design • Typical examples of duality applications Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 7 Numerical systems • Binary system is used nearly exclusively • Octal & hexadecimal representation is used • If we would be direct descendants of tetrapods – we would have a great advantage – “simple counting” Name B 16 Half B 32 Single B 64 Double B 128 Quad D 32 D 64 D 128 Base Digits E min BINARY 2 10+1 −14 2 23+1 −126 2 52+1 −1022 2 112+1 −16382 DECIMAL 10 7 −95 10 16 −383 10 34 −6143 IEEE 758‐2008 standard Vaclav Skala http://www.VaclavSkala.eu E max Figure 1 15 127 1023 16383 96 384 6144 ICONS 2012 8 Mathematically perfect algorithms fail due to instability • Main issues – stability, robustness of algorithms – acceptable speed – linear speedup – results depends on HW, CPU …. parameters ! • Numerical stability – limited precision of float / double – tests A ? B with floats • if A = B then ….. else ….. ; if A = 0 then ….. else …. should be forbidden in programming languages – division operation should be removed or postponed to the last moment if possible ‐ “blue screens”, system resets Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 9 Typ pical exaamples of instability – interssection of 2 linees in E3, – pointt lies on a line in n E2 or aa plane in E3 Ax + By + C == 0 or Ax + Byy + Cz + D = 0 – detecction if aa line inttersects a polyggon, toucches a vvertex orr passes throu ugh Typiccal problem doub ble x = ‐1 1; doublle p = … ….; while e ( x < +1) { iff (x == p) Console.Out.W WriteLine(” *** ”) x += p; } = 0.1 theen no output, iff p = 0.25 then eexpected d output ## if p = Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 10 Delaunay triiangulattion & V Voronoi diagram m Pointt inside of a circcle given n by threee points –– pro oblems w with meshing pointts in reggular recctangular grid. It can be see en that tthe DT & & VD is vvery sen nsitive to o a point positio on changge ?? ROB BUSTNESSS ?? Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 11 Vecto ors and Points iin Geom metry Vecto ors – mo ovable, no fixed d positio on Pointts – no ssize, possition fixxed in th he GIVEN coord dinate syystem Coorrdinate ssystems: •C Cartesian n – left // right handed right han nded sysstem is u used P • Polar • Spherica S l • and many otherss, e.g. Co onfocal Ellipsoid dal Coorrdinatess (h http://m mathworrld.wolfrram.com m/ Confo ocalEllip psoidalCoordinaates.htm ml) Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 12 Vectors and Points in Geometry Vector representation v = ( vx , vy , vz : 0 ) Point representation P = ( Px , Py , Pz : 1 ), resp. ( Px , Py , Pz : Pw ), Many libraries do not distinguish between points and vectors and treat them in the same manner !! BE CAREFUL !! v = P1 – P0 = ( Px1 , Py1 , Pz1 : 1 ) ‐ ( Px0 , Py0 , Pz0 : 1 ) = ( Px1 – Px0 , Py1 – Py0 , Pz1 – Pz0 : 0 ) = ( vx , vy , vz : 0 ) !!! Do not make it on CPU/GPU – result ( vx , vy , vz : ε ) It is a point ( vx / ε, vy /ε, vz / ε ) in E3 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 13 Floating point • Not all numbers are represented correctly • Logarithmic arithmetic • Continuous fractions • Interval arithmetic 1 1 3 y 2 5 3 … 3; 7,15,1,292,1,1,1,2,1,3,1 … x + y = [a + c, b + d] • NOT valid identities 1 x 4 x = [ a , b ] x ‐ y = [a ‐ d, b ‐ c] y = [ c , d ] x × y = [min(ac, ad, bc, bd), max(ac, ad, bc, bd)] Vaclav Skala http://www.VaclavSkala.eu x / y = [min(a/c, a/d, b/c, b/d), max(a/c, a/d, b/c, b/d)] if y ≠ 0 ICONS 2012 14 Statements like if <float> = <float> then …. or if <float> ≠ <float> then …. should not be Quadratic equation 0 If 4 then 4 ⁄ to get more reliable results. Vaclav Skala http://www.VaclavSkala.eu /2 ICONS 2012 15 Function value computation , 333.75 11 77617, at 121 2 33096 5.5 / 2 6.33835 10 single precision 1,1726039400532 double precision 1,1726039400531786318588349045201838 extended precision The correct result is “somewhere” in the interval of 0,827396059946821368141165095479816292005, 0,827396059946821368141165095479816291986 Exact solution , 2 2 Vaclav Skala http://www.VaclavSkala.eu 54767 66192 ICONS 2012 16 Summation is one of often used computations. 10 0.999990701675415 10 1.000053524971008 or The result should be one. The correctness in summation is very important in power series computations. !!!!ORDER of summation 1 1 14.357357 14.392651 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 17 Recursion MOVE (A, C, n); { MOVE (A, B, n‐1); MOVE (A, C, 1); MOVE (B, C, n‐1) } # MOVE (from, to, number) # • Towers o Hanoi • Ackermann function , 1 1,1 1, , 0 0 0 1 0 0 The value of the function grows very fast as 4,4 2 2 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 18 Numerical computations Hilbert’s Matrix 1 1 1 2 1 1 1.0E+19 1.0E+17 1.0E+15 1.0E+13 1.0E+11 1.0E+09 Error 1.0E+07 1.0E+05 1.0E+03 1.0E+01 1.0E-01 1.0E-03 ε 1.0E-05 1.0E-07 εp 1.0E-09 ξ 1.0E-11 1.0E-13 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Order of the Hilbert matrix Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 19 Mathematical “forms” There are several “forms”: • Implicit , , 0 0 there is no orientation, e.g. o if 0 is a iso‐curve there is no hint how to find another point of this curve, resp. a line segment approximating the curve => tracing algorithms o if 0 is a iso‐surface there is no hint how to find another point of this surface => iso‐surface extraction algorithms • Parametrical – , points of a curve are “ORDERED” according to a parameter • Explicit , for the given values , resp. , we get function value Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 20 Implicit form m • Iss used fo or separration – plane or for dettection if a poin nt is insid de or o outside, e.g. a circle etc.. • There is a T always aa question how to comp pute complexxity of co omputattions × p precision n of com mputatio on • Compiler C r optimization iss DANGEEROUS iin generral Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 21 Data processing ‐ main field in computer science Data processing itself can be split to two main areas: • processing of textual data limited interval of values, unlimited dimensionality [char as one dimension ‐ Methionylthreonylthreonylglutaminylarginyl...isoleucine 189,819 chars] ‐ no interpolation is defined • processing of numerical data Dim unlimited interval of values, limited dimensionality – usually 2 or 3 Interval ‐ interpolation can be used Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 Textual ∞ 0‐255 (ASCII) Graphical 2, 3 (‐∞, ∞) 22 Hash functions • usually used for textual data processing • prime numbers and modulo operations are used for the hash function Usual form 5 7 multiplication int * float is needed 1000 Number of buckets 3 271 100 10 1 1 2001 4001 6001 8001 1 12001 10001 Bucket length Number of buckets 100 18 10 1 1 201 401 601 801 1001 1201 Bucket length Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 23 If the hash function is constructed as where , , are “irrational” numbers and is 2 1 better distribution data set: A4_unterbau1.stl 1000000 173878 Number of clusters 100000 10000 1000 100 10 1 1 10 100 1000 Cluster length obtained => much faster processing. Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 24 Textual processing English dictionary (start) 10000 The has function is constructed as 1000 100 „irrational“ 0 2 1 10 1 0 0.2 0.4 0.6 0.8 1 q 1 Both geometrical and textual hash function design have the same approach coefficients are “irrational” and no division operation is needed. Some differences for Czech, Hebrew, English, German, Arabic, … languages and “chemical” words. Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 25 Projective Space X = [X, Y]T X∈E2 w 2 w=1 X = x / w Y = y / w D(ρ) E2 D(p) X Y A x y a & w ≠ 0 D(E2) c=1 x ρ Conversion: 2 D(P ) p x = [ x, y: w] x∈P T c 2 P B (a) b (b) If w = 0 then x represents “an ideal point” ‐ a point in infinity, i.e. it is a directional vector. The Euclidean space E2 is represented as a plane w = 1. Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 26 Duality For simplicity, let us consider a line p defined as: aX + bY + c = 0 We can multiply it by w ≠ 0 and we get: w c P2 D(P2) p D(ρ) 2 E w=1 D(E2) c=1 x ρ D(p) X Y A x y a B (a) ax + by + cw = 0 i.e. pTx = 0 p = [ a, b: c]T b (b) x = [ x, y: w]T It is actually a plane in the projective space P2 (point [0, 0: 0]T excluded), i.e. line p∈E2: p = [a, b: c]T Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 27 From the mathematical notation pTx = 0 we cannot distinguish whether p is a line and x is a point or vice versa in the case of P2. It means that a point and a line are dual in the case of P2, and a point and a plane are dual in the case of P3. The principle of duality in P2 states that: Any theorem remains true when we interchange the words “point” and “line”, “lie on” and “pass through”, “join” and “intersection”, “collinear” and “concurrent” and so on. Once the theorem has been established, the dual theorem is obtained as described above. This helps a lot to solve some geometrical problems. Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 28 Definition 1 The cross product of the two vectors x1 = [x1,y1:w1]T and x2 = [x2,y2:w2]T is defined as: ⎡i x1 × x 2 = det ⎢⎢ x1 ⎢⎣ x2 j y1 y2 k⎤ w1 ⎥⎥ w2 ⎥⎦ where: i = [1,0,0]T, j = [0,1,0]T, k = [0,0,1]T Please, note that homogeneous coordinates are used. Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 29 Theorem 1 Let two points x1 and x2 be given in the projective space. Then the coefficients of the p line, which is defined by those two points, are determined as the cross product of their homogeneous coordinates p = x1× x2 Proof 1 Let the line p∈E2 be defined in homogeneous coordinates as ax + by + cw = 0 We are actually looking for a solution to the following equations: pT x1 = 0 and pT x2 = 0 where: p = [a,b,c]T Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 30 It means that any point that lies on the p line must satisfy both the x T p equation above and the equation x = 0 in other words the p vector is ⎡i p = det ⎢⎢ x1 ⎢⎣ x2 defined as j y1 y2 k⎤ w1 ⎥⎥ w2 ⎥⎦ ⎡x det ⎢⎢ x1 T x1 × x2 x = 0 ⎢⎣ x2 We can write i.e. ( ) w⎤ w1 ⎥⎥ = 0 w2 ⎥⎦ y y1 y2 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 31 Evaluating the determinant 0 we get the line coefficients of the line p as: ⎡ y1 a = det ⎢ ⎣ y2 w1 ⎤ w2 ⎥⎦ ⎡ x1 b = − det ⎢ ⎣ x2 w1 ⎤ w2 ⎥⎦ ⎡ x1 c = det ⎢ ⎣ x2 y1 ⎤ ⎥ y2 ⎦ Note: for w = 1 we get the standard cross product formula and the cross product defines the p line, i.e. p = x1 × x2 Cross product is where: p = [a,b:c]T • An intersection of two lines => A x = b • A line given by two points => A x = 0 Vaclav Skala http://www.VaclavSkala.eu equivalent to a solution of a linear system of equations ! No division operation ! ICONS 2012 32 Computation in Projective Space • Cross product definition • A plane ρ is determined as a cross product of three given points Due to the duality • An intersection point x of three planes is determined as a cross product of three given planes ⎡i ⎢x x1 × x 2 × x3 = ⎢ 1 ⎢ x2 ⎢ ⎣ x3 j y1 y2 k z1 z2 y3 z3 ⎡i ⎢a ρ1 × ρ 2 × ρ3 = ⎢ 1 ⎢ a2 ⎢ ⎣ a3 j b1 b2 k c1 c2 b3 c3 l ⎤ w1 ⎥⎥ w2 ⎥ ⎥ w3 ⎦ l ⎤ d1 ⎥⎥ d2 ⎥ ⎥ d3 ⎦ Computation of generalized cross product is equivalent to a solution of a linear system of equations => no division operation! Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 33 Computation in Projective Space E2 E3 Dual problem In graphical applications position of points are changed by an interaction, . The question is how coefficients of a line, resp. a plane are i.e. changed without need to recompute them from the definition. It can be proved that , resp. As the computation is made in the projective space we can write , resp. THIS IS SIGNIFICANT SIMPLIFICATION OF COMPUTATIONS Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 34 Computation in Pro ojective SSpace Transsformattion about a gen neral axis Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 35 Computation in Projective Space Transformation about a general axis 1 1 where: Instead of usually used transformations: That is generally complex, unstable as a user has to select which axis is to be used for a rotation Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 36 Computation in Projective Space 7.00 Interpolation 6.00 Linear parametrization X(t ) = X0 + ( X 1 − X0 )t t ∈ ( −∞, ∞ ) Non-linear (monotonous) parametrization 5.00 4.00 x(t ) = x0 + (x 1 − x0 )t t ∈ ( −∞, ∞ ) x(t ) = x0 + ( x 1 − x0 )t y (t ) = y0 + ( y 1 − y0 )t z (t ) = z0 + ( z 1 − z0 )t w(t ) = w0 + ( w 1 − w0 )t 3.00 2.00 1.00 0.00 0.0 • It means that we can interpolate using homogeneous coordinates without a need of “normalization” to Ek !! • Homogeneous coordinate w ≥ 0 In many algorithms, we need “monotonous” parameterization, only Vaclav Skala http://www.VaclavSkala.eu 0.2 0.4 0.6 0.8 1.0 1.2 Y 3.10 2.90 2.70 2.50 2.30 2.10 1.90 1.70 1.50 0.00 ICONS 2012 1.00 2.00 3.00 4.00 5.00 6.00 7.00 37 Computation in Pro ojective SSpace Courtesy of W Wikipedia Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 38 Computation in Projective Space Spherical interpolation , Instability occurs if Ω sin 1 Ω sin Ω , sin Ω sin Ω . Mathematically formula is correct, in practice the code generally incorrect! [ ] , sin 1 sin 1 , Ω sin Ω Ω sin Ω sin Ω : sin Ω Homogeneous coordinate Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 39 Computation in Projective Space Intersection line – plane t ∈ ( −∞, ∞ ) x(t ) = x0 + (x 1 − x0 )t aT x = 0 ax + by + cz + d = 0 a = [ a , b, c , d ] T t=− An intersection of a plane with a line in E2 / E3 can be computed efficiently S = X 1 − X0 T a x0 Comparison operations must be modified !!! aT s τ = −aT x0 τ w = aT s t = ⎡⎣τ : τ w ⎤⎦ if τ w ≤ 0 then t := −t TEST if t > tmin then..... Cyrus‐Beck line clipping algorithm 10‐25% faster if τ *τ min w > τ w *τ min then..... condition τ ≥ 0 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 40 Line Clippingg proce edure CLLIP_L; {Skkala – Vol.21, No.11, pp.90 05‐914} { xA , xxB – in h homogen neous coo ordinates } { The EXIT end ds the prroceduree } ut: xA , xB ; xA=[xA,yA,1]T p p = [a,b,c]]T } { inpu begin n {1} p := x p xB; { ax+b by+c = 0}} A x x {2} fo or k:=0 to o N‐1 do o { xk=[xk,yk,1]T } {3} if pTxk ≥ 0 then n ck:=1 e else ck:=0 0; 00]T or c = [1111]]T then EX XIT; {4} iff c = [000 {5} i:= TAB1[cc]; j:= TAB2[c]; ei ; xB := p p x ej ; {6} xA A := p x e {7} DRAW (x D h edge } A; xB ) {ei – i‐th end {{CLIP_L}; Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 41 Computation in Projective Space ‐ Barycentric coordinates Let us consider a triangle with vertices X1, X2, X3, A position of any point X∈E2 can be expressed as a1 X1 + a2 X 2 + a3 X 3 = X a1Y1 + a2Y2 + a3Y3 = Y additional condition a1 + a2 + a3 = 1 0 ≤ ai ≤ 1 x2 P3 x P2 P1 x3 x1 Pi i = 1,...,3 ai = P Linear system must be solved If points xi are given as [xi, yi, zi: wi ]T and wi ≠ 1then xi must be “normalized” Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 42 Computation in Projective Space b1 X1 + b2 X 2 + b3 X 3 + b4 X = 0 b1Y1 + b2Y2 + b3Y3 + b4Y = 0 b1 + b2 + b3 + b4 = 0 bi = −ai b4 i = 1,...,3 b4 ≠ 0 b = ⎡⎣b1 , b2 , b3 , b4 ⎤⎦ Rewriting ⎡ X1 ⎢Y ⎢ 1 ⎢⎣ 1 b = ξ × η× w X2 X3 Y2 Y3 1 1 ⎡ b1 ⎤ X ⎤⎢ ⎥ b2 ⎥ ⎥ ⎢ Y ⎥ =0 ⎢ b3 ⎥ 1 ⎥⎦ ⎢ ⎥ ⎣b4 ⎦ T ξ = ⎡⎣ X 1 , X 2 , X 3 , X ⎤⎦ η = ⎡⎣Y1 , Y2 , Y3 , Y ⎤⎦ w = [1,1,1,1] T T T Solution of the linear system of equations (LSE) is equivalent to generalized cross product Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 43 Computation in Projective Space b = ξ × η× w b = ⎡⎣b1 , b2 , b3 , b4 ⎤⎦ if wi ≠ 1 ⎡ x1 ⎢y ⎢ 1 ⎢⎣ w1 x2 y2 x3 y3 w2 w3 ξ = ⎡⎣ x1 , x2 , x3 , x ⎤⎦ ⎡ b1 ⎤ x ⎤⎢ ⎥ b2 ⎥ ⎥ ⎢ =0 y ⎥ ⎢ b3 ⎥ w ⎥⎦ ⎢ ⎥ ⎣b4 ⎦ T T η = ⎡⎣ y1 , y2 , y3 , y ⎤⎦ T w = ⎡⎣w1 , w2 , w3 , w⎤⎦ T 0 ≤ (−b1 : w2 w3 w) ≤ 1 0 ≤ (−b2 : w3 w1w) ≤ 1 => entities: projective scalar, projective vector 0 ≤ (−b3 : w1w2 w) ≤ 1 ( Skala,V.: Barycentric coordinates computation in homogeneous coordinates, Computers&Graphics, 2008) Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 44 Computation in Pro ojective SSpace Line in E3 ass Two Plane Interrsection • Pl P ücker’s coordinaates – complicatted comp putation P e computtation • Projective Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 45 Computation in Projective Space Standard formula The formula is quite “horrible” one and for students not acceptable as it is too complex and they do not see from the formula comes from. Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 46 Computation in Projective Space , , : , , : normal vectors are , , , , directional vector of a line of two planes and is given as “starting” point ??? A plane The point , passing the origin with a normal vector , is defined as , :0 How simple formula supporting matrix‐vector architectures like GPU and parallel processing Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 47 Computation in Projective Space Advantages • • • • • “infinity” is well represented No division operation is needed Many mathematical formula are simpler One code sequence solve primary and dual problems Supports matrix – vector operations in hardware – like GPU etc. Disadvantages • Careful handling with formula as the projective space • Exponents of the homogeneous vector can overflow – it should be normalized not supported by the current hardware – P_Lib use on GPU (C# and C++) Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 48 Computation in Pro ojective SSpace • G GPU (Graphical Prrocessingg Unit) ‐o optimized d for mattrix‐vecto or, vecto or‐vector o operation n – especcially for [x,y,z,w] • N Native ariithmetic operatio ons with homogeneous co oordinatees – with hout e exponent t “normalization” • Programm P mable HW W – parallel proceessing Vaclaav Skala http://www.VaaclavSkala.eeu ICON NS 2012 49 Computation in Projective Space 4D cross product can be implemented in Cg/HLSL on GPU (not optimal implementation) as: float4 cross_4D(float4 x1, float4 x2, float4 x3) { float4 a; a.x=dot(x1.yzw, cross(x2.yzw, x3.yzw)); a.y=‐dot(x1.xzw, cross(x2.xzw, x3.xzw)); a.z=dot(x1.xyw, cross(x2.xyw, x3.xyw)); a.w=‐dot(x1.xyz, cross(x2.xyz, x3.xyz)); return a; } Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 50 Acknowledgment Questions Thanks belong to colleagues at UWB & VSB universities for discussions and help, to many authors of published related papers, I haven’t refer properly (a list would be too long*). Research supported by the MSMT CR, projects No. LA10035, ME10060 Contact: Vaclav Skala http://www.VaclavSkala.eu University of West Bohemia, Plzen & VSB‐Technical University, Ostrava Czech Republic *) Please, find related reference in: • Skala,V.: Geometry, Duality and Robust Computation in Engineering, submitted for publication, 2012 • Skala,V.: Interpolation and Intersection Algorithms and GPU, ICONS2012, VisGra 2012 workshop, accepted for publications, 2012 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 57 Main References [1] van Verth,J.M., Bishop,L.M.: Essential Mathematics for Games and Interactive Applications, Morgan Kaufmann 2005 [2] Skala,V.: GPU Computation in Projective Space Using Homogeneous Coordinates , Game Programming GEMS 6 (Ed.Dickheiser,M.), pp.137‐147, Charles River Media, 2006 [3] Skala,V.: A new approach to line and line segment clipping in homogeneous coordinates, The Visual Computer, Vol.21, No.11, pp.905‐914, Springer Verlag, 2005 [4] Skala,V.: Barycentric coordinates computation in homogeneous coordinates, submitted for publication, 2007 [5] Skala,V.: Length, Area and Volume Computation in Homogeneous Coordinates, International Journal of Image and Graphics, Vol.6., No.4, pp.625‐639, 2006 [6] Yamaguchi,F.: Computer Aided Design – A totally Four‐Dimensional Approach, Springer Verlag 2002 [7] Fernando,R., Kilgard,M.J.: The Cg Tutorial, Addison Wesley, 2003 [8] Skala,V., Kaiser,J., Ondracka,V.: Library for Computation in the Projective Space, Aplimat 2007 conf., 2007 [9] Uhlir,K., Skala,V.: Radial Basis Functions, EUSIPCO 2005 Vaclav Skala http://www.VaclavSkala.eu ICONS 2012 58 RESOURCES FOR ROBUST COMPUTATION Numerical nonrobustness causes all kinds of failures. But can you produce an example with an infinite loop? This and other forms of manifestation are discussed in Anatomy of Algorithmic Failures. It is intended to provide classroom examples. Source code available. Robust Geometric Algorithms and their Implementation, Guest Editorial Forward from a Special Issue of Computational Geometry: Theory and Applications (CGTA 33:1, 2006). Resource Page for ``Survey/Tutorial on Exact Geometric Computing'' Lectures at Workshop on Geometric Computing, University of Hong Kong, June 27‐‐29, 2001. General Forums on Nonrobustness Issues ‐‐ DIMACS Workshop on Implementation of Geometric Algorithms Dec 4‐6, 2002 ‐‐ SIAM Minisymposium: Robust Geometric Computation (2001) ‐‐ MSRI Workshop on Foundations of CAD (1999) ‐‐ SIAM Workshop on Integration of CAD and CFD (1999) ‐‐ Emerging Challenges in Computational Topology Report (1999) ‐‐Computational Geometry Task Force Report (1996) ‐‐ SIGGRAPH'98 Panel on Robust Geometry. Position Statements from panelists. ‐‐ACM Strategic Directions Report (1996) ‐‐Tom Peters's presentation on Non‐robustness Issues in CAGD [here is a local copy] This work is part of the NSF/DARPA CARGO Program (2001‐4) in which non‐robustness and topological consistency issues are addressed. Non‐robustness in the News ‐‐ Patriot Missile Defense Saga, from US General Accounting Office (local copy) ‐‐ Ariane 5 Saga, from European Space Agency ‐‐ Software Bugs Cost US economy $59.5 billion/year. The report focused on the financial sector, and the automotive and aircraft manufacturing industries. In the latter 2 industries, the cost is estimated at $1.8 billion/year. Report was prepared by Research Triangle Institute for NIST. ‐‐ Disasters attributable to numerical errors, from Doug Arnold (including the North Sea oil rig collapse) Projects and Groups ‐‐K. Mehlhorn at Max‐Planck Institute of Computer Science is involved in various robustness projects (LEDA, CGAL, EXACUS). ‐‐PRISME Project at INRIA, Sophia‐Antipolia, directed by J.‐D. Boissonnat. ‐‐ Superrobust Computation Project of K. Sugihara at Tokyo University ‐‐ Arenaire Project of J.‐M. Muller. ‐‐ iRRAM Project of N. Mueller is a C++ package for error‐free real arithmetic based on the concept of a real RAM. ‐‐ Professor Cuyt's Group on Computer Arithmetic and Numerical Techniques. ‐‐ Evaluation of Special Functions from Dan Lozier at NIST: includes a function evaluator service. RETRIEVED from http://www.cs.nyu.edu/csweb/Research/Groups/ Vaclav Skala http://www.VaclavSkala.eu http://www.cs.nyu.edu/csweb/Research/Groups/ ICONS 2012 59 Software ‐‐ GMP Home. New in GMP 3.1 (FFT Based Multiplication!) ‐‐MPFR homepage The MPFR library is a C library for multiprecision floating‐point computations with exact rounding. It is based on the GMP multiprecision library and will replace the MPF class starting with version 3.1 of GMP. Here are some timings . ‐‐ Intel's Open source for Numerics ‐‐ Arithmetic Explorer Robust Meshing and Triangulation ‐‐ GNU Triangulated Surface (GTS) Library: Open Source free software for 3D surfaces triangular meshes. Version 0.4.0 (Jan 2001). FEATURES: based on the GTK+ GUI Toolkit, 2D dynamic constrained Delaunay triangulation, robust predicates of Shewchuk, Boolean set operations, multiresolution models, dynamic view‐independent LOD, some view‐dependent LOD, Kd‐trees, collision detection. [ Bibliography | Reference Manual | ] Computing transcendental functions. ‐‐ The Table Maker's Dilemma ‐‐ Elementary Functions, Algorithms and Implementation, book by Jean‐Michel Muller from Birkhauser, Boston (1997). Organizations and Web Resources ‐‐ CCA Net (Computability and Complexity in Analysis) ‐‐ Interval Computation ‐‐ Real Algebraic and Analytic Geometry (RAAG) ‐‐ Foundations of Computational Mathematics Software Resources Source Forge: free Open Source developer services (CVS, mailists, forums, site hosting, etc). Thousands of projects in every field. Conferences ‐‐ IEEE Symposium on Computer Arithmetic. Call for Papers for 15th Symposium on Computer Arithmetic (Nov 1, 2000). ‐‐ 4th Conference on Real Numbers and Computers ‐‐ 4th Workshop on Computability and Complexity in Analysis Sep 17‐20, 2000, Swansea, Wales. Bibliography Collection ‐‐ Constructivity, Computability and Complexity in Analysis, a collection of over 500 entries. ‐‐ Numerical techniques from Rational Approximation Theory and Computer Arithmetic, a collection of over 2500 entries. RETRIEVED from http://www.cs.nyu.edu/csweb/Research/Groups/ Vaclav Skala http://www.VaclavSkala.eu http://www.cs.nyu.edu/csweb/Research/Groups/ ICONS 2012 60