Example #1
0
 /** Adds a wire (eg. glider tails) */
 public int addPolywire(float[][] vs, Color c) {
   Polywire wire = new Polywire(vs.length, c);
   for (int i = 0; i < vs.length; i++) {
     wire.addPoint(this.addPoint(vs[i][0], vs[i][1], vs[i][2]));
   }
   polywires[wirenext] = wire;
   return wirenext++;
 }
Example #2
0
 /** Adds a closed wire (eg. an outline of a circle) */
 public int addPolywireClosed(float[][] vs, Color c) {
   Polywire wire = new Polywire(vs.length + 1, c);
   for (int i = 0; i < vs.length; i++) {
     wire.addPoint(this.addPoint(vs[i][0], vs[i][1], vs[i][2]));
   }
   // close the wire by adding the first point onto its end
   wire.addPoint(this.addPoint(vs[0][0], vs[0][1], vs[0][2]));
   polywires[wirenext] = wire;
   return wirenext++;
 }