Changes in src/ellipsoid.cpp [112b09:c94eeb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ellipsoid.cpp
r112b09 rc94eeb 21 21 #include "tesselation.hpp" 22 22 #include "vector.hpp" 23 #include "Matrix.hpp" 23 24 #include "verbose.hpp" 24 25 … … 34 35 Vector helper, RefPoint; 35 36 double distance = -1.; 36 double Matrix[NDIM*NDIM];37 Matrix Matrix; 37 38 double InverseLength[3]; 38 39 double psi,theta,phi; // euler angles in ZX'Z'' convention … … 51 52 theta = EllipsoidAngle[1]; 52 53 phi = EllipsoidAngle[2]; 53 Matrix [0]= cos(psi)*cos(phi) - sin(psi)*cos(theta)*sin(phi);54 Matrix [1]= -cos(psi)*sin(phi) - sin(psi)*cos(theta)*cos(phi);55 Matrix [2]= sin(psi)*sin(theta);56 Matrix [3]= sin(psi)*cos(phi) + cos(psi)*cos(theta)*sin(phi);57 Matrix [4]= cos(psi)*cos(theta)*cos(phi) - sin(psi)*sin(phi);58 Matrix [5]= -cos(psi)*sin(theta);59 Matrix [6]= sin(theta)*sin(phi);60 Matrix [7]= sin(theta)*cos(phi);61 Matrix [8]= cos(theta);54 Matrix.at(0,0) = cos(psi)*cos(phi) - sin(psi)*cos(theta)*sin(phi); 55 Matrix.at(1,0) = -cos(psi)*sin(phi) - sin(psi)*cos(theta)*cos(phi); 56 Matrix.at(2,0) = sin(psi)*sin(theta); 57 Matrix.at(0,1) = sin(psi)*cos(phi) + cos(psi)*cos(theta)*sin(phi); 58 Matrix.at(1,1) = cos(psi)*cos(theta)*cos(phi) - sin(psi)*sin(phi); 59 Matrix.at(2,1) = -cos(psi)*sin(theta); 60 Matrix.at(0,2) = sin(theta)*sin(phi); 61 Matrix.at(1,2) = sin(theta)*cos(phi); 62 Matrix.at(2,2) = cos(theta); 62 63 helper.MatrixMultiplication(Matrix); 63 64 helper.ScaleAll(InverseLength); … … 73 74 phi = -EllipsoidAngle[2]; 74 75 helper.ScaleAll(EllipsoidLength); 75 Matrix [0]= cos(psi)*cos(phi) - sin(psi)*cos(theta)*sin(phi);76 Matrix [1]= -cos(psi)*sin(phi) - sin(psi)*cos(theta)*cos(phi);77 Matrix [2]= sin(psi)*sin(theta);78 Matrix [3]= sin(psi)*cos(phi) + cos(psi)*cos(theta)*sin(phi);79 Matrix [4]= cos(psi)*cos(theta)*cos(phi) - sin(psi)*sin(phi);80 Matrix [5]= -cos(psi)*sin(theta);81 Matrix [6]= sin(theta)*sin(phi);82 Matrix [7]= sin(theta)*cos(phi);83 Matrix [8]= cos(theta);76 Matrix.at(0,0) = cos(psi)*cos(phi) - sin(psi)*cos(theta)*sin(phi); 77 Matrix.at(1,0) = -cos(psi)*sin(phi) - sin(psi)*cos(theta)*cos(phi); 78 Matrix.at(2,0) = sin(psi)*sin(theta); 79 Matrix.at(0,1) = sin(psi)*cos(phi) + cos(psi)*cos(theta)*sin(phi); 80 Matrix.at(1,1) = cos(psi)*cos(theta)*cos(phi) - sin(psi)*sin(phi); 81 Matrix.at(2,1) = -cos(psi)*sin(theta); 82 Matrix.at(0,2) = sin(theta)*sin(phi); 83 Matrix.at(1,2) = sin(theta)*cos(phi); 84 Matrix.at(2,2) = cos(theta); 84 85 helper.MatrixMultiplication(Matrix); 85 86 //Log() << Verbose(4) << "Intersection is at " << helper << "." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.