/*A building characterized by round pillars on the exterior and a 1st floor smaller than the rest. Building has a corrugated appearance.*/ FLOORS = 68; SIZE = 1.0; YSIZE = 1.2; SQRT2 = Math.sqrt(2.0); SEED = 0; r = new Random(SEED); //textures win = new Texture[5]; for (i=0; i<5; i++) { k = (i+1)/5.0; win[i] = new UniformTexture(); win[i].diffuseColor.setRGB(0.6*k, 0.5*k, 0.4*k); win[i].specularity = 0.3f; win[i].shininess = 1.0f; } conc = new UniformTexture(); conc.diffuseColor.setRGB(0.6, 0.5, 0.3); //first floor box = new Cube(SIZE*18, YSIZE, SIZE*8); box.setTexture(conc, conc.getDefaultMapping(box)); p = new Vec3(10*SIZE, YSIZE/2.0, 0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); cy = new Cylinder(YSIZE*FLOORS, SIZE*0.3, SIZE*0.3, 1.0); cy.setTexture(conc, conc.getDefaultMapping(cy)); for (i=0; i<=20; i++) { p = new Vec3(i*SIZE, YSIZE*FLOORS/2.0, 5*SIZE); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(i*SIZE, YSIZE*FLOORS/2.0, -5*SIZE); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); } for (i=-4; i<5; i++) { p = new Vec3(0.0, YSIZE*FLOORS/2.0, i*SIZE); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(20.0*SIZE, YSIZE*FLOORS/2.0, i*SIZE); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); } box = new Cube(SIZE/SQRT2, YSIZE/2.0, SIZE/SQRT2); box.setTexture(conc, conc.getDefaultMapping(box)); for (i=1; i