import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; public class DataRenormRaw { /**List of Vertices for the 24 basic polyhedra**/ public static int[][] B(int levelB,int branch) { return(B(4*levelB+branch)); } public static int[] polyNormal(int levelB,int branch) { return(polyNormal(4*levelB+branch)); } public static int[] faceAnchor(int levelB,int branch) { return(faceAnchor(4*levelB+branch)); } public static int[][] B(int k) { int[][][] A={{{1,0,1,0,0,0},{-7,5,6,-3,0,0},{6,-3,-2,2,5,-3},{-7,5,4,-2,2,-1},{1,0,1,0,2,-1},{-7,5,6,-3,2,-1},{6,-3,1,0,2,-1}},{{9,-5,-4,3,2,-1},{1,0,1,0,2,-1},{9,-5,-2,2,2,-1},{-4,3,1,0,2,-1},{1,0,1,0,0,0},{-4,3,3,-1,0,0}},{{9,-5,0,1,0,0},{22,-13,-3,3,0,0},{-4,3,3,-1,5,-3},{9,-5,-10,7,10,-6},{-25,16,11,-6,10,-6},{-25,16,11,-6,2,-1},{-4,3,3,-1,2,-1},{-12,8,3,-1,2,-1},{22,-13,-5,4,2,-1},{9,-5,0,1,2,-1}},{{1,0,2,0,-3,2},{1,0,2,0,0,0},{-4,3,2,0,0,0},{9,-5,0,1,2,-1},{-4,3,0,1,2,-1},{-12,8,5,-2,2,-1}},{{-7,5,4,-2,2,-1},{1,0,1,0,2,-1},{-7,5,6,-3,2,-1},{-15,10,9,-5,2,-1},{-15,10,4,-2,7,-4},{6,-3,-1,1,-1,1},{6,-3,-1,1,4,-2},{1,0,1,0,4,-2}},{{1,0,1,0,4,-2},{9,-5,-4,3,4,-2},{-4,3,4,-2,-1,1},{1,0,1,0,2,-1},{9,-5,-4,3,2,-1},{-4,3,1,0,2,-1},{9,-5,-2,2,2,-1}},{{6,-3,-1,1,4,-2},{-15,10,4,-2,4,-2},{6,-3,4,-2,-1,1},{-15,10,4,-2,7,-4}},{{-10,7,4,-2,4,-2},{-15,10,4,-2,4,-2},{6,-3,4,-2,-1,1},{-15,10,4,-2,7,-4},{-15,10,9,-5,2,-1},{6,-3,1,0,2,-1},{-10,7,6,-3,2,-1},{-15,10,6,-3,2,-1}},{{6,-3,-2,2,4,-2},{1,0,1,0,4,-2},{1,0,1,0,1,0},{14,-8,-4,3,1,0},{6,-3,1,0,1,0}},{{1,0,1,0,1,0},{22,-13,-12,8,9,-5},{1,0,1,0,4,-2},{22,-13,-7,5,4,-2}},{{6,-3,-1,1,9,-5},{-7,5,4,-2,4,-2},{-15,10,4,-2,4,-2},{6,-3,-1,1,1,0},{-15,10,4,-2,1,0},{-7,5,4,-2,1,0}},{{-15,10,4,-2,4,-2},{11,-6,-2,2,4,-2},{-15,10,4,-2,1,0},{-2,2,1,0,1,0},{11,-6,1,0,1,0},{-2,2,4,-2,1,0}},{{1,0,1,0,1,0},{-20,13,14,-8,-7,5},{1,0,1,0,-2,2},{-20,13,9,-5,-2,2}},{{-4,3,4,-2,-2,2},{1,0,1,0,-2,2},{1,0,1,0,1,0},{-12,8,6,-3,1,0},{-4,3,1,0,1,0}},{{-4,3,3,-1,-7,5},{9,-5,-2,2,-2,2},{17,-10,-2,2,-2,2},{-4,3,3,-1,1,0},{17,-10,-2,2,1,0},{9,-5,-2,2,1,0}},{{17,-10,-2,2,-2,2},{-9,6,4,-2,-2,2},{17,-10,-2,2,1,0},{4,-2,1,0,1,0},{-9,6,1,0,1,0},{4,-2,-2,2,1,0}},{{1,0,1,0,-2,2},{-7,5,6,-3,-2,2},{6,-3,-2,2,3,-1},{1,0,1,0,0,1},{-7,5,6,-3,0,1},{6,-3,1,0,0,1},{-7,5,4,-2,0,1}},{{9,-5,-2,2,0,1},{1,0,1,0,0,1},{9,-5,-4,3,0,1},{17,-10,-7,5,0,1},{17,-10,-2,2,-5,4},{-4,3,3,-1,3,-1},{-4,3,3,-1,-2,2},{1,0,1,0,-2,2}},{{-4,3,3,-1,-2,2},{17,-10,-2,2,-2,2},{-4,3,-2,2,3,-1},{17,-10,-2,2,-5,4}},{{12,-7,-2,2,-2,2},{17,-10,-2,2,-2,2},{-4,3,-2,2,3,-1},{17,-10,-2,2,-5,4},{17,-10,-7,5,0,1},{-4,3,1,0,0,1},{12,-7,-4,3,0,1},{17,-10,-4,3,0,1}},{{-7,5,6,-3,0,1},{1,0,1,0,0,1},{-7,5,4,-2,0,1},{6,-3,1,0,0,1},{1,0,1,0,2,0},{6,-3,-1,1,2,0}},{{1,0,1,0,2,0},{9,-5,-4,3,2,0},{-4,3,4,-2,-3,3},{9,-5,-2,2,0,1},{1,0,1,0,0,1},{9,-5,-4,3,0,1},{-4,3,1,0,0,1}},{{-7,5,2,-1,2,0},{-20,13,5,-3,2,0},{6,-3,-1,1,-3,3},{-7,5,12,-7,-8,6},{27,-16,-9,6,-8,6},{27,-16,-9,6,0,1},{6,-3,-1,1,0,1},{14,-8,-1,1,0,1},{-20,13,7,-4,0,1},{-7,5,2,-1,0,1}},{{1,0,0,0,5,-2},{1,0,0,0,2,0},{6,-3,0,0,2,0},{-7,5,2,-1,0,1},{6,-3,2,-1,0,1},{14,-8,-3,2,0,1}}};return(A[k]);} /**The data for the affine maps between the A set and the B set.**/ public static int[] getAffine(int levelA,int levelB,int branch) { if((levelA==2)&&(levelB==5)&&(branch==3)) {int[] A={-3,2,4,-2,0,0,4,-2};return(A);} if((levelA==4)&&(levelB==5)&&(branch>=2)) {int[] A={-3,2,4,-2,0,0,8,-4};return(A);} if((levelA==2)&&(levelB==0)&&(branch==3)) {int[] A={-3,2,4,-2,8,-4,4,-2};return(A);} if((levelA==0)&&(levelB==0)&&(branch>=2)) {int[] A={-3,2,4,-2,8,-4,0,0};return(A);} int[][] A={{-3,2,4,-2,4,-2,0,0},{1,0,0,0,0,0,2,-2},{-3,2,4,-2,4,-2,4,-2},{1,0,0,0,0,0,-2,2},{-3,2,4,-2,4,-2,8,-4}}; return(A[levelA]); } /**polyhedron by polyhedron list of outward normals. There are a total of 18 possible normal vectors, and here we list the indices. For instance, polyhedron P1 has normals n0,...,n6.**/ public static int[] polyNormal(int q) { int[][] A={{0,17,1,13,2,6},{16,8,5,11,0},{0,11,13,17,2,1,7},{0,4,15,10,3},{10,17,6,2,13,9},{9,5,16,8,15,11},{3,5,10,16},{9,5,16,2,12,14},{0,13,12,2,6},{5,8,16,11},{0,3,10,13,4},{0,12,14,1,7},{17,13,1,6},{9,8,4,15,11},{9,14,7,8,12},{9,4,3,16,10},{0,17,1,13,2,6},{7,5,11,15,8,0},{14,17,7,1},{0,17,1,15,4,3},{1,13,17,6,9},{9,5,16,8,15,11},{9,6,8,5,15,16,10},{9,12,2,7,14}};return(A[q]);} public static int[] faceAnchor(int q) { int[][]A={{3,2,1,0,0,0},{2,1,0,0,0},{5,3,2,1,0,0,0},{3,1,0,0,0},{4,2,1,0,0,0},{3,2,1,0,0,0},{1,0,0,0},{4,2,1,0,0,0},{2,1,0,0,0},{1,0,0,0},{3,1,0,0,0},{2,1,0,0,0},{1,0,0,0},{2,1,0,0,0},{3,1,0,0,0},{2,1,0,0,0},{3,2,1,0,0,0},{4,2,1,0,0,0},{1,0,0,0},{4,2,1,0,0,0},{2,1,0,0,0},{3,2,1,0,0,0},{5,3,2,1,0,0,0},{3,1,0,0,0}};return(A[q]);} }