class Hit {
  public static void main (String args[]) {

    // v, w = velocity and rotation before impact
    // c, o = velocity and rotation after impact
    // I = moment of intertia
    // m = mass
    // s = sliding friction [0,1]
    // E = restitution coeff [0,1]

    double  x1, y1, z1, x2, y2, z2;
    double vx1,vy1,vz1,vx2,vy2,vz2;
    double wx1,wy1,wz1,wx2,wy2,wz2;
    double cx1,cy1,cz1,cx2,cy2,cz2;
    double ox1,oy1,oz1,ox2,oy2,oz2;
    double Ix1,Iy1,Iz1,Ix2,Iy2,Iz2;
    double  m1, m2, s, E;

    // default values

     x1=-1;  y1=-1;  z1=0;  x2=1;  y2=1;  z2=0;
    vx1=1; vy1=0; vz1=0; vx2=-1; vy2=0; vz2=0;
    wx1=0; wy1=0; wz1=0; wx2=0; wy2=0; wz2=0;
    Ix1=1; Iy1=1; Iz1=1; Ix2=1; Iy2=1; Iz2=1;
     m1=1;  m2=1;   s=0;   E=1;

    // parse parameters
    int i;
    for (i=0; i

    Source: geocities.com/paris/6502

               ( geocities.com/paris)