next up previous contents
Next: (vector z) = (vector Up: Vector Algebra Previous: (vector v) = (matrix   Contents

(vector w) = (matrix o)*(vector z)+(vector a)

 
/* sphap - affine product                      */
/* w and z may be the same                     */
/* (vector w)=(matrix o)*(vector z)+(vector a) */

void sphap(w,o,z,a) double w[3], o[][3], z[3], a[3]; {
double u0, u1, u2;
u0=z[0]; u1=z[1]; u2=z[2];
w[0]=o[0][0]*u0+o[0][1]*u1+o[0][2]*u2+a[0];
w[1]=o[1][0]*u0+o[1][1]*u1+o[1][2]*u2+a[1];
w[2]=o[2][0]*u0+o[2][1]*u1+o[2][2]*u2+a[2];
}



Pedro Hernandez 2004-05-13