Hi I havent used geometry in J3D for a few months and I can't work out why my polygons are rendering in a weird fashion... Have half the polygon (a triangle) is rendering in red fine, the other half doesn't appear!
Code; Point3f[] pts = new Point3f[4]; pts[0] = gridPoints[from]; pts[1] = gridPoints[to]; System.out.println("BOTTOM LEFT: " + gridPoints[from]); System.out.println("BOTTOM RIGHT: " + gridPoints[to]); float x = gridPoints[from].x; float y = gridPoints[from].y; float z = gridPoints[from].z; pts[2] = new Point3f(x,y+1,z); System.out.println("TOP LEFT: (" + x + " " + (y+1) + " " + z + ")"); x = gridPoints[to].x; y = gridPoints[to].y; z = gridPoints[to].z; pts[3] = new Point3f(x,y+1,z); System.out.println("TOP RIGHT: (" + x + " " + (y+1) + " " + z + ")"); int[] indices = { 0,1,2,3 }; GeometryInfo gi = new GeometryInfo(GeometryInfo.QUAD_ARRAY); gi.setCoordinates(pts); gi.setCoordinateIndices(indices); Shape3D wall = new Shape3D(); wall.setGeometry(gi.getGeometryArray()); Appearance appear = new Appearance(); ColoringAttributes redColoring = new ColoringAttributes(red, ColoringAttributes.SHADE_FLAT); appear.setColoringAttributes(redColoring); wall.setAppearance(appear); wallGroup.addChild(wall); Rather than waste any more time on this, I was hoping some could point out the obvious to me, thanks in advance (PS its not a points problem) ******************************************** Ben Logan - Graduate Software Engineer RCID Stephenson Building Newcastle Upon Tyne NE1 7RU www.rcid.ncl.ac.uk ******************************************** =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".