# Maths - Forum Discussion

 RE: Matrix to Quaternion error. By: Alan Bromborsky (brombo14) - 2009-04-25 11:38 If you want to do geometry consider conformal geometry using   geometric algebra where vectors in 3D are mapped into null   vectors in 5D and rotations, translations, dilations, inversions,   and some compound transformations in 3D are represented as  rotations in 5D. Additionally basic geometric objects such as   lines, planes, circles, and spheres in 3D are blades in 5D and it  is easy to calculate the intersections of any of these objects.     Good references for this approach are:    Chapter 10, "Geometric Algebra for Physicist" by Doran & Lasenby    "Geometric Algebra for Computer Science" by Dorst, Fontijne, and Mann    and the following link    http://xxx.lanl.gov/abs/cs.CG/0203026
 RE: Matrix to Quaternion error. By: Martin Baker (martinbaker) - 2009-04-25 18:01 Yes, I have read the references that you mention and I have put my findings on this page:    https://www.euclideanspace.com/maths/geometry/space/nonEuclid/conformal/index.htm    Although, I don't claim to fully understand it, I certainly don't feel that I have an intuitive understanding of it.    I am trying to work out how to represent the various quantities as parameters of the 5 dimensions, for example:  point(x,y,z) = -n0+ (x²+y²+z²) n∞ + x n1 + y n2 + z n3    What I would like to do is derive a table of such 5D parameters for the following 3D objects:    Elements (in 3D space):  point[x,y,z]  vector[x,y,z]  two points  line  plane    Transforms (in 3D space):  pure translation  pure rotation  reflection in plane  reflection in sphere  scaling    Martin
 RE: Matrix to Quaternion error. By: Alan Bromborsky (brombo14) - 2009-04-25 19:58 Let the mapping from a 3D vector x to a 5D null vector X be:    X = f(x) = ((x*x)*n+2*x-nbar)/2    where n is your n_0 and nbar is n_infinity. The normalization  is X.n = -1. Then let x,y,z,w be point in 3D and there 5D null  images are X,Y,Z,W. The we have the following 5D rotors for the   corresponding 3D transformation:    if u is rotation axis vector (3D) and alpha rotation angel the rotor is     cos(alpha/2)+u*I_3D*sin(alpha/2)    if a is translation vector (3D) the translation rotor is     1+n*a/2    if exp(-alpha) is the dilation factor and N = (nbar^n)/2 the dilation rotor is     cosh(alpha/2)+N*sinh(alpha/2)    Geometric objects (line,circle,plane,sphere) in 3D are represented by blades in 5D    line through x and y: f(x)^f(y)^n     circle through x, y, and z: f(x)^f(y)^f(z)    plane through x, y, and z: f(x)^f(y)^f(z)^n    sphere through x, y, z, and w: f(x)^f(y)^f(z)^f(w)    If B is the 5D blade representing the object the equation of the object in 3D is  given by:    B^f(p) = 0 where p is a point on the object    Simple geometric algebra formulas result for the intersection of geometric objects.    Output of sympy test program for conformal geometry:    Example: Conformal representations of circles, lines, spheres, and planes  a = e0, b = e1, c = -e0, and d = e2   A = F(a) = 1/2*(a*a*n+2*a-nbar), etc.   Circle through a, b, and c   Circle: A^B^C^X = 0 = (-x2)e0^e1^e2^n   +(x2)e0^e1^e2^nbar   +(-1/2 + x0**2/2 + x1**2/2 + x2**2/2)e0^e1^n^nbar     Line through a and b  Line : A^B^n^X = 0 = (-x2)e0^e1^e2^n  +(-1/2 + x0/2 + x1/2)e0^e1^n^nbar   +(x2/2)e0^e2^n^nbar   +(-x2/2)e1^e2^n^nbar     Sphere through a, b, c, and d  Sphere: A^B^C^D^X = 0 = (1/2 - x0**2/2 - x1**2/2 - x2**2/2)e0^e1^e2^n^nbar    Plane through a, b, and d  Plane : A^B^n^D^X = 0 = (1/2 - x0/2 - x1/2 - x2/2)e0^e1^e2^n^nbar    Hyperbolic Circle: (A^B^e)^X = 0 = (-x2)e0^e1^e2^n  +(-x2)e0^e1^e2^nbar   +(-1/2 + x0 + x1 - x0**2/2 - x1**2/2 - x2**2/2)e0^e1^n^nbar  +(x2)e0^e2^n^nbar   +(-x2)e1^e2^n^nbar       Extracting direction of line from L = P1^P2^n  (L.n).nbar= (2)p1   +(-2)p2       Extracting plane of circle from C = P1^P2^P3  ((C^n).n).nbar= (2)p1^p2   +(-2)p1^p3   +(2)p2^p3     (p2-p1)^(p3-p1)= p1^p2  -p1^p3   +p2^p3
 RE: Matrix to Quaternion error. By: Alan Bromborsky (brombo14) - 2009-04-26 11:37 Additonal comment on conformal geometry -    The method applies equally to N-dimensions as well as 3-dimensions.    It also applies to non-euclidian geometry by letting the point at infinity be represented by e (hyperbolic geometry) or ebar (spherical geometry) instead of n. Again this can be a non-euclidian geometry in N-dimension. Of particular interest would be the non-euclidian geometries of space time.