sorry for cross posting - please redirect me to the right list if this isn't an appropriate place.
i want to get a filled set of traingles to tile a plane. atleast a single triangle to start with. why isn't this working? thanks a lot, vamshi import java.applet.Applet; import java.awt.BorderLayout; import java.awt.Frame; import java.awt.event.*; import com.sun.j3d.utils.applet.MainFrame; import com.sun.j3d.utils.universe.*; import com.sun.j3d.utils.geometry.Sphere; import javax.media.j3d.*; import javax.vecmath.*; import javax.swing.*; public class HelloJava3Da extends Applet { public BranchGroup createSceneGraph() { // Create the root of the branch graph BranchGroup objRoot = new BranchGroup(); // Create a simple shape leaf node, add it to the scene graph. // ColorCube is a Convenience Utility class objRoot.addChild(new Terrain() ); return objRoot; } // end of createSceneGraph method of HelloJava3Da public void init() { setLayout(new BorderLayout()); Canvas3D canvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration()); add("Center", canvas3D); BranchGroup scene = createSceneGraph(); scene.compile(); SimpleUniverse simpleU = new SimpleUniverse(canvas3D); simpleU.getViewingPlatform().setNominalViewingTransform(); simpleU.addBranchGraph(scene); } // end of init public static void main(String args[]) { new MainFrame(new HelloJava3Da(),256,256); } } class Terrain extends Shape3D { private Geometry tGeometry; private Appearance tAppearance; public Terrain() { tGeometry = createGeometry(); tAppearance = createAppearance(); this.setGeometry(tGeometry); this.setAppearance(tAppearance); } private Geometry createGeometry() { Point3f p[] = new Point3f[3]; p[0] = new Point3f(0.0f,0.0f,0.0f); p[1] = new Point3f(2.0f,2.0f,5.0f); p[2] = new Point3f(2.0f,0.0f,0.0f); TriangleArray ta = new TriangleArray(3,TriangleArray.COORDINATES); ta.setCoordinates(0,p); return ta; /* return new Sphere().getShape().getGeometry();*/ } private Appearance createAppearance() { ColoringAttributes ca = new ColoringAttributes(); ca.setColor (1.0f, 0.0f, 0.0f); Appearance app = new Appearance(); app.setColoringAttributes(ca); return app; } } =========================================================================== 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".