/* An oblisk. Proportions from Washington Monument.*/ SIZE = 1.0; marble = new UniformTexture(); marble.diffuseColor.setRGB(0.85,0.85,0.85); a = 5.5*SIZE/2; b = 3.45*SIZE/2; y = 50*SIZE; vertices = new Vec3[8]; // 8 vertices + 6 faces vertices[0] = new Vec3(-a, 0.0, -a); vertices[1] = new Vec3(a, 0.0, -a);// vertices[2] = new Vec3(b, y, -b);// vertices[3] = new Vec3(-b, y, -b); vertices[4] = new Vec3(-a, 0.0, a); vertices[5] = new Vec3(a, 0.0, a);// vertices[6] = new Vec3(b, y, b);// vertices[7] = new Vec3(-b, y, b); //triangular faces int[][] faces = {{ 0, 3, 2}, { 0, 2, 1}, { 0, 1, 5}, { 0, 5, 4}, { 0, 4, 7}, {0, 7, 3}, { 6, 5, 1}, { 6, 1, 2}, { 6, 2, 3}, { 6, 3, 7}, { 6, 7, 4}, {6, 4, 5}}; base = new TriangleMesh(vertices, faces); base.setSmoothingMethod(0); base.setTexture(marble, marble.getDefaultMapping(base)); script.addObject(base, new CoordinateSystem(new Vec3(), 0,0,0)); ysize = 5*SIZE; Vec3[] data = {new Vec3(b,0,b), new Vec3(-b,0,b), new Vec3(-b,0,-b), new Vec3(b,0,-b), new Vec3(0,ysize,0)}; int[][] faces = {{0,4,1}, {1,4,2}, {2,4,3}, {3,4,0} }; TriangleMesh out = new TriangleMesh(data, faces); out.smoothingMethod = 0; out.setTexture(marble, marble.getDefaultMapping(out)); script.addObject(out, new CoordinateSystem(new Vec3(0,50*SIZE,0), 0,0,0));