///////////////////////////////////////////////////////////////////////////////////////////////////// // // FileName: frac.cpp // Author : Michael Y. Polyakov // email : myp@andrew.cmu.edu or mikepolyakov@hotmail.com // Website : www.angelfire.com/linux/myp // Date : 7/30/2002 // // This program converts between fractional and orthonormal coordinates using FracOrth class. ////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include "FracOrth.h" void DisplayMatrix(float* m) { for(int i=0; i < 3; i++){ for(int j=0; j < 3; j++) cout <>a >>b >>c; cout <<"Enter alpha, beta, gamma in degrees: "; cin >>alpha >>beta >>gamma; FracOrth fo(a,b,c,alpha,beta,gamma); //display info cout <> choice; switch(choice) { case 'o': cout <>p[0] >>p[1] >>p[2]; //converting from p' into p fo.FracToOrth(p[0], p[1], p[2]); cout <<"p' in orthonormal coordinates is: p = { " <>p[0] >>p[1] >>p[2]; //converting from p' into p fo.OrthToFrac(p[0], p[1], p[2]); cout <<"p in orthonormal coordinates is: p' = { " <