component a {
  i = 1;
  mass = 100;
  vector orientation = vector { 1, 0, 0, 0 };
}

component b {
  j = 2;
}

component c {
  k = 3;
}

link a->b;
link b, c;

/* link d->e : dist ( 1, 0, 0 ), ( -2, 0, 0 );
link f->e : dist ( -1, 0, 0 ), ( 2, 0, 0 );

physical component d {
  shape  ( -6, -4, 0 ) ( 1, 0, 0, 0 ) ( 2, 3, 3 );
  x = 5;
  y = 10;
  z = -10;
  triple omega = -triple ( 0, .1, 0 );
  mass = mass - 1 : 10;
}

physical component e {
  shape  ( 0, 0, 0 ) ( 1, 0, 0, 0 ) ( 4, 1, 1 );
  w = -9.82;
  c = 3e8;
  triple position = <nil>;
  triple velocity = <nil>;
  vector orientation = <nil>;
  triple omega = <nil>;
  vector v = vector { 1, 0, 0, 0 };
}

physical component f {
  shape  ( 3, 0, 0 ) ( 1, 0, 0, 0 ) ( 2, 3, 3 );
  x = 5;
  y = 10;
  z = -10;
  triple omega = -triple ( 0, .1, 0 );
}


physical component big_box {
  shape ( 0, 0, 0 ) ( 1, 0, 0, 0 ) ( 6, 6, 6 );
  triple velocity = triple( .1, 0, 0 );
}

physical component little_box {
  shape ( -20, 0, 0 ) ( 1, 0, 0, 0 ) ( 3, 3, 3 );
  triple omega = triple( .1, .05, .8 );
  triple velocity = triple( 0, .1, 0 );
  vector orientation = <nil>;
}

link big_box, little_box : dist ( 0, 0, 0 ), ( 0, 0, 0 );

matrix m = matrix { { 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 } };
*/
physical component big_box2 {
  shape ( 0, 10, 0 ) ( 1, 0, 0, 0 ) ( 6, 6, 6 );
  triple velocity = triple( .1, 0, 0 );
}

physical component little_box2 {
  shape ( 0, 10, 0 ) ( 1, 0, 0, 0 ) ( 3, 3, 3 );
  triple omega = triple( .1, .05, .8 );
  triple velocity = triple( 0, .1, 0 );
  vector orientation = <nil>;
}

link big_box2, little_box2 : attachment;


physical component plane1 {
  shape( 10, 0, 0 ) ( 1, 0, 0, 0 ) ( 3, 3, .01 );
  triple velocity = triple( 0, .01, 0 );
  triple position = <nil>;
}

physical component plane2 {
  shape( 10, 5, 0 ) ( 1, 0, 0, 0 ) ( 3, 3, .01 );
  mass = <nil>;
  triple position = <nil>;
}

z = <nil>;

link plane1 -> plane2 : axial ( -1.5, -1.5, 0 ), ( -1.5, 1.5, 0 ),
                              ( 1.5, -1.5, 0 ), ( 1.5, 1.5, 0 );
//link plane1 -> plane2 : dist( 1.5, -1.5, 0 ), ( -1.5, -1.5, 0 );
//link plane1 -> plane2 : dist( 1.5, 1.5, 0 ), ( -1.5, 1.5, 0 );
