
1 Geometric Algebra applied in three dimension images modeling Ing. Ricardo Piraján Cantillo, M.E. Automation Ph.D. student Universidad Nacional de Colombia [email protected] Abstract—This paper show the application of a Geometric Algebra A. Brief History of Geometric Algebra (GA) (GA) to obtain a computer 3 dimensional image, the objective is exploring implementation of a realistic images reconstruction (3D) Many different algebraic systems exist and are in use today, using GA. The algorithm used to obtain the 3D image is ray tracing all with their own advantages and disadvantages. The GA is method and the geometrical computations are made using GA. An a new tool to facilitated physics interpretation[2]. other objective is to propose a model to be implemented in hardware A problem tackled i the first part of the 19th century was programmable, as FPGA (Field Programmable Gate Array), this how best to represent 3-D rotations. William Rowan Hamilton model will be use in computations of GA, also the paper is focused in examined the advantage of using GA. The obtained results showed produced the quaternions, wich generalize complex numbers that using GA the computations are less complex, because GA and phase rotations to 3-d. involved in some objects (bivectors, trivector) a better description In separate development, Grassmann pioneered the introduc- of Gemoetric objects presents in 3D images (lines, planes, volumes), tion of the exterior product. This defined what we now call a and shows as simple computations Geometrical multiplicaction and bivector a ^ b from two vectors[3]. Division. A problem was this operations implementation in MatLab, there isn’t native support, but it was the first effort, when it was An important characteristic of this product are associativity passed the computes and model description are easier. The obtained a^(b^c) = (a^b)^c and anticonmmutativity a^b = −b^a[4]. model to hardware can be implemente as next stage in 3D image Hermann Gunther Grassmann (1809-1877) his contribution in reconstruction. areas of differential forms and Grassmann (Anticonmuting) Index Terms—Geometric Algebra (GA), Clifford’s Algebra (Is variables. another name of GA), Multivector, outter product, Geometric In 1978 Clifford made a crucial step and introduced his Product, Quaternions, rotor, translation, Ray Tracing Algorithm, Geometric Algebra by uniting the dot Product and exterior Field Programmable Gate Array. product into a single Geometric Product[2]. Clifford’s system combined all of the advantages of quaternions with those of vector geometry. In those years Clifford death (with 34 years old) and Gibbs I. INTRODUCTION introduced his vector Calculus and Geometric Algebra was eclipsed. We live in a three dimensional (3D) world and it is generally In 1920’s Clifford Algebra resurfaced as the algebra underly- described in 3D Euclidean Geometric in computer grahics ing quantum spin.However, these were treated just as algebras applications[10]. To develop an application programmers use - the geometrical meaning was lost[2]. homogeneous coordinates, wich uses a 4D linear algebra In 1960’s David Hestenes started to recover the geometrical to perfome some of the 3D Euclidean geometry. Normaly meaning (in 3-d and 4-d). develop of this applications is getting confusing to choice Today Geometric Algebras is been aplied in topics as diverse the correct model, because be use complex linear algebra as black holes and Cosmology, quantum tunneling and quan- to handling unfamiliar spaces 4D, 5D and 6D. In this paper tum filed theory, beam dynamics and buckling, robotics and is proposed using Geometric Algebra (GA) to do 3D image Computer vision[2]. modeling. This is because in GA we have a framework con- taining these modeling options and approaches in a organized manner[1]. B. Geometric Algebra: Fundamentals In this paper is presented in section I a brief history of GA, 1) The Inner Product: The inner product, or dot product a·b some fundamentals of GA, description the ray tracing method, is define as a · b = jajjbj cos(θ) this is to Euclidean Spaces. In it is used to generate 3D images in computer. In section II non-Eucliden spaces, as Minkowski spacetime, is introduced µ is showed the proposed solution and how it be implemented a orthogonal frame and compute the dot product as aµb or µ ν using GA, in section III is showed the results of implementa- ηµν a b where ηµν in the metric tensor[4]. We can use it to tion the proposed solution using MatLab and the hardware obtain angle between two vectors and this product is a scalar pourpose model, section IV show the discission about the par of a Multivector. results and proposed implemented, and finally section V shows 2) The Cross Product: This only exist in 3D space and is conclusions about the implementation. defined such that a × b is perpendicular to the plane defined 2 by a and b. Its magnitude is jajjbj sin(θ) and a × b is formed by right-hand rule. 3) The Outer Product: The outter product is defined as the direct area swept out by a and b. This is denoted by a ^ b the plane area is jajjbj sin(θ), wich is defined to be the magnitude of a ^ b. The this oriented plane is denominated bivector [4]. Figure 2. Principle of ray tracing Algorithm [9] II. PROPOSED SOLUTION The proposed Solution is using ray tracing as algorithm to Figure 1. Geometric Interpretation Outter Product [2] implements a 3D image and computes geometric transforma- tions using GA. The geometric computations and operations Properties: that must be will implement to implement a model are: • The outter Product is antisymmetric. a ^ b = −b ^ a Rotation and Translation of arbitrary primitives (points, lines, • Bivectors form a linear space planes); Reflection and refraction (Snell’s Law) of directed • The outter product is distributive a^(b^c) = a^b+a^c lines; Test for and computation of the intersection of lines 4) The Geometric Product: The Geometric product is a and planes, lines and triangles, and lines and spheres; Com- inner and outter products combination defined by ab = a · b + putations of the angle between lines and/or the angle between a ^ b. in this case are adding two different objects, is a case palnes; and computation of the distance between two points similar to complex numbers. we can defined inner and outter and the signed distance of points to planes. product in term of Geometric product (Clifford Product). In the introduction was reviewed GA and was showed geomet- ric product wich permits multiplication and division by vectors 1 1 and subspaces. The ratio of two vectors form a rotor[6] wich a · b = (ab + b) a ^ b = (ab − ba) 2 2 can be used a rotation operator. The dual operator returns the dual of any blade. In the next subsections will be explained Properties: how made geometric computations to construct 3D image • General Elements of a GA are called multivectors and model. these for a linear space. A; B; ··· • Associativity A. Rotation/traslation: A(BC) = (AB)C = ABC A rotation v0of a vector v about an axis can be done using a rotor R calculating geometric product v0 = RvR−1. To obtain • Distributive R must be compute R = e(−φ/2i) where i is a unit bivector denoting the plane of rotation and φ is the angle of rotation. A A(B + C) = AB + AC plane is now given by its unit vector b and its scalar distance to the origin δ, and its rotated/translate as follows: b0 = RbR−1 • The square of any vector is a scalar and δ0 = δ + (t ^ b0) where δ scalar distance to the origin. C. The ray tracing Method B. Line-plane intersection: Ray tracing is a Method to generating realistic images The intersection qi point of a line and a plane can be computed as by computer, wich the paths of individual rays of light are ∗ ((ql ^ b) − δ)u followed from viewer to their points of origin. It accepts as qi = ql − input a description of the scene, including camera, lighting, (u ^ b)∗ and polygonal model information such as position, orien- if u ^ v is not equal to 0. tation, shape, and material properties.[9] For each image pixel, a ray is traced through the scene as it its models and possibly gets reflected and refracted. This method re- C. Line-sphere intersection: quires representations of geometric primitives such as vectors, The intersection points q− and q+ of a line and a sphere points, lines, planes, spheres, as well transformations of these (given by its center point qs and its scalar radius ρ). The closest primitives.[8]. There is acomplete specification of this algo- point qc to the center of the sphere on the line is computed as rithm in (http://www.science.uva.nl/ fontijne/raytracer). qc = ql + ((qs − ql) · u)u, the normalized squared Euclidean 3 2 distance, δn of qc to qs determines if the line intersects the sphere: (q − q ) · (q − q ) δ2 = c s c s n ρ2 2 if δn is larger than 1, the line and the sphere do not intersec. 2 If δn = 1, qc is the single intersection point. otherwise q− and q+ can be computed as p 2 q± = qc ± ρ 1 − δnu D. Reflection The reflection of a line in a plane can be computed as u0 = −brb−1 = bub 0 as rotation, The reflected line would be given by qi and u . qi must be computed before obtain the representation of reflected line. Figure 3. Rotating a vector E. Snell’s Law: A ray travels from one medium to another, its direction gets refracted according to snell’s law: sin φ η 1 = 2 sin φ2 η1 where φ1 is the incoming angle and φ2 is the outgoing angle, and η1 and η2 are the refractive indexs of the media.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-