import javax.media.j3d.*; import javax.vecmath.*; import java.awt.Color; public class SuurL2 extends Shape3D{ Point3d p1=new Point3d(0, 0, 0), p2=new Point3d(0, 1, 0), p3=new Point3d(0.5, 0, 0); Point3d[] jooned={ p1, p2, p1, p3 }; Color3f[] varvid={ new Color3f(Color.green), new Color3f(Color.blue), new Color3f(Color.yellow), new Color3f(Color.red) }; public SuurL2(){ LineArray joonemassiiv=new LineArray(4, LineArray.COORDINATES | LineArray.COLOR_3); joonemassiiv.setCoordinates(0, jooned); joonemassiiv.setColors(0, varvid); setGeometry(joonemassiiv); setAppearance(new Appearance()); } }