Date: Wed, 24 Sep 2003 12:08:00 -0400 (EDT) Note: a reply will only go to the sender. To reply to the entire class, please copy your reply to CS551-4@toolkit.itc.virginia.edu You may have noticed that the MOI code we prepared for the class to use only exposes the three moments of inertia through the MOI class interface. Hecker's code describes how to use the entire inertia tensor (including the six products of inertia that are off-diagonal on the inertia matrix). Getting at the entire inertia matrix should be easy enough, but I've included a method for moi.cpp to do that for you: void MOI::GetMOImatrix (double x[9]) { int i, j; for (i=0; i<3; i++) { for (j=0; j<3; j++) { x[i*3+j] = moi[i][j]; } } } We also found what was a small bug that interfered with generating the products of inertia (failure to initialize a matrix to 0.0) so please replace your JDMatrix constructor in JDMatrix.cpp with the following: JDMatrix::JDMatrix(int rs,int cs){ int i,j; rows = rs; columns = cs; data = new double*[rows]; for(i = 0; i < rows; i++){ data[i] = new double[columns]; } for(i = 0; i < rows; i++){ for(j = 0; j < columns; j++) data[i][j] = 0.0; } }