/*The Church Office Building in downtown Salt Lake City.*/ SIZE = 1.0; YSIZE = 1.2; FLOORS = 28;//greater than 6 //textures win = new UniformTexture(); win.diffuseColor.setRGB(0.4,0.4,0.4); win.specularity = 0.45f; win.shininess = 1.0f; white = new UniformTexture(); white.diffuseColor.setRGB(0.85,0.85,0.85); grey = new UniformTexture(); grey.diffuseColor.setRGB(0.75,0.75,0.75); //adjust variables FLOORS = FLOORS-5; //base box = new Cube(30*SIZE,0.4*YSIZE,16*SIZE); box.setTexture(white, white.getDefaultMapping(box)); pos = new Vec3(0,4.2*YSIZE,0); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); box = new Cube(30*SIZE,4*YSIZE,13*SIZE); box.setTexture(win, win.getDefaultMapping(box)); pos = new Vec3(0,2*YSIZE,0); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); box = new Cube(0.3*SIZE,4*YSIZE,SIZE); box.setTexture(white, white.getDefaultMapping(box)); for (i=-7;i<=7;i++) { pos = new Vec3(i*2*SIZE,2*YSIZE,7.5*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); pos = new Vec3(i*2*SIZE,2*YSIZE,-7.5*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); } //sides of base for (j=-1;j<=1;j=j+2) { xoff = j*20*SIZE; box = new Cube(10*SIZE,0.4*YSIZE,20*SIZE); box.setTexture(white, white.getDefaultMapping(box)); pos = new Vec3(xoff, 4.4*YSIZE, 2*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); box = new Cube(10*SIZE,4.4*YSIZE,19.9*SIZE); box.setTexture(win, win.getDefaultMapping(box)); pos = new Vec3(xoff, 2.2*YSIZE, 2*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); bar = new Cube(10.1*SIZE,4.6*YSIZE,0.25*SIZE); bar.setTexture(white, white.getDefaultMapping(bar)); for (i=0;i<=40;i++) { pos = new Vec3(xoff, 2.3*YSIZE, (i-16)*SIZE/2); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } bar = new Cube(10.05*SIZE,0.4*YSIZE,19.9*SIZE); bar.setTexture(grey, grey.getDefaultMapping(bar)); for (i=0;i<=4;i++) { pos = new Vec3(xoff, (i+0.2)*YSIZE,2*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } } offset = 5.4*YSIZE; //between center and base box = new Cube(7*SIZE,YSIZE,14*SIZE); box.setTexture(win, win.getDefaultMapping(box)); pos = new Vec3(0,offset-0.5*YSIZE,0); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); box = new Cube(7*SIZE,YSIZE,13*SIZE); box.setTexture(win, win.getDefaultMapping(box)); pos = new Vec3(-7*SIZE,offset-0.5*YSIZE,0); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); pos = new Vec3(7*SIZE,offset-0.5*YSIZE,0); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); for (j=-1;j<=1;j=j+2) { xoff = j*7*SIZE; bar = new Cube(0.1*SIZE,YSIZE,0.1*SIZE); bar.setTexture(grey, grey.getDefaultMapping(bar)); for (i=-7;i<=7;i++) { pos = new Vec3(xoff+i*SIZE/2,offset-0.5*YSIZE,6.5*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); pos = new Vec3(xoff+i*SIZE/2,offset-0.5*YSIZE,-6.5*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } for (i=-13;i<13;i++) { pos = new Vec3(xoff+j*3.5*SIZE,offset-0.5*YSIZE,i*SIZE/2); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } } bar = new Cube(0.1*SIZE,YSIZE,14.1*SIZE); bar.setTexture(grey, grey.getDefaultMapping(bar)); for (i=-7;i<=7;i++) { pos = new Vec3(i*SIZE/2,offset-0.5*YSIZE,0); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } //center portion box = new Cube(7*SIZE,FLOORS*YSIZE,14*SIZE); box.setTexture(win, win.getDefaultMapping(box)); pos = new Vec3(0,offset+FLOORS*YSIZE/2,0); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); //front face bar = new Cube(0.25*SIZE,FLOORS*YSIZE,0.25*SIZE); bar.setTexture(white, white.getDefaultMapping(bar)); for (i=-7;i<=7;i++) { pos = new Vec3(i*SIZE/2,offset+FLOORS*YSIZE/2,7*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } pos = new Vec3(-3.5*SIZE,offset+FLOORS*YSIZE/2,6.75*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); pos = new Vec3(3.5*SIZE,offset+FLOORS*YSIZE/2,6.75*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); //back face box = new Cube(3*SIZE,offset+(FLOORS+1)*YSIZE,0.25*SIZE); box.setTexture(white, white.getDefaultMapping(box)); pos = new Vec3(0,(offset+YSIZE*(FLOORS-1))/2,-7*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); box = new Cube(1.05*SIZE,(FLOORS+1)*YSIZE+offset,1.25*SIZE); box.setTexture(white, white.getDefaultMapping(box)); pos = new Vec3(3.1*SIZE,(offset+YSIZE*(FLOORS-1))/2,-6.5*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); pos = new Vec3(-3.1*SIZE,(offset+YSIZE*(FLOORS-1))/2,-6.5*SIZE); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); bar = new Cube(7*SIZE,0.6*YSIZE,0.25*SIZE); bar.setTexture(white, white.getDefaultMapping(bar)); for (i=-4;i<=FLOORS+1;i++) { pos = new Vec3(0,offset+(i-1)*YSIZE,-7*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); if ((i%5)==1 || i<-3) { pos = new Vec3(0,offset+(i-1)*YSIZE+0.5*YSIZE,-7*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); } } pos = new Vec3(0,0,-7*SIZE); script.addObject(bar, new CoordinateSystem(pos, 0,0,0)); box = new Cube(0.25*SIZE,2*YSIZE,0.25*YSIZE); box.setTexture(white, white.getDefaultMapping(bar)); for (i=-11;i<=13;i++) { pos = new Vec3(3.5*SIZE,offset+(FLOORS-1)*YSIZE,i*SIZE/2); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); pos = new Vec3(-3.5*SIZE,offset+(FLOORS-1)*YSIZE,i*SIZE/2); script.addObject(box, new CoordinateSystem(pos, 0,0,0)); } //horizontals bar = new Cube(7.1*SIZE, 0.4*YSIZE, 0.1*SIZE); bar.setTexture(grey, grey.getDefaultMapping(bar)); for (i=1;i