src/main/java/de/orat/math/cga/impl2/CGA2Utils.java
public static LinePairParameters decomposeLinePair(CGA2Multivector l2l1){
        
        System.out.println("l2l1:"+l2l1.toString());
        
        // Bivektoren 
        double[] bivectors = l2l1.extractCoordinates(2);
        // d zeigt von l1 nach l2?
        org.jogamp.vecmath.Vector3d d = new org.jogamp.vecmath.Vector3d(bivectors[4], bivectors[1], bivectors[0]);
        // da sollte noch ein Faktor sin(theta) drinstecken
        System.out.println("dx="+String.valueOf(d.x)+", dy="+String.valueOf(d.y)+", dz="+String.valueOf(d.z));
     
        // Vektoren
        double[] vectors = l2l1.extractCoordinates(1);
        org.jogamp.vecmath.Vector3d d2 = new org.jogamp.vecmath.Vector3d(vectors[0], vectors[1], vectors[2]);
        // identisch zu dx,dy,dz wo ist der sin(theta) faktor?
        System.out.println("d2x="+String.valueOf(d.x)+", d2y="+String.valueOf(d.y)+", d2z="+String.valueOf(d.z));
        
        
        // theta=163.82184787299215
        // das scheint aber falsch zu sein
        double costheta = l2l1.extractCoordinates(0)[0];
        System.out.println("theta="+String.valueOf(Math.acos(costheta)*180/Math.PI));
        
        //TODO
        double alpha = 0d;
        Point3d p = null;
        Vector3d dir = null;
        return new Decomposition3d.LinePairParameters(alpha, p, dir);
    }
/**
      * Decompose l2l1 into angle, distance, direction.A Covariant approach to Geometry using Geometric Algebra.
      * 
      * Technical report. Universit of Cambridge Departement of Engineering, 
      * Cambridge, UK (2004). 
      * A. Lasenby, J. Lasenby, R. Wareham
      * Formula 5.22, page 46
      * 
      * @param l2l1
      * @return parameters describing a line in 3d space
      */
Decompose l2l1 into angle, distance, direction.A Covariant approach to Geometry using Geometric Algebra.

Technical report. Universit of Cambridge Departement of Engineering,
Cambridge, UK (2004).
A. Lasenby, J. Lasenby, R. Wareham
Formula 5.22, page 46

@param l2l1
@return parameters describing a line in 3d space
Decompose l2l1 into angle distance direction . A Covariant approach to Geometry using Geometric Algebra . Technical report . Universit of Cambridge Departement of Engineering Cambridge UK ( 2004 ) . A . Lasenby J . Lasenby R . Wareham Formula 5 . 22 page 46 @param l2l1 @return parameters describing a line in 3d space
public static LinePairParameters decomposeLinePair(CGA2Multivector l2l1){
        System.out.println("l2l1:"+l2l1.toString());
        double[] bivectors = l2l1.extractCoordinates(2);
        org.jogamp.vecmath.Vector3d d = new org.jogamp.vecmath.Vector3d(bivectors[4], bivectors[1], bivectors[0]);
        System.out.println("dx="+String.valueOf(d.x)+", dy="+String.valueOf(d.y)+", dz="+String.valueOf(d.z));
        double[] vectors = l2l1.extractCoordinates(1);
        org.jogamp.vecmath.Vector3d d2 = new org.jogamp.vecmath.Vector3d(vectors[0], vectors[1], vectors[2]);
        System.out.println("d2x="+String.valueOf(d.x)+", d2y="+String.valueOf(d.y)+", d2z="+String.valueOf(d.z));
        double costheta = l2l1.extractCoordinates(0)[0];
        System.out.println("theta="+String.valueOf(Math.acos(costheta)*180/Math.PI));
        double alpha = 0d;
        Point3d p = null;
        Vector3d dir = null;
        return new Decomposition3d.LinePairParameters(alpha, p, dir);
    }
public static LinePairParameters decomposeLinePair ( CGA2Multivector l2l1 ) { System . out . println ( "l2l1:" + l2l1 . toString ( ) ) ; double [ ] bivectors = l2l1 . extractCoordinates ( 2 ) ; org . jogamp . vecmath . Vector3d d = new org . jogamp . vecmath . Vector3d ( bivectors [ 4 ] , bivectors [ 1 ] , bivectors [ 0 ] ) ; System . out . println ( "dx=" + String . valueOf ( d . x ) + ", dy=" + String . valueOf ( d . y ) + ", dz=" + String . valueOf ( d . z ) ) ; double [ ] vectors = l2l1 . extractCoordinates ( 1 ) ; org . jogamp . vecmath . Vector3d d2 = new org . jogamp . vecmath . Vector3d ( vectors [ 0 ] , vectors [ 1 ] , vectors [ 2 ] ) ; System . out . println ( "d2x=" + String . valueOf ( d . x ) + ", d2y=" + String . valueOf ( d . y ) + ", d2z=" + String . valueOf ( d . z ) ) ; double costheta = l2l1 . extractCoordinates ( 0 ) [ 0 ] ; System . out . println ( "theta=" + String . valueOf ( Math . acos ( costheta ) * 180 / Math . PI ) ) ; double alpha = 0d ; Point3d p = null ; Vector3d dir = null ; return new Decomposition3d . LinePairParameters ( alpha , p , dir ) ; }
Decompose l2l1 into angle, distance, direction.A Covariant approach to Geometry using Geometric Algebra.
Decompose l2l1 into angle distance direction . A Covariant approach to Geometry using Geometric Algebra .
// Bivektoren  // d zeigt von l1 nach l2? // da sollte noch ein Faktor sin(theta) drinstecken // Vektoren // identisch zu dx,dy,dz wo ist der sin(theta) faktor? // theta=163.82184787299215 // das scheint aber falsch zu sein //TODO