Index: /trunk/src/lib/math/matrix.cc
===================================================================
--- /trunk/src/lib/math/matrix.cc	(revision 5667)
+++ /trunk/src/lib/math/matrix.cc	(revision 5668)
@@ -5,5 +5,5 @@
 
 
-Vector Matrix::eigenValues() const
+Vector Matrix::getEigenValues() const
 {
   Vector eigVl;
@@ -65,5 +65,5 @@
   else if (Q > 0)
   {
-    printf("A is multiple of Identity matrix (lambda * I3))\n");
+    printf("This Matrix is a multiple of the Identity matrix (lambda * I3))\n");
     eigVl.x = eigVl.y = eigVl.z = 1;
   }
@@ -73,27 +73,59 @@
 }
 
-void Matrix::eigenVectors(Vector& a, Vector& b, Vector& c) const
+void Matrix::getEigenVectors(Vector& a, Vector& b, Vector& c) const
 {
-  Vector eigVl = this->eigenValues();
+  Vector eigVl = this->getEigenValues();
 
-  float eigVc[9];
+  float eigVal[3] = { eigVl.x, eigVl.y, eigVl.z };
+
+  Vector eigVc[3];
+  /* eigenvec test */
+  for(int i = 0; i < 3; i++)
+  {
+    eigVc[i].x = -1/this->m13*(this->m33 - eigVal[i]) + (this->m32*(-this->m31*this->m32 + this->m12*this->m33 - this->m12*eigVal[i])) /
+        this->m13*(-this->m13*this->m22 - this->m12*this->m23 + this->m13*eigVal[i]);
+
+    eigVc[i].y = -( -this->m13*this->m23 + this->m12*this->m33 - this->m12*eigVal[i]) /
+        (-this->m31*this->m22 + this->m12*this->m23 + this->m13*eigVal[i]);
+
+    eigVc[i].z = 1.0f;
+
+
+    printf("home brew: %f, %f, %f\n", eigVc[i].x, eigVc[i].y, eigVc[i].z);
+  }
+
+
   // EigenVectors
-  for (int i = 0; i < 3; ++i)
-  {
-    printf (":: i = %d\n", i);
-    Matrix M = *this -  Matrix::identity() * eigVl.x;
-    Vector m1, m2, m3;
+//   for (int i = 0; i < 3; ++i)
+//   {
+//     printf (":: i = %d\n", i);
+//     Matrix M = *this -  Matrix::identity() * eigVal[i];
+//     Vector m1, m2, m3;
+//
+//     M.getTransposed().toVectors(m1, m2, m3);
+//     Matrix U ( M.m22*M.m33 - M.m23*M.m23, M.m13*M.m23 - M.m12*M.m33, M.m12*M.m23 - M.m13*M.m22,
+//                M.m13*M.m23 - M.m12*M.m33, M.m11*M.m33 - M.m13*M.m13, M.m12*M.m13 - M.m23*M.m11,
+//                M.m12*M.m23 - M.m13*M.m22, M.m13*M.m12 - M.m23*M.m11, M.m11*M.m22 - M.m12*M.m12);
+//     U.debug();
+//
+//     Vector u1, u2, u3;
+//     U.toVectors(u1, u2, u3);
+//
+// /*
+//     u1 = m2.cross(m3);
+//     u2 = m3.cross(m1);
+//     u3 = m1.cross(m2);
+// */
+//
+//     u1 /= u1.len();
+//     u2 /= u2.len();
+//     u3 /= u3.len();
+//
+//
+//     printf("%f, %f, %f\n", u1.x, u1.y, u1.z);
+//     printf("%f, %f, %f\n", u2.x, u2.y, u2.z);
+//     printf("%f, %f, %f\n", u3.x, u3.y, u3.z);
 
-    M.getTransposed().toVectors(m1, m2, m3);
 
-    Vector u1, u2, u3;
-
-    u1 = m2.cross(m3); u1 /= u1.len();
-    u2 = m3.cross(m1); u2 /= u2.len();
-    u3 = m1.cross(m2); u3 /= u3.len();
-
-    printf("%f, %f, %f\n", u1.x, u1.y, u1.z);
-    printf("%f, %f, %f\n", u2.x, u2.y, u2.z);
-    printf("%f, %f, %f\n", u3.x, u3.y, u3.z);
 
 //     u1 = M*u1;
@@ -105,21 +137,5 @@
 //     printf("%f, %f, %f\n", u3.x, u3.y, u3.z);
 //     printf("\n\n");
-  }
-
-  //Vector eigVc[3];
-  /* eigenvec test */
-  /*
-  for(int i = 0; i < 3; i++)
-  {
-    eigVc[i].x =-1/this->m13*(this->m33 - eigValue[i]) + (this->m32*(-this->m31*this->m32 + this->m12*this->m33 - this->m12*eigVl[i])) /
-        this->m13*(-this->m13*this->m22 - this->m12*this->m23 + this->m13*eigVl[i]);
-    eigVc[i].y = -( -this->m13*this->m23 + this->m12*this->m33 - this->m12*eigVl[i]) /
-        (-this->m31*this->m22 + this->m12*this->m23 + this->m13*eigVl[i]);
-    eigVc[i].z = 1.0f;
-
-
-    printf("home brewn: %f, %f, %f\n", eigVc[i].x, eigVc[i].y, eigVc[i].z);
-
-}*/
+//  }
 
 
@@ -128,10 +144,9 @@
 }
 
-
 void Matrix::debug() const
 {
-  printf("input: | %f | %f | %f |\n", this->m11, this->m12, this->m13 );
-  printf("       | %f | %f | %f |\n", this->m21, this->m22, this->m23 );
-  printf("       | %f | %f | %f |\n", this->m31, this->m32, this->m33 );
+  printf("| %f | %f | %f |\n", this->m11, this->m12, this->m13 );
+  printf("| %f | %f | %f |\n", this->m21, this->m22, this->m23 );
+  printf("| %f | %f | %f |\n", this->m31, this->m32, this->m33 );
 
 }
Index: /trunk/src/lib/math/matrix.h
===================================================================
--- /trunk/src/lib/math/matrix.h	(revision 5667)
+++ /trunk/src/lib/math/matrix.h	(revision 5668)
@@ -51,5 +51,4 @@
                      this->m21*v.x + this->m22*v.y + this->m23*v.z,
                      this->m31*v.x + this->m32*v.y + this->m33*v.z );
-
     }
 
@@ -67,6 +66,6 @@
     }
 
-    Vector eigenValues() const;
-    void eigenVectors(Vector& a, Vector& b, Vector& c) const;
+    Vector getEigenValues() const;
+    void getEigenVectors(Vector& a, Vector& b, Vector& c) const;
 
     /// @todo optimize
Index: /trunk/src/lib/math/test.cc
===================================================================
--- /trunk/src/lib/math/test.cc	(revision 5667)
+++ /trunk/src/lib/math/test.cc	(revision 5668)
@@ -4,10 +4,13 @@
 int main (int argc, char** argv)
 {
-	
-	Matrix matrix( 0,  1, -1,
-		       1,  1,  0,
-		      -1,  0,  1);
 
-	matrix.eigVl(matrix);
+        Matrix matrix( 0,  1, -1,
+                       1,  1,  0,
+                      -1,  0,  1);
+
+        Vector eigVc[3];
+
+//        matrix.getEigenValues();
+        matrix.getEigenVectors(eigVc[0], eigVc[1], eigVc[2]);
 }
 
