import java.applet.Applet; import java.awt.event.*; import java.awt.*; import java.awt.geom.*; public class GoldenPolyCombinatorics { /**MAIN ROUTINES**/ /** given a convex GoldenPolyhedron, return the list of faces. The faces are given as lists of vertices, with each face being listed according to the following right hand rule: If you curl your right hand around the vertices, as they are listed, your thumb points along the OUTWARD normal*/ public static int[][] faceList(GoldenPolyhedron P) { int[] LIST=faceListRaw(P); int[][] LIST2=new int[LIST.length][0]; for(int i=0;i=3)&&(test==true)) { LIST[total]=i; ++total; } } int[] LIST2=new int[total]; for(int i=0;i3) { for(int i=0;i.0001) { System.out.println("ERROR"); DIR.print(); } boolean test0=d.isZero(); boolean test1=d.isPositive(); boolean test2=GoldenVector.equals(X,P.V[j]); if((choice==0)&&(test1==false)&&(test2==false)) return(false); if((choice==1)&&(test0==false)&&(test1==false)&&(test2==false)) return(false); } return(true); } /**tells if the list of vertices is the subset of a face. Computes the centroid of the list of vectors and decides if it is on the boundary or not.*/ public static boolean face(GoldenPolyhedron P,int[] u) { if(u.length<3) return(false); boolean test0=coplanar(P,u); if(test0==false) return(false); GoldenPolyhedron Q=P.scale(u.length); GoldenVector W=GoldenVector.zero(); GoldenVector DIR=normal(Q.V[u[0]],Q.V[u[1]],Q.V[u[2]]); if(DIR==null) return(false); for(int i=0;i