(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 266723, 7083] NotebookOptionsPosition[ 264184, 7015] NotebookOutlinePosition[ 264538, 7031] CellTagsIndexPosition[ 264495, 7028] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{ RowBox[{"F", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"1", "/", "2"}], " ", "I", " ", RowBox[{"(", RowBox[{ RowBox[{"PolyLog", "[", RowBox[{"2", ",", RowBox[{ RowBox[{"-", "I"}], " ", RowBox[{"E", "^", "x"}]}]}], "]"}], "-", RowBox[{"PolyLog", "[", RowBox[{"2", ",", RowBox[{"I", " ", RowBox[{"E", "^", "x"}]}]}], "]"}]}], ")"}]}]}]], "Input", ExpressionUUID -> "8b8197b3-da95-4384-a903-981c8a1a04bd"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"G3", "[", RowBox[{"a_", ",", "b_"}], "]"}], ":=", RowBox[{ RowBox[{"F", "[", RowBox[{"a", "-", "b"}], "]"}], "+", RowBox[{"F", "[", RowBox[{"b", "-", "a"}], "]"}], "-", RowBox[{ RowBox[{"\[Pi]", "/", "2"}], " ", RowBox[{"(", RowBox[{"a", "+", "b"}], ")"}]}]}]}], ";"}]], "Input", ExpressionUUID -> "87ab238d-2132-4a06-9314-52cc468e16eb"], Cell[BoxData[ RowBox[{ RowBox[{"EnergySetup", "[", RowBox[{"n_", ",", "FacesCW_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "i", ",", "rhoV", ",", "rhoF", ",", "include", ",", "LineFaces", ",", "f", ",", "Faces", ",", "NM", ",", "nonlinefaces", ",", "radii", ",", "RADII"}], "}"}], ",", "\n", RowBox[{ RowBox[{"Faces", "=", RowBox[{"Sort", "/@", "FacesCW"}]}], ";", "\n", RowBox[{"f", "=", RowBox[{"Length", "[", "Faces", "]"}]}], ";", "\n", RowBox[{"LineFaces", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"rhoV", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Subscript", "[", RowBox[{"rV", ",", " ", "i"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"n", "-", "2"}]}], "}"}]}], "]"}]}], ";", RowBox[{"rhoF", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Subscript", "[", RowBox[{"rF", ",", " ", "i"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"f", "-", "2"}]}], "}"}]}], "]"}]}], ";", "\n", RowBox[{"include", " ", "=", " ", RowBox[{"{", "}"}]}], ";", "\n", RowBox[{"nonlinefaces", "=", RowBox[{"{", "}"}]}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "f"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Faces", "[", RowBox[{"[", RowBox[{"i", ",", RowBox[{"-", "2"}]}], "]"}], "]"}], "==", RowBox[{"n", "-", "1"}]}], "&&", RowBox[{ RowBox[{"Faces", "[", RowBox[{"[", RowBox[{"i", ",", RowBox[{"-", "1"}]}], "]"}], "]"}], "==", "n"}]}], ")"}]}], ",", "\n", RowBox[{"(*", " ", "then", " ", "*)"}], " ", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"include", ",", "i"}], "]"}], ";", RowBox[{"AppendTo", "[", RowBox[{"nonlinefaces", ",", RowBox[{ "FacesCW", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], ",", "\n", RowBox[{"(*", " ", "else", " ", "*)"}], " ", RowBox[{"AppendTo", "[", RowBox[{"LineFaces", ",", "i"}], "]"}]}], "]"}]}], "]"}], ";", "\n", "\n", RowBox[{"NM", "=", RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"k", "=", "1"}], RowBox[{"f", "-", "2"}]], RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], RowBox[{"Length", "[", RowBox[{"Faces", "[", RowBox[{"[", RowBox[{ "include", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}]], RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Faces", "[", RowBox[{"[", RowBox[{ RowBox[{ "include", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "<", RowBox[{"n", "-", "1"}]}], ",", RowBox[{"G3", "[", RowBox[{ SubscriptBox["rV", RowBox[{"Faces", "[", RowBox[{"[", RowBox[{ RowBox[{ "include", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}]], ",", SubscriptBox["rF", "k"]}], "]"}], ",", "0"}], "]"}]}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], RowBox[{"n", "-", "2"}]], RowBox[{ SubscriptBox["rV", "i"], "\[Pi]", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"Flatten", "@", RowBox[{"Table", "[", RowBox[{ RowBox[{"Faces", "[", RowBox[{"[", RowBox[{"LineFaces", "[", RowBox[{"[", "m", "]"}], "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"m", ",", "1", ",", "2"}], "}"}]}], "]"}]}], ",", "i"}], "]"}], ",", RowBox[{"(*", " ", "then", " ", "*)"}], " ", "1", ",", RowBox[{"(*", " ", "else", " ", "*)"}], " ", "2"}], "]"}]}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", "1"}], RowBox[{"f", "-", "2"}]], RowBox[{ SubscriptBox["rF", "j"], "\[Pi]", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"Faces", "[", RowBox[{"[", RowBox[{ "include", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "]"}], ",", RowBox[{"n", "-", "1"}]}], "]"}], "||", RowBox[{"MemberQ", "[", RowBox[{ RowBox[{"Faces", "[", RowBox[{"[", RowBox[{ "include", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "]"}], ",", "n"}], "]"}]}], ",", RowBox[{"(*", " ", "then", " ", "*)"}], " ", "1", ",", RowBox[{"(*", " ", "else", " ", "*)"}], " ", "2"}], "]"}]}]}]}], ",", "\n", RowBox[{ RowBox[{ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], RowBox[{"n", "-", "2"}]], SubscriptBox["rV", "i"]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"j", "=", "1"}], RowBox[{"f", "-", "2"}]], SubscriptBox["rF", "j"]}]}], "==", "0"}]}], "}"}], ",", RowBox[{"Join", "[", RowBox[{"rhoV", ",", "rhoF"}], "]"}]}], "]"}]}], ";", "\n", RowBox[{"RADII", "=", RowBox[{"Exp", "[", RowBox[{"Re", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{"rhoV", ",", "rhoF"}], "]"}], "/.", RowBox[{"(", RowBox[{ "NM", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ")"}]}], "]"}], "]"}]}], ";", "\n", RowBox[{"RADII", "/=", RowBox[{ "RADII", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", "\n", RowBox[{"radii", "=", RowBox[{"<|", "|>"}]}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"n", "-", "2"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{"radii", "[", "i", "]"}], "=", RowBox[{ "RADII", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}]}], "\n", "]"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "nonlinefaces", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{"radii", "[", RowBox[{ "nonlinefaces", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"RADII", "[", RowBox[{"[", RowBox[{"n", "-", "2", "+", "i"}], "]"}], "]"}]}]}], "\n", "]"}], ";", "\n", RowBox[{"{", RowBox[{"radii", ",", "LineFaces"}], "}"}]}]}], "\n", "]"}]}]], "Input",\ CellChangeTimes->{{3.738944922351673*^9, 3.738944928209741*^9}, { 3.738945041147901*^9, 3.7389450662906322`*^9}, 3.738945103193841*^9, { 3.7389451491008673`*^9, 3.738945149109166*^9}, {3.7389453081489058`*^9, 3.7389453081582003`*^9}}, ExpressionUUID -> "2f554fe4-c15f-4666-b6a2-63251fd878b3"], Cell[BoxData[ RowBox[{ RowBox[{"Boundary", "[", RowBox[{"n_", ",", "FacesCW_", ",", "LineFaces_", ",", "radii_", ",", RowBox[{"\[Epsilon]_:", "0"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "i", ",", "j", ",", "faces", ",", "vertices", ",", "lastvisited", ",", "d", ",", "h", ",", "H", ",", "breaker", ",", "unvisited", ",", "f", ",", "endcircle", ",", "ComputeEndcircle", ",", "ComputeEndcircle2", ",", "delete"}], "}"}], ",", "\n", RowBox[{ RowBox[{"unvisited", " ", "=", "FacesCW"}], ";", RowBox[{"(*", RowBox[{ "Keeps", " ", "track", " ", "of", " ", "the", " ", "faces", " ", "we", " ", RowBox[{"haven", "'"}], "t", " ", "visited"}], "*)"}], "\n", RowBox[{"f", "=", RowBox[{"Length", "[", "FacesCW", "]"}]}], ";", "\n", "\n", RowBox[{"faces", "=", RowBox[{"<|", "|>"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{"centers", " ", "of", " ", "face", " ", "circles", " ", RowBox[{"(", RowBox[{ RowBox[{"or", " ", "normals"}], ",", " ", RowBox[{"for", " ", "lines"}]}], ")"}]}], " ", "*)"}], "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "f"}], ",", RowBox[{"i", "++"}], ",", RowBox[{ RowBox[{"faces", "[", RowBox[{ "FacesCW", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}]}], "]"}], ";", "\n", RowBox[{"vertices", "=", RowBox[{"<|", "|>"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{"centers", " ", "of", " ", "vertex", " ", "circles", " ", RowBox[{"(", RowBox[{ RowBox[{"or", " ", "normals"}], ",", " ", RowBox[{"for", " ", "lines"}]}], ")"}]}], " ", "*)"}], "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"n", "-", "2"}]}], ",", RowBox[{"i", "++"}], ",", RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}]}], "]"}], ";", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{ "Radii", " ", "is", " ", "an", " ", "assoc", " ", "from", " ", "v"}], "\[Rule]", RowBox[{ RowBox[{"rad", " ", "and", " ", "facelist"}], "\[Rule]", "rad"}]}], " ", "*)"}], "\n", "\n", RowBox[{"(*", RowBox[{ "Vertex", " ", "circles", " ", "going", " ", "vertically", " ", "upwards", " ", "along", " ", "first", " ", "FaceLine"}], "*)"}], "\n", RowBox[{"h", "=", "0"}], ";", " ", RowBox[{"(*", " ", RowBox[{"height", " ", "along", " ", "the", " ", "left", " ", "line"}], " ", "*)"}], "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{ RowBox[{"Length", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}], "-", "2"}]}], RowBox[{"(*", RowBox[{ "Number", " ", "of", " ", "vertex", " ", "circles", " ", "that", " ", "lie", " ", "along", " ", "first", " ", "LineFace"}], "*)"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{ RowBox[{"vertices", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "]"}], "=", RowBox[{"{", RowBox[{"0", ",", RowBox[{"h", "+", RowBox[{"radii", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "]"}]}]}], "}"}]}], ";", RowBox[{"(*", RowBox[{ "Set", " ", "the", " ", "center", " ", "of", " ", "this", " ", "vertex", " ", "circle"}], "*)"}], "\n", RowBox[{"h", "+=", RowBox[{"2", RowBox[{"radii", "[", RowBox[{"[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "]"}], "]"}]}]}]}]}], "]"}], ";", RowBox[{"(*", RowBox[{ "Keeps", " ", "track", " ", "of", " ", "our", " ", "cumulative", " ", "height", " ", "as", " ", "we", " ", "climb", " ", "up", " ", "the", " ", "first", " ", "FaceLine"}], "*)"}], "\n", "\n", RowBox[{"unvisited", "=", RowBox[{"Delete", "[", RowBox[{"unvisited", ",", RowBox[{"Position", "[", RowBox[{"unvisited", ",", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}]}], "]"}]}], "]"}]}], ";", "\n", "\n", RowBox[{"d", "=", "0"}], ";", RowBox[{"(*", RowBox[{"Horizontal", " ", "distance"}], "*)"}], "\n", "\n", RowBox[{ RowBox[{"ComputeEndcircle", "[", RowBox[{"prev_", ",", "face_"}], "]"}], ":=", "\n", RowBox[{"(*", RowBox[{ "Returns", " ", "which", " ", "vertex", " ", "circle", " ", "we", " ", "calculated", " ", "last", " ", "based", " ", "on", " ", "previous", " ", "vertex", " ", "circle", " ", "and", " ", "face"}], "*)"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"face", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{"face", ",", RowBox[{"n", "-", "1"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "-", "2"}], ",", RowBox[{"Length", "[", "face", "]"}]}], "]"}], "+", "1"}], "]"}], "]"}], "==", "prev"}], ",", "\n", RowBox[{"(*", "then", "*)"}], RowBox[{"face", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{"face", ",", RowBox[{"n", "-", "1"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", RowBox[{"Length", "[", "face", "]"}]}], "]"}], "+", "1"}], "]"}], "]"}], ",", "\n", RowBox[{"(*", "else", "*)"}], " ", RowBox[{"face", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{"face", ",", RowBox[{"n", "-", "1"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "-", "2"}], ",", RowBox[{"Length", "[", "face", "]"}]}], "]"}], "+", "1"}], "]"}], "]"}]}], "]"}]}], ";", "\n", "\n", RowBox[{"endcircle", "=", RowBox[{"ComputeEndcircle", "[", RowBox[{"n", ",", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}]}], "]"}]}], ";", RowBox[{"(*", RowBox[{ RowBox[{ "Previous", " ", "vertex", " ", "circle", " ", "is", " ", "bottom", " ", "line"}], ",", " ", RowBox[{"face", " ", "is", " ", "first", " ", "FaceLine"}]}], "*)"}], "\n", "\n", RowBox[{"(*", RowBox[{ "Face", " ", "circles", " ", "going", " ", "horizontally", " ", "across", " ", "upper", " ", "vertex", " ", "line"}], "*)"}], "\n", RowBox[{"breaker", "=", "True"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "f"}], " ", ",", RowBox[{"j", "++"}], ",", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "unvisited", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{"n", "-", "1"}]}], "]"}], ",", " ", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"determine", " ", "if", " ", "this", " ", "face"}], "-", RowBox[{"circle", " ", "contains", " ", "n"}], "-", "1"}], ",", " ", RowBox[{ "so", " ", "it", " ", "is", " ", "on", " ", "the", " ", "upper", " ", "vertex", " ", "line"}]}], "*)"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{"ComputeEndcircle", "[", RowBox[{"endcircle", ",", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], "]"}], ",", "\n", RowBox[{"(*", RowBox[{ RowBox[{"determine", " ", "if", " ", "this", " ", "face"}], "-", RowBox[{ "circle", " ", "also", " ", "contains", " ", "the", " ", "vertex", " ", "right", " ", "before", " ", "n"}], "-", RowBox[{ "1", " ", "to", " ", "ensure", " ", "we", " ", "are", " ", "going", " ", "horizontally", " ", "across", " ", "in", " ", "the", " ", "right", " ", "order"}]}], "*)"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "==", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "]"}]}], ",", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{"If", " ", RowBox[{"we", "'"}], "ve", " ", "reached", " ", "the", " ", "second", " ", "faceline"}], ",", " ", RowBox[{"then", " ", "do", " ", RowBox[{"nothing", "--"}], "find", " ", "the", " ", "other", " ", "face", " ", "circle", " ", "containing", " ", "endcircle"}]}], "*)"}], "\n", ",", "\n", RowBox[{"(*", " ", RowBox[{ "else", " ", "if", " ", "the", " ", "face", " ", "circle", " ", "is", " ", "not", " ", "a", " ", "line"}], "*)"}], "\n", RowBox[{ RowBox[{ RowBox[{"faces", "[", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"d", "+", RowBox[{"radii", "[", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], ",", "h"}], "}"}]}], ";", " ", RowBox[{"(*", RowBox[{ "Set", " ", "the", " ", "center", " ", "of", " ", "this", " ", "face", " ", "circle"}], "*)"}], "\n", RowBox[{"d", "+=", RowBox[{"2", RowBox[{"radii", "[", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}]}], ";", " ", RowBox[{"(*", " ", RowBox[{ "update", " ", "how", " ", "far", " ", "along", " ", "the", " ", "top", " ", "line", " ", "we", " ", "are"}], " ", "*)"}], "\n", RowBox[{"endcircle", "=", RowBox[{"ComputeEndcircle", "[", RowBox[{"endcircle", ",", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], ";", RowBox[{"(*", RowBox[{"Update", " ", "endcircle"}], "*)"}], "\n", RowBox[{"unvisited", "=", RowBox[{"Delete", "[", RowBox[{"unvisited", ",", "i"}], "]"}]}], ";"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{ "remove", " ", "that", " ", "face", " ", "from", " ", "the", " ", "unvisited", " ", "list"}], " ", "*)"}], "\n", "]"}]}], "\n", "]"}]}], "\n", "]"}]}], "\n", "]"}], ";", "\n", RowBox[{"(*", RowBox[{ RowBox[{ "Vertex", " ", "circles", " ", "along", " ", "the", " ", "second", " ", "FaceLine"}], ",", " ", RowBox[{"climbing", " ", "vertically", " ", "upwards"}]}], "*)"}], "\n", RowBox[{"h", "=", "0"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{ RowBox[{"Length", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}], "-", "2"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{ RowBox[{"vertices", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "]"}], "=", RowBox[{"{", RowBox[{"d", ",", RowBox[{"h", "+", RowBox[{"radii", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "]"}]}]}], "}"}]}], ";", RowBox[{"h", "+=", RowBox[{"2", RowBox[{"radii", "[", RowBox[{"[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ",", "i"}], "]"}], "]"}], "]"}], "]"}]}]}]}]}], "]"}], ";", "\n", RowBox[{"H", "=", "h"}], ";", "\n", RowBox[{"h", "=", "0"}], ";", RowBox[{"(*", RowBox[{"Reset", " ", "height"}], "*)"}], "\n", "\n", RowBox[{ RowBox[{"ComputeEndcircle2", "[", RowBox[{"prev_", ",", "face_"}], "]"}], ":=", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"face", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{"face", ",", "n"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "-", "2"}], ",", RowBox[{"Length", "[", "face", "]"}]}], "]"}], "+", "1"}], "]"}], "]"}], "==", "prev"}], ",", "\n", RowBox[{"(*", "then", "*)"}], RowBox[{"face", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{"face", ",", "n"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", RowBox[{"Length", "[", "face", "]"}]}], "]"}], "+", "1"}], "]"}], "]"}], ",", "\n", RowBox[{"(*", "else", "*)"}], " ", RowBox[{"face", "[", RowBox[{"[", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{"face", ",", "n"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "-", "2"}], ",", RowBox[{"Length", "[", "face", "]"}]}], "]"}], "+", "1"}], "]"}], "]"}]}], "]"}]}], ";", "\n", "\n", RowBox[{"endcircle", "=", RowBox[{"ComputeEndcircle2", "[", RowBox[{ RowBox[{"n", "-", "1"}], ",", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}]}], "]"}]}], ";", "\n", RowBox[{"(*", RowBox[{ RowBox[{ "Face", " ", "circles", " ", "along", " ", "lower", " ", "vertex", " ", "line"}], ",", " ", RowBox[{ "moving", " ", "horizontally", " ", "from", " ", "origin", " ", "to", " ", "second", " ", "FaceLine"}]}], "*)"}], "\n", RowBox[{"d", "=", "0"}], ";", RowBox[{"(*", RowBox[{"Reset", " ", "distance"}], "*)"}], "\n", RowBox[{"breaker", "=", "True"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "f"}], ",", RowBox[{"j", "++"}], ",", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "unvisited", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", "n"}], "]"}], ",", " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"determine", " ", "if", " ", "this", " ", "face"}], "-", RowBox[{"circle", " ", "contains", " ", "n"}]}], " ", "*)"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", "endcircle"}], RowBox[{"(*", " ", RowBox[{"ComputeEndcircle2", "[", RowBox[{"endcircle", ",", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], " ", "*)"}], "]"}], ",", RowBox[{"(*", " ", RowBox[{ RowBox[{"determine", " ", "if", " ", "this", " ", "face"}], "-", RowBox[{ "cirlce", " ", "also", " ", "contains", " ", "the", " ", "vertex", " ", "right", " ", "before", " ", "n"}]}], " ", "*)"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "==", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "]"}]}], ",", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{"If", " ", RowBox[{"we", "'"}], "ve", " ", "reached", " ", "the", " ", "second", " ", "faceline"}], ",", " ", RowBox[{"then", " ", "do", " ", "nothing"}]}], "*)"}], "\n", ",", "\n", RowBox[{"(*", " ", "else", " ", "*)"}], "\n", RowBox[{ RowBox[{ RowBox[{"faces", "[", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"d", "+", RowBox[{"radii", "[", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], ",", "h"}], "}"}]}], ";", " ", RowBox[{"(*", " ", RowBox[{"then", " ", RowBox[{"we", "'"}], "ll", " ", "make", " ", "this", " ", RowBox[{"face", "'"}], "s", " ", "center", " ", "be", " ", "where", " ", "we", " ", "know", " ", "it", " ", "is"}], " ", "*)"}], "\n", RowBox[{"d", "+=", RowBox[{"2", RowBox[{"radii", "[", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}]}], ";", " ", RowBox[{"(*", " ", RowBox[{ "update", " ", "how", " ", "far", " ", "along", " ", "the", " ", "bottom", " ", "line", " ", "we", " ", "are"}], " ", "*)"}], "\n", RowBox[{"endcircle", "=", RowBox[{"ComputeEndcircle2", "[", RowBox[{"endcircle", ",", RowBox[{ "unvisited", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], ";", "\n", RowBox[{"unvisited", "=", RowBox[{"Delete", "[", RowBox[{"unvisited", ",", "i"}], "]"}]}], ";"}]}], "]"}]}], " ", RowBox[{"(*", " ", RowBox[{ "remove", " ", "that", " ", "face", " ", "from", " ", "the", " ", "unvisited", " ", "list"}], " ", "*)"}], "\n", "]"}]}], "\n", "]"}]}], "\n", "]"}]}], "\n", "]"}], ";", "\n", RowBox[{"(*", RowBox[{ "Set", " ", "the", " ", "normals", " ", "of", " ", "the", " ", "vertex", " ", "lines", " ", "and", " ", "face", " ", "lines"}], "*)"}], "\n", RowBox[{ RowBox[{"faces", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}], "=", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}]}], ";", "\n", RowBox[{ RowBox[{"faces", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}]}], ";", "\n", RowBox[{ RowBox[{"vertices", "[", "n", "]"}], "=", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}]}], "}"}]}], ";", "\n", RowBox[{ RowBox[{"vertices", "[", RowBox[{"n", "-", "1"}], "]"}], "=", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ";", "\n", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"ThrowOrderError", "[", RowBox[{ "faces", ",", "vertices", ",", "radii", ",", "d", ",", "H", ",", "n", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "0"}], "]"}], ",", "\n", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\n", RowBox[{"Print", "[", RowBox[{"faces", ",", "vertices", ",", "d", ",", "H", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}]}], "]"}], ";", "\n", RowBox[{ RowBox[{"faces", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}], "*=", RowBox[{"-", "1"}]}], ";", "\n", RowBox[{ RowBox[{"faces", "[", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "]"}], "]"}], "*=", RowBox[{"-", "1"}]}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"i", "==", RowBox[{"n", "-", "1"}]}], "||", RowBox[{"i", "==", "n"}]}], ",", "\n", ",", "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", "d"}], "]"}], "\[LessEqual]", "\[Epsilon]"}], ",", "\n", RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "=", RowBox[{"{", RowBox[{"0", ",", RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}]}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", "0"}], "]"}], "\[LessEqual]", "\[Epsilon]"}], ",", "\n", RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "=", RowBox[{"{", RowBox[{"d", ",", RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}]}]}], "]"}]}], "]"}], ";"}]}], "\n", "]"}]}], "]"}]}]}], "]"}], ";", "\n", "\n", RowBox[{"(*", RowBox[{"Return", " ", "the", " ", RowBox[{"assoc", "'"}], "s", " ", "of", " ", "the", " ", "faces", " ", "to", " ", "their", " ", "centers", " ", "and", " ", "vertices", " ", "to", " ", "their", " ", "centers"}], "*)"}], "\n", RowBox[{"{", RowBox[{"vertices", ",", "faces", ",", "d", ",", "H"}], "}"}]}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{{3.738944931882826*^9, 3.738944951559372*^9}, { 3.738945066300728*^9, 3.738945066384759*^9}, {3.7389451032070713`*^9, 3.7389451032788267`*^9}, {3.7389453081694593`*^9, 3.738945308253532*^9}}, ExpressionUUID -> "28f6e336-6ada-41e7-8e55-01ab68af7ad7"], Cell[BoxData[ RowBox[{ RowBox[{"FindRest", "[", RowBox[{ RowBox[{"{", RowBox[{"x_", ",", "y_"}], "}"}], ",", "r_", ",", "face_", ",", "vertices_", ",", "radii_", ",", "lines_"}], "]"}], ":=", RowBox[{"(*", " ", RowBox[{ "face", " ", "is", " ", "all", " ", "the", " ", "vertices", " ", "that", " ", "the", " ", "face", " ", "intersects"}], " ", "*)"}], "\n", RowBox[{"(*", RowBox[{ RowBox[{"{", RowBox[{"x_", ",", "y_"}], "}"}], ",", RowBox[{"r", ":", " ", RowBox[{ "known", " ", "center", " ", "of", " ", "opposite", " ", "kind", " ", "and", " ", "its", " ", "radius", "\n", "face"}], ":", " ", RowBox[{ "all", " ", "the", " ", "circles", " ", "of", " ", "its", " ", "kind", " ", "that", " ", "pass", " ", "thru", " ", "that", " ", "opposite", " ", "known", " ", "circle", "\n", RowBox[{"vertices", ":", " ", RowBox[{ "all", " ", "the", " ", "circles", " ", "of", " ", "its", " ", "kind", " ", "that", " ", "are", " ", "tangent", " ", "to", " ", "the", " ", "one", " ", RowBox[{"we", "'"}], "e", " ", "looking", " ", "for"}]}]}]}]}], "*)"}], "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"verts", "=", "vertices"}], ",", "i", ",", "j", ",", "\[Phi]", ",", "\[Theta]", ",", "\[Omega]", ",", RowBox[{"face2", "=", "face"}], ",", "b", ",", RowBox[{"b2", "=", "True"}]}], "}"}], ",", "\n", "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "==", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], "||", RowBox[{"MemberQ", "[", RowBox[{"lines", ",", RowBox[{ "face2", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "]"}]}], ",", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "2"}], ",", RowBox[{ RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "face2", "]"}]}], "&&", "b2"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "!=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], "&&", RowBox[{"!", RowBox[{"MemberQ", "[", RowBox[{"lines", ",", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}]}], ",", "\n", RowBox[{ RowBox[{"face2", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"face2", "[", RowBox[{"[", RowBox[{"i", ";;"}], "]"}], "]"}], ",", RowBox[{"face2", "[", RowBox[{"[", RowBox[{";;", RowBox[{"i", "-", "1"}]}], "]"}], "]"}]}], "]"}]}], ";", "\n", RowBox[{"b2", "=", "False"}], ";"}]}], "\n", "]"}]}], "]"}]}], "]"}], ";", "\n", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "face2"}], "]"}], ";"}], " ", "*)"}], "\n", "\n", RowBox[{"b", "=", "True"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "2"}], ",", RowBox[{ RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "face2", "]"}]}], "&&", "b"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{"lines", ",", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], ",", "\n", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"face2", ",", RowBox[{ "face2", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "]"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", RowBox[{ RowBox[{"Length", "[", "face2", "]"}], "-", "1"}]}], ",", RowBox[{"j", ">", "i"}], ",", RowBox[{"j", "--"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "==", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], ",", "\n", RowBox[{ RowBox[{"\[Phi]", "=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{"face2", "[", RowBox[{"[", RowBox[{"j", "+", "1"}], "]"}], "]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", "x"}], ",", RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{"face2", "[", RowBox[{"[", RowBox[{"j", "+", "1"}], "]"}], "]"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", "y"}]}], "]"}]}], ";", "\n", RowBox[{"\[Theta]", "=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{"radii", "[", RowBox[{"face2", "[", RowBox[{"[", RowBox[{"j", "+", "1"}], "]"}], "]"}], "]"}], "/", "r"}], "]"}]}], ";", RowBox[{"(*", " ", RowBox[{"j", "+", RowBox[{ "1", " ", "refers", " ", "to", " ", "previously", " ", RowBox[{"computed", " ", "/", " ", "known"}]}]}], " ", "*)"}], "\n", RowBox[{"\[Omega]", "=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{"radii", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "/", "r"}], "]"}]}], ";", "\n", RowBox[{ RowBox[{"verts", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"x", "+", RowBox[{ RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"r", "^", "2"}], "+", RowBox[{ RowBox[{"radii", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "^", "2"}]}], "]"}], RowBox[{"Cos", "[", RowBox[{"\[Phi]", "-", "\[Theta]", "-", "\[Omega]"}], "]"}]}]}], ",", RowBox[{"y", "+", RowBox[{ RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"r", "^", "2"}], "+", RowBox[{ RowBox[{"radii", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "^", "2"}]}], "]"}], RowBox[{"Sin", "[", RowBox[{"\[Phi]", "-", "\[Theta]", "-", "\[Omega]"}], "]"}]}]}]}], "}"}]}]}]}], "\n", "]"}]}], "\n", "]"}], ";", RowBox[{"b", "=", "False"}], ";", "Break"}], ",", "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "==", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], ",", "\n", RowBox[{ RowBox[{"\[Phi]", "=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{"face2", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", "x"}], ",", RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{"face2", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", "y"}]}], "]"}]}], ";", "\n", RowBox[{"\[Theta]", "=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{"radii", "[", RowBox[{"face2", "[", RowBox[{"[", RowBox[{"i", "-", "1"}], "]"}], "]"}], "]"}], "/", "r"}], "]"}]}], ";", RowBox[{"(*", " ", RowBox[{"i", "-", RowBox[{"1", " ", "refers", " ", "to", " ", "previously", " ", RowBox[{"computed", " ", "/", " ", "known"}]}]}], " ", "*)"}], "\n", RowBox[{"\[Omega]", "=", RowBox[{"ArcTan", "[", RowBox[{ RowBox[{"radii", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "/", "r"}], "]"}]}], ";", "\n", RowBox[{ RowBox[{"verts", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"{", RowBox[{ RowBox[{"x", "+", RowBox[{ RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"r", "^", "2"}], "+", RowBox[{ RowBox[{"radii", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "^", "2"}]}], "]"}], RowBox[{"Cos", "[", RowBox[{"\[Phi]", "+", "\[Theta]", "+", "\[Omega]"}], "]"}]}]}], ",", RowBox[{"y", "+", RowBox[{ RowBox[{"Sqrt", "[", RowBox[{ RowBox[{"r", "^", "2"}], "+", RowBox[{ RowBox[{"radii", "[", RowBox[{ "face2", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "^", "2"}]}], "]"}], RowBox[{"Sin", "[", RowBox[{"\[Phi]", "+", "\[Theta]", "+", "\[Omega]"}], "]"}]}]}]}], "}"}]}]}]}], "]"}], ";"}]}], "\n", "]"}], ";"}]}], "]"}], ";", "\n", RowBox[{"Simplify", "[", "verts", "]"}]}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{ 3.73868912420809*^9, {3.738944952786417*^9, 3.738944962884543*^9}, { 3.73894504593766*^9, 3.7389450664130583`*^9}, {3.7389451032878017`*^9, 3.738945103292657*^9}, {3.73894530826192*^9, 3.738945308266972*^9}}, ExpressionUUID -> "1d4e5378-f6a1-45cb-aea5-8837b8edb921"], Cell[BoxData[ RowBox[{ RowBox[{"Cull", "[", "assoc_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"vis", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"unv", "=", RowBox[{"{", "}"}]}], ",", "i"}], "}"}], ",", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"Keys", "[", "assoc", "]"}], "]"}]}], ",", RowBox[{"i", "++"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"assoc", "[", RowBox[{ RowBox[{"Keys", "[", "assoc", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "==", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], ",", RowBox[{"AppendTo", "[", RowBox[{"unv", ",", RowBox[{ RowBox[{"Keys", "[", "assoc", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], ",", RowBox[{"AppendTo", "[", RowBox[{"vis", ",", RowBox[{ RowBox[{"Keys", "[", "assoc", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], "]"}]}], "]"}], ";", RowBox[{"{", RowBox[{"vis", ",", "unv"}], "}"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.738944964380446*^9, 3.7389449684857483`*^9}, 3.738945308272415*^9}, ExpressionUUID -> "67805f83-79d3-4ce2-b6d5-7fbeece1189d"], Cell[BoxData[ RowBox[{ RowBox[{"Interior", "[", RowBox[{ "n_", ",", "FacesCW_", ",", "LineFaces_", ",", "radii_", ",", "vertices_", ",", "faces_", ",", "d_", ",", "h_"}], "]"}], ":=", "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Vunv", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"Funv", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"Vvis", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"Fvis", "=", RowBox[{"{", "}"}]}], ",", "i", ",", "j", ",", "f", ",", RowBox[{"verts", "=", "vertices"}], ",", "verts2", ",", RowBox[{"fcs", "=", "faces"}], ",", "fcs2", ",", "fi", ",", "vi", ",", "x", ",", "y", ",", "k", ",", "b"}], "}"}], ",", "\n", RowBox[{ RowBox[{"f", "=", RowBox[{"Length", "[", "FacesCW", "]"}]}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"vertices", "[", "i", "]"}], "==", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], ",", RowBox[{"AppendTo", "[", RowBox[{"Vunv", ",", "i"}], "]"}], ",", RowBox[{"AppendTo", "[", RowBox[{"Vvis", ",", "i"}], "]"}]}], "]"}]}], "]"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "f"}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"faces", "[", RowBox[{ "FacesCW", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "==", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], ",", RowBox[{"AppendTo", "[", RowBox[{"Funv", ",", RowBox[{ "FacesCW", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], ",", RowBox[{"AppendTo", "[", RowBox[{"Fvis", ",", RowBox[{ "FacesCW", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], "]"}]}], "]"}], ";", "\n", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "Vunv", ",", "Vvis", ",", "Funv", ",", "Fvis"}], "]"}], ";"}], " ", "*)"}], "\n", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{ RowBox[{"j", "\[LessEqual]", RowBox[{"n", "+", RowBox[{"Length", "[", "FacesCW", "]"}]}]}], "&&", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Length", "[", "Vunv", "]"}], "+", RowBox[{"Length", "[", "Funv", "]"}]}], ">", "0"}], ")"}]}], ",", RowBox[{"j", "++"}], ",", "\n", "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "Fvis", "]"}]}], ",", RowBox[{"i", "++"}], ",", RowBox[{"(*", " ", RowBox[{ "for", " ", "a", " ", "known", " ", "face", " ", "circle"}], " ", "*)"}], "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Intersection", "[", RowBox[{"Vvis", ",", RowBox[{ "Fvis", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], "]"}], "*", RowBox[{"Length", "[", RowBox[{"Intersection", "[", RowBox[{"Vunv", ",", RowBox[{ "Fvis", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], "]"}]}], ">", "0"}], ",", "\n", RowBox[{ RowBox[{"fi", "=", RowBox[{ "Fvis", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "=", RowBox[{"fcs", "[", "fi", "]"}]}], ";", "\n", RowBox[{"verts2", "=", RowBox[{"FindRest", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"radii", "[", "fi", "]"}], ",", "fi", ",", "verts", ",", "radii", ",", RowBox[{"{", RowBox[{ RowBox[{"n", "-", "1"}], ",", "n"}], "}"}]}], "]"}]}], ";", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"ThrowOrderError", "[", RowBox[{ "fcs", ",", "verts2", ",", "radii", ",", "d", ",", "h", ",", "n", ",", RowBox[{"{", RowBox[{ RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "]"}], ",", RowBox[{"FacesCW", "[", RowBox[{"[", RowBox[{ "LineFaces", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "]"}]}], "}"}], ",", "0"}], "]"}], ",", RowBox[{"verts", "=", RowBox[{"FindRest", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"radii", "[", "fi", "]"}], ",", RowBox[{"Reverse", "[", "fi", "]"}], ",", "verts", ",", "radii", ",", RowBox[{"{", RowBox[{ RowBox[{"n", "-", "1"}], ",", "n"}], "}"}]}], "]"}]}], ",", "\n", RowBox[{"verts", "=", "verts2"}]}], "]"}], ";"}]}], "\n", RowBox[{"(*", " ", "\n", RowBox[{ RowBox[{"Print", "[", RowBox[{"Render", "[", RowBox[{"radii", ",", "fcs", ",", "verts", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "n", ",", "d", ",", "h"}], "]"}], "]"}], ";", "\n", RowBox[{"Print", "[", RowBox[{ RowBox[{"N", "[", "fcs", "]"}], ",", RowBox[{"N", "[", "verts", "]"}]}], "]"}]}], "\n", "*)"}], "\n", "]"}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{"Vvis", ",", "Vunv"}], "}"}], "=", RowBox[{"Cull", "[", "verts", "]"}]}], ";"}]}], "\n", "]"}], ";", "\n", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "Vvis", "]"}]}], ",", RowBox[{"i", "++"}], ",", " ", RowBox[{"(*", " ", RowBox[{ "for", " ", "a", " ", "known", " ", "vertex", " ", "circle"}], " ", "*)"}], "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"b", "=", "False"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", RowBox[{"k", "\[LessEqual]", RowBox[{"Length", "[", "Fvis", "]"}]}], ",", RowBox[{"k", "++"}], ",", RowBox[{"b", "=", RowBox[{"b", "||", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "Fvis", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ",", RowBox[{ "Vvis", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], ",", "True", ",", "False"}], "]"}]}]}]}], "]"}], ";", "b"}], ",", "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"b", "=", "False"}], ";", RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", RowBox[{"k", "\[LessEqual]", RowBox[{"Length", "[", "Funv", "]"}]}], ",", RowBox[{"k", "++"}], ",", RowBox[{"b", "=", RowBox[{"b", "||", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "Funv", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ",", RowBox[{ "Vvis", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}], ",", "True", ",", "False"}], "]"}]}]}]}], "]"}], ";", "b"}], ",", "\n", RowBox[{"(*", " ", "then", " ", "*)"}], "\n", RowBox[{ RowBox[{"vi", "=", RowBox[{ "Vvis", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "=", RowBox[{"verts", "[", "vi", "]"}]}], ";", "\n", RowBox[{"fcs2", "=", RowBox[{"FindRest", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"radii", "[", "vi", "]"}], ",", RowBox[{"FacesList", "[", RowBox[{"vi", ",", "FacesCW"}], "]"}], ",", "fcs", ",", "radii", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}]}], "]"}]}], ";", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"ThrowOrderError", "[", RowBox[{ "fcs2", ",", "verts", ",", "radii", ",", "d", ",", "h", ",", "n", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "0"}], "]"}], ",", "\n", RowBox[{"(*", " ", "\n", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"N", "[", "fcs2", "]"}]}], "]"}], ";", "\n", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"Render", "[", RowBox[{"radii", ",", "fcs2", ",", "verts", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "n", ",", "d", ",", "h"}], "]"}]}], "]"}], ";"}], " ", "\n", "*)"}], "\n", RowBox[{"fcs", "=", RowBox[{"FindRest", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", RowBox[{"radii", "[", "vi", "]"}], ",", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "fcs2"}], "]"}], ";"}], " ", "*)"}], "\n", RowBox[{"Reverse", "[", RowBox[{"FacesList", "[", RowBox[{"vi", ",", "FacesCW"}], "]"}], "]"}], ",", "fcs", ",", "radii", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}]}], "]"}]}], ",", "\n", RowBox[{"fcs", "=", "fcs2"}]}], "]"}], ";"}]}], "\n", RowBox[{"(*", " ", "\n", RowBox[{ RowBox[{"Print", "[", RowBox[{"Render", "[", RowBox[{"radii", ",", "fcs", ",", "verts", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "n", ",", "d", ",", "h"}], "]"}], "]"}], ";", "\n", RowBox[{"Print", "[", RowBox[{ RowBox[{"N", "[", "fcs", "]"}], ",", RowBox[{"N", "[", "verts", "]"}]}], "]"}]}], "\n", "*)"}], "\n", "]"}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{"Fvis", ",", "Funv"}], "}"}], "=", RowBox[{"Cull", "[", "fcs", "]"}]}], ";"}]}], "\n", "]"}]}], "\n", "]"}], ";"}]}], "\n", "]"}], ";", "\n", RowBox[{"{", RowBox[{"verts", ",", "fcs"}], "}"}]}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{{3.73894496940329*^9, 3.738944977087779*^9}, 3.738945066420636*^9, 3.738945103115882*^9, {3.738945149118018*^9, 3.738945149123786*^9}, {3.738945308282793*^9, 3.7389453083170643`*^9}}, ExpressionUUID -> "b81fbe31-b72b-4dbc-8f62-244838eb4039"], Cell[BoxData[ RowBox[{ RowBox[{"ThrowOrderError", "[", RowBox[{ "fcs2_", ",", "verts_", ",", "radii_", ",", "d_", ",", "h_", ",", "n_", ",", "fls_", ",", "\[Epsilon]_"}], "]"}], RowBox[{"(*", " ", RowBox[{"fcs2", " ", "is", " ", "proposed", " ", "fcs", " ", RowBox[{"association", ".", " ", "fls"}], " ", "is", " ", "facelines"}], " ", "*)"}], ":=", "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "j", ",", "b", ",", "b2", ",", "K"}], "}"}], ",", "\n", RowBox[{ RowBox[{"K", "=", RowBox[{"{", "}"}]}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"Keys", "[", "fcs2", "]"}], "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"MemberQ", "[", RowBox[{"fls", ",", RowBox[{ RowBox[{"Keys", "[", "fcs2", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], ",", RowBox[{"AppendTo", "[", RowBox[{"K", ",", RowBox[{ RowBox[{"Keys", "[", "fcs2", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], "]"}]}], "\n", "]"}], ";", "\n", "\n", RowBox[{"b", "=", "False"}], ";", " ", RowBox[{"(*", " ", "\"\\"", " ", "*)"}], "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{ RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "K", "]"}]}], "&&", RowBox[{"!", "b"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"b2", "=", "False"}], ";", "\n", RowBox[{ RowBox[{ RowBox[{"-", "\[Infinity]"}], "<", RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "<", "0"}], "\n", "||", RowBox[{ RowBox[{"-", "\[Infinity]"}], "<", RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "<", "0"}], "\n", "||", RowBox[{ RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ">", "d"}], "\n", "||", RowBox[{ RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ">", "h"}], "\n", "||", RowBox[{"(", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"K", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "!=", RowBox[{"n", "-", "1"}]}], "&&", RowBox[{ RowBox[{"K", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "!=", "n"}], "&&", RowBox[{ RowBox[{"verts", "[", RowBox[{"K", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "!=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], "&&", RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "!=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}]}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"EuclideanDistance", "[", RowBox[{ RowBox[{"verts", "[", RowBox[{"K", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], ",", RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], "]"}], ">=", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Epsilon]"}], ")"}], RowBox[{"(", RowBox[{ RowBox[{"radii", "[", RowBox[{"K", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "+", RowBox[{"radii", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], ")"}]}]}], ",", RowBox[{ RowBox[{"b2", "=", "True"}], ";", "Break"}]}], "]"}]}], "]"}]}], "]"}], ";", "b2"}], ")"}]}]}], ",", "\n", RowBox[{"b", "=", "True"}], ",", "\n", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{ RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "K", "]"}]}], "&&", RowBox[{"!", "b"}]}], ",", RowBox[{"j", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"i", "!=", "j"}], "&&", RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "!=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], "&&", RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "!=", RowBox[{"{", RowBox[{ RowBox[{"-", "\[Infinity]"}], ",", RowBox[{"-", "\[Infinity]"}]}], "}"}]}], "&&", "\n", RowBox[{ RowBox[{"EuclideanDistance", "[", RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}]}], "]"}], "<", RowBox[{ RowBox[{"(", RowBox[{"1", "+", "\[Epsilon]"}], ")"}], RowBox[{"(", RowBox[{ RowBox[{"radii", "[", RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "]"}], "+", RowBox[{"radii", "[", RowBox[{"fcs2", "[", RowBox[{ "K", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "]"}]}], ")"}]}]}]}], "\n", ",", RowBox[{"(*", " ", RowBox[{"then", ",", " ", "bad"}], " ", "*)"}], " ", RowBox[{"b", "=", "True"}]}], "]"}]}], "]"}]}], "]"}], ";"}]}], "\n", "]"}], ";", "\n", "\n", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{ RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}]}], "&&", RowBox[{"!", "b"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{"fls", "[", RowBox[{"[", RowBox[{"1", ",", "i"}], "]"}], "]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "!=", RowBox[{ RowBox[{"d", "/", "2"}], "+", RowBox[{ RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"d", "/", "2"}]}]}]}], "&&", RowBox[{ RowBox[{"fls", "[", RowBox[{"[", RowBox[{"1", ",", "i"}], "]"}], "]"}], "<", RowBox[{"n", "-", "1"}]}]}], ",", RowBox[{"b", "=", "True"}]}], "]"}]}], "\n", "]"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{ RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}]}], "&&", RowBox[{"!", "b"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"verts", "[", RowBox[{"fls", "[", RowBox[{"[", RowBox[{"2", ",", "i"}], "]"}], "]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "!=", RowBox[{ RowBox[{"d", "/", "2"}], "+", RowBox[{ RowBox[{ RowBox[{"fcs2", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"d", "/", "2"}]}]}]}], "&&", RowBox[{ RowBox[{"fls", "[", RowBox[{"[", RowBox[{"2", ",", "i"}], "]"}], "]"}], "<", RowBox[{"n", "-", "1"}]}]}], ",", RowBox[{"b", "=", "True"}]}], "]"}]}], "\n", "]"}], ";", "\n", "b"}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{ 3.738689132429161*^9, {3.738944979599412*^9, 3.73894499025143*^9}, { 3.738945049764028*^9, 3.738945066214594*^9}, {3.7389451031221046`*^9, 3.738945103137187*^9}, {3.7389453083265457`*^9, 3.7389453083502073`*^9}}, ExpressionUUID -> "46797c31-6fb3-4df2-865c-66e2e6aff91f"], Cell[BoxData[ RowBox[{ RowBox[{"FacesList", "[", RowBox[{"v_", ",", "Faces_"}], "]"}], ":=", "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ContainV", "=", RowBox[{"{", "}"}]}], ",", "i", ",", RowBox[{"L", "=", "2"}], ",", RowBox[{"p", "=", "3"}], ",", "temp"}], "}"}], ",", "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "Faces", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ "Faces", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", "v"}], "]"}], ",", RowBox[{"AppendTo", "[", RowBox[{"ContainV", ",", RowBox[{ "Faces", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], "]"}]}], "]"}], ";", "\n", RowBox[{"While", "[", RowBox[{ RowBox[{"L", "<", RowBox[{"Length", "[", "ContainV", "]"}]}], ",", "\n", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{"p", "\[LessEqual]", RowBox[{"Length", "[", "ContainV", "]"}]}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Intersection", "[", RowBox[{ RowBox[{"ContainV", "[", RowBox[{"[", RowBox[{"L", "-", "1"}], "]"}], "]"}], ",", RowBox[{"ContainV", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], "]"}], "==", "2"}], ",", "\n", RowBox[{ RowBox[{"temp", "=", RowBox[{"ContainV", "[", RowBox[{"[", "p", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"ContainV", "[", RowBox[{"[", "p", "]"}], "]"}], "=", RowBox[{"ContainV", "[", RowBox[{"[", "L", "]"}], "]"}]}], ";", RowBox[{ RowBox[{"ContainV", "[", RowBox[{"[", "L", "]"}], "]"}], "=", "temp"}], ";", RowBox[{"p", "=", RowBox[{"1", "+", RowBox[{"Length", "[", "ContainV", "]"}]}]}]}], ",", "\n", RowBox[{"p", "++"}]}], "]"}]}], "\n", "]"}], ";", "\n", RowBox[{"L", "++"}], ";", "\n", RowBox[{"p", "=", RowBox[{"L", "+", "1"}]}], ";"}]}], "\n", "]"}], ";", "\n", "ContainV"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.738944991496087*^9, 3.738944992083499*^9}, { 3.738945308355789*^9, 3.738945308358766*^9}}, ExpressionUUID -> "e41d9d96-d48e-4c29-86a7-16b090045763"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Packing", "[", RowBox[{"n_", ",", "FacesCW_", ",", RowBox[{"\[Epsilon]_:", "0"}]}], "]"}], ":=", "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "radii", ",", "LineFaces", ",", "vertices", ",", "faces", ",", "d", ",", "h"}], "}"}], ",", "\n", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"radii", ",", "LineFaces"}], "}"}], "=", RowBox[{"EnergySetup", "[", RowBox[{"n", ",", "FacesCW"}], "]"}]}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{"vertices", ",", "faces", ",", "d", ",", "h"}], "}"}], "=", RowBox[{"Boundary", "[", RowBox[{ "n", ",", "FacesCW", ",", "LineFaces", ",", "radii", ",", "\[Epsilon]"}], "]"}]}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{"vertices", ",", "faces"}], "}"}], "=", RowBox[{"Interior", "[", RowBox[{ "n", ",", "FacesCW", ",", "LineFaces", ",", "radii", ",", "vertices", ",", "faces", ",", "d", ",", "h"}], "]"}]}], ";", "\n", RowBox[{"{", RowBox[{ "vertices", ",", "faces", ",", "radii", ",", "d", ",", "h", ",", "LineFaces"}], "}"}]}]}], "]"}]}], ";"}]], "Input", ExpressionUUID -> "84ed53dc-7d30-483b-ac66-77f011de327c"], Cell[BoxData[ RowBox[{ RowBox[{"Render", "[", RowBox[{ "radii_", ",", "fcs_", ",", "verts_", ",", "fls_", ",", "n_", ",", "d_", ",", "h_"}], "]"}], ":=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Blue", ",", "Thick", ",", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"i", "==", RowBox[{"n", "-", "1"}]}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}], ",", "h"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"d", "+", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}], ",", "h"}], "}"}]}], "}"}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"i", "==", "n"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"d", "+", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}], ",", "0"}], "}"}]}], "}"}], "]"}], ",", "\n", RowBox[{"Circle", "[", RowBox[{ RowBox[{"verts", "[", RowBox[{ RowBox[{"Keys", "[", "verts", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"radii", "[", RowBox[{ RowBox[{"Keys", "[", "verts", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], "]"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}], ",", "\n", "Red", ",", "Dashed", ",", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Keys", "[", "fcs", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "==", RowBox[{ "fls", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"h", "+", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}]}], "}"}]}], "}"}], "]"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Keys", "[", "fcs", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "==", RowBox[{ "fls", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"d", ",", RowBox[{"-", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"d", ",", RowBox[{"h", "+", RowBox[{"Max", "[", RowBox[{"Values", "[", "radii", "]"}], "]"}]}]}], "}"}]}], "}"}], "]"}], ",", "\n", RowBox[{"Circle", "[", RowBox[{ RowBox[{"fcs", "[", RowBox[{ RowBox[{"Keys", "[", "fcs", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"radii", "[", RowBox[{ RowBox[{"Keys", "[", "fcs", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], "]"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"Length", "[", RowBox[{"Keys", "[", "fcs", "]"}], "]"}]}], "}"}]}], "]"}]}], "\n", "}"}], "]"}]}]], "Input", CellChangeTimes->{{3.73894499318482*^9, 3.738945006955821*^9}, 3.738945066219905*^9, 3.7389451031465387`*^9}, ExpressionUUID -> "5e6aba07-53fb-4491-808a-1f09239b7200"], Cell[BoxData[ RowBox[{ RowBox[{"R", "[", RowBox[{"vhat_", ",", RowBox[{"d_:", "2"}]}], "]"}], ":=", RowBox[{ RowBox[{"IdentityMatrix", "[", RowBox[{"d", "+", "2"}], "]"}], "+", RowBox[{"2", RowBox[{ RowBox[{"\[ScriptCapitalQ]", "[", "d", "]"}], ".", RowBox[{"Transpose", "[", RowBox[{"{", "vhat", "}"}], "]"}], ".", RowBox[{"{", "vhat", "}"}]}]}]}]}]], "Input", ExpressionUUID -> "e3b11d5c-faa6-4c0a-8e9e-3d90e53b2058"], Cell[BoxData[ RowBox[{ RowBox[{"Everything", "[", RowBox[{"n_", ",", "FacesCW_", ",", RowBox[{"\[Epsilon]_:", "0"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"vertices", ",", "faces", ",", RowBox[{"f", "=", RowBox[{"Length", "[", "FacesCW", "]"}]}], ",", "radii", ",", "d", ",", "h", ",", "LineFaces", ",", "Send1", ",", "Send2", ",", "Vnye", ",", RowBox[{"bends", "=", RowBox[{"{", "}"}]}]}], "}"}], ",", "\n", RowBox[{ RowBox[{ RowBox[{"Send1", "[", "x_", "]"}], ":=", RowBox[{"SendToZero", "[", RowBox[{"x", ",", "\[Epsilon]"}], "]"}]}], ";", "\n", RowBox[{ RowBox[{"Send2", "[", "list_", "]"}], ":=", RowBox[{"Send1", "/@", "list"}]}], ";", "\n", RowBox[{ RowBox[{"{", RowBox[{ "vertices", ",", "faces", ",", "radii", ",", "d", ",", "h", ",", "LineFaces"}], "}"}], "=", RowBox[{"Packing", "[", RowBox[{"n", ",", "FacesCW", ",", "\[Epsilon]"}], "]"}]}], ";", "\n", RowBox[{"Vnye", "=", RowBox[{"MatrixForm", "[", RowBox[{"RootApproximant", "[", RowBox[{"SuperCluster", "[", RowBox[{"vertices", ",", "faces", ",", "radii", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "d", ",", "h", ",", "n"}], "]"}], "]"}], "]"}]}], ";", "\n", RowBox[{"bends", "=", RowBox[{ RowBox[{"Bend", "[", RowBox[{ RowBox[{ "Vnye", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", "n"}], "]"}], "/@", RowBox[{"Range", "@", "f"}]}]}], ";", "\n", RowBox[{"Column", "[", RowBox[{"{", "\n", RowBox[{ RowBox[{"Render", "[", RowBox[{"radii", ",", "faces", ",", "vertices", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "n", ",", "d", ",", "h"}], "]"}], ",", "\n", "Vnye", ",", "\n", "bends", ",", "\n", RowBox[{"MatrixForm", "[", RowBox[{"RootApproximant", "[", "\n", RowBox[{"Send2", "/@", RowBox[{"Gram", "[", RowBox[{"SuperCluster", "[", RowBox[{"vertices", ",", "faces", ",", "radii", ",", RowBox[{"FacesCW", "[", RowBox[{"[", "LineFaces", "]"}], "]"}], ",", "d", ",", "h", ",", "n"}], "]"}], "]"}]}], "\n", "]"}], "]"}]}], "\n", "}"}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{3.738945066224815*^9}, ExpressionUUID -> "4505d2cb-64fe-4128-8a4e-c8450f146b1e"], Cell[BoxData[ RowBox[{ RowBox[{"InvCoords", "[", RowBox[{"z_", ",", "r_", ",", RowBox[{"d_:", "0"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"r", "==", "\[Infinity]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", "d"}], ",", "0", ",", "z"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Norm", "[", "z", "]"}], "^", "2"}], "/", "r"}], "-", "r"}], ",", RowBox[{"1", "/", "r"}], ",", RowBox[{"z", "/", "r"}]}], "}"}]}], "]"}]}]], "Input", ExpressionUUID -> "eb62110f-4847-41d5-bcdc-b22293cede36"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Gram", "[", RowBox[{"SC_", ",", RowBox[{"d_:", "2"}]}], "]"}], ":=", RowBox[{"Simplify", "[", RowBox[{"SC", ".", RowBox[{"\[ScriptCapitalQ]", "[", "d", "]"}], ".", RowBox[{"Transpose", "[", "SC", "]"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"SuperCluster", "[", RowBox[{ "vertices_", ",", "faces_", ",", "radii_", ",", "fls_", ",", "d_", ",", "h_", ",", "n_"}], "]"}], ":=", "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"sc", "=", RowBox[{"{", "}"}]}], ",", "i"}], "}"}], ",", "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"n", "-", "2"}]}], ",", RowBox[{"i", "++"}], ",", RowBox[{"AppendTo", "[", RowBox[{"sc", ",", RowBox[{"Flatten", "[", RowBox[{"InvCoords", "[", RowBox[{ RowBox[{"vertices", "[", "i", "]"}], ",", RowBox[{"radii", "[", "i", "]"}]}], "]"}], "]"}]}], "]"}]}], "]"}], ";", "\n", RowBox[{"AppendTo", "[", RowBox[{"sc", ",", RowBox[{"Flatten", "[", RowBox[{"InvCoords", "[", RowBox[{ RowBox[{"vertices", "[", RowBox[{"n", "-", "1"}], "]"}], ",", "\[Infinity]", ",", RowBox[{ RowBox[{"h", "/", "2"}], "+", RowBox[{ RowBox[{ RowBox[{"vertices", "[", RowBox[{"n", "-", "1"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], " ", RowBox[{"h", "/", "2"}]}]}]}], "]"}], "]"}]}], "]"}], ";", "\n", RowBox[{"AppendTo", "[", RowBox[{"sc", ",", RowBox[{"Flatten", "[", RowBox[{"InvCoords", "[", RowBox[{ RowBox[{"vertices", "[", "n", "]"}], ",", "\[Infinity]", ",", RowBox[{ RowBox[{"h", "/", "2"}], "+", RowBox[{ RowBox[{ RowBox[{"vertices", "[", "n", "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], " ", RowBox[{"h", "/", "2"}]}]}]}], "]"}], "]"}]}], "]"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", RowBox[{"Keys", "[", "faces", "]"}], "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"MemberQ", "[", RowBox[{"fls", ",", RowBox[{ RowBox[{"Keys", "[", "faces", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], ",", "\n", RowBox[{"AppendTo", "[", RowBox[{"sc", ",", RowBox[{"Flatten", "[", RowBox[{"InvCoords", "[", RowBox[{ RowBox[{"faces", "[", RowBox[{ RowBox[{"Keys", "[", "faces", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"radii", "[", RowBox[{ RowBox[{"Keys", "[", "faces", "]"}], "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]}], "]"}], "]"}]}], "]"}]}], "\n", "]"}]}], "]"}], ";", "\n", RowBox[{"AppendTo", "[", RowBox[{"sc", ",", RowBox[{"Flatten", "[", RowBox[{"InvCoords", "[", RowBox[{ RowBox[{"faces", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], ",", "\[Infinity]", ",", RowBox[{ RowBox[{"d", "/", "2"}], "+", RowBox[{ RowBox[{ RowBox[{"faces", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"d", "/", "2"}]}]}]}], "]"}], "]"}]}], "]"}], ";", "\n", RowBox[{"AppendTo", "[", RowBox[{"sc", ",", RowBox[{"Flatten", "[", RowBox[{"InvCoords", "[", RowBox[{ RowBox[{"faces", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], ",", "\[Infinity]", ",", RowBox[{ RowBox[{"d", "/", "2"}], "+", RowBox[{ RowBox[{ RowBox[{"faces", "[", RowBox[{ "fls", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"d", "/", "2"}]}]}]}], "]"}], "]"}]}], "]"}], ";", "\n", "sc"}]}], "\n", "]"}]}]}], "Input", CellChangeTimes->{{3.7389450090692987`*^9, 3.73894501048223*^9}, { 3.738945066229946*^9, 3.7389450662403517`*^9}, {3.738945103157426*^9, 3.738945103168038*^9}, {3.7389453083647842`*^9, 3.738945308368178*^9}}, ExpressionUUID -> "e6a95be0-b06d-4158-a3d5-eb54a946456b"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"SendToZero", "[", RowBox[{"x_", ",", RowBox[{"\[Epsilon]_:", "0"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", "x", "]"}], "<", "\[Epsilon]"}], ",", "0", ",", "x"}], "]"}]}], ";"}]], "Input", ExpressionUUID -> "ef0f6479-d6a1-48e3-bae6-5cfaa85ce6b8"], Cell[BoxData[ RowBox[{ RowBox[{"\[ScriptCapitalQ]", "[", RowBox[{"d_:", "2"}], "]"}], ":=", RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{ RowBox[{"Function", "[", RowBox[{"l", ",", RowBox[{"-", RowBox[{"Flatten", "[", RowBox[{"Prepend", "[", RowBox[{"l", ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "]"}], "]"}]}]}], "]"}], "/@", RowBox[{"IdentityMatrix", "[", "d", "]"}]}], ",", RowBox[{"Flatten", "[", RowBox[{"Prepend", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", "d"}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"1", "/", "2"}], ",", "0"}], "}"}]}], "]"}], "]"}]}], "]"}], ",", RowBox[{"Flatten", "[", RowBox[{"Prepend", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", "d"}], "]"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"1", "/", "2"}]}], "}"}]}], "]"}], "]"}]}], "]"}]}]], "Input",\ ExpressionUUID -> "31220469-1b4a-4db9-923f-cbb70eba2b16"], Cell[BoxData[ RowBox[{ RowBox[{"BMat", "[", "n_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"b", "[", RowBox[{"i", ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "n"}], "}"}]}], "]"}]}]], "Input", ExpressionUUID -> "22a26f72-2329-47a0-8d51-8bdb95360c9e"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Bend", "[", RowBox[{"V_", ",", "m_"}], "]"}], "[", "i_", "]"}], ":=", "\n", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "sol", ",", "assignments", ",", "rest", ",", "j", ",", "l", ",", "others1", ",", "others2"}], "}"}], ",", "\n", RowBox[{ RowBox[{"sol", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"BMat", "[", "m", "]"}], ".", RowBox[{"(", RowBox[{"V", "[", RowBox[{"[", RowBox[{";;", "m"}], "]"}], "]"}], ")"}]}], "==", RowBox[{ RowBox[{"(", RowBox[{"V", "[", RowBox[{"[", RowBox[{";;", "m"}], "]"}], "]"}], ")"}], ".", RowBox[{"R", "[", RowBox[{"V", "[", RowBox[{"[", RowBox[{"m", "+", "i"}], "]"}], "]"}], "]"}]}]}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", "\n", RowBox[{"assignments", "=", RowBox[{"Association", "[", "sol", "]"}]}], ";", "\n", RowBox[{"rest", "=", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"BMat", "[", "m", "]"}], "]"}], ",", RowBox[{"Keys", "[", "assignments", "]"}]}], "]"}]}], ";", "\n", RowBox[{"l", "=", RowBox[{"Length", "[", "rest", "]"}]}], ";", "\n", RowBox[{"others1", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{"rest", "==", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "l"}], "}"}]}], "]"}]}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", "\n", RowBox[{"others2", "=", RowBox[{"<|", "|>"}]}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "l"}], ",", RowBox[{"j", "++"}], ",", RowBox[{ RowBox[{"others2", "[", RowBox[{ "rest", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"Subscript", "[", RowBox[{"a", ",", " ", "j"}], "]"}]}]}], "]"}], ";", "\n", RowBox[{"others2", "=", RowBox[{"Normal", "[", "others2", "]"}]}], ";", "\n", RowBox[{"Column", "[", RowBox[{"{", "\n", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"BMat", "[", "m", "]"}], "/.", "assignments"}], ")"}], "/.", "others2"}], "]"}], ",", "\n", RowBox[{"MatrixForm", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"BMat", "[", "m", "]"}], "/.", "assignments"}], ")"}], "/.", "others1"}], "]"}]}], "\n", "}"}], "]"}]}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{{3.738945036755101*^9, 3.7389450662500553`*^9}, 3.738945308373815*^9}, ExpressionUUID -> "8b95a3eb-e1b6-4f98-b5ad-d1d702a74296"], Cell[BoxData[ RowBox[{ RowBox[{"DrawCircle", "[", RowBox[{"{", RowBox[{"bhat_", ",", "b_", ",", "bx_", ",", "by_"}], "}"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"b", "!=", "0"}], ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by"}], "}"}], "/", "b"}], ",", RowBox[{"1", "/", RowBox[{"Abs", "[", "b", "]"}]}]}], "]"}], ",", RowBox[{"InfiniteLine", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by"}], "}"}], RowBox[{"bhat", "/", "2"}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "by"}], ",", "bx"}], "}"}]}], "]"}]}], "]"}]}]], "Input",\ CellChangeTimes->{{3.738927111263668*^9, 3.738927112442643*^9}, 3.739635253879623*^9, 3.740413840524701*^9}, ExpressionUUID -> "164d64d1-91e8-4bc1-a31b-acfcab528e46"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"DrawCircleText", "[", RowBox[{ RowBox[{"fs_:", "500"}], ",", RowBox[{"fac_:", "1"}]}], "]"}], "[", RowBox[{"{", RowBox[{"bhat_", ",", "b_", ",", "bx_", ",", "by_"}], "}"}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"b", "!=", "0"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Text", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"Simplify", "[", RowBox[{"Abs", "[", RowBox[{"b", "/", "fac"}], "]"}], "]"}], ",", RowBox[{"FontSize", "\[Rule]", RowBox[{"N", "[", RowBox[{"Abs", "[", RowBox[{"fs", "/", "b"}], "]"}], "]"}]}]}], "]"}], ",", RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by"}], "}"}], "/", "b"}]}], "]"}], ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by"}], "}"}], "/", "b"}], ",", RowBox[{"1", "/", RowBox[{"Abs", "[", "b", "]"}]}]}], "]"}]}], "}"}], ",", RowBox[{"InfiniteLine", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by"}], "}"}], RowBox[{"bhat", "/", "2"}]}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "by"}], ",", "bx"}], "}"}]}], "]"}]}], "]"}]}]], "Input",\ CellChangeTimes->{{3.738927111263668*^9, 3.738927112442643*^9}, 3.739635253879623*^9, {3.740412187214809*^9, 3.740412206483429*^9}, { 3.740412246511894*^9, 3.740412297740261*^9}, {3.740412365614214*^9, 3.7404123725928583`*^9}, {3.7404127817317333`*^9, 3.740412806834482*^9}, { 3.740413186975189*^9, 3.7404132218172083`*^9}, {3.740413320705638*^9, 3.7404133230002337`*^9}, 3.740414287783532*^9}, ExpressionUUID -> "164d64d1-91e8-4bc1-a31b-acfcab528e46"], Cell[BoxData[ RowBox[{ RowBox[{"Strip", "[", RowBox[{"cl_", ",", "co_", ",", "steps_", ",", RowBox[{"sizemax_:", "\[Infinity]"}], ",", RowBox[{"pr_:", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "all", ",", "last", ",", "newlast", ",", "RZip", ",", "i", ",", "j", ",", "k", ",", "l", ",", RowBox[{"xmin", "=", "\[Infinity]"}], ",", RowBox[{"xmax", "=", RowBox[{"-", "\[Infinity]"}]}], ",", RowBox[{"ymin", "=", "\[Infinity]"}], ",", RowBox[{"ymax", "=", RowBox[{"-", "\[Infinity]"}]}], ",", "PLOTRANGE", ",", RowBox[{"SC", "=", RowBox[{"Union", "[", RowBox[{"cl", ",", "co"}], "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"pr", "\[Equal]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "SC", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "!=", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], "<", "xmin"}], ",", RowBox[{"xmin", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], ">", "xmax"}], ",", RowBox[{"xmax", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], "<", "ymin"}], ",", RowBox[{"ymin", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], ">", "ymax"}], ",", RowBox[{"ymax", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"PLOTRANGE", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xmin", ",", "xmax"}], "}"}], ",", RowBox[{"{", RowBox[{"ymin", ",", "ymax"}], "}"}]}], "}"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"PLOTRANGE", "=", "pr"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"Thick", ",", RowBox[{"DrawCircle", "/@", RowBox[{"Orbit", "[", RowBox[{"co", ",", "cl", ",", "steps", ",", "sizemax"}], "]"}]}], ",", "Blue", ",", RowBox[{"DrawCircle", "/@", "cl"}], ",", "Red", ",", RowBox[{"DrawCircle", "/@", "co"}]}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "PLOTRANGE"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.738927208715934*^9, 3.738927415468289*^9}, { 3.738927634505172*^9, 3.7389276370581217`*^9}, {3.738927683051382*^9, 3.7389276885879307`*^9}, {3.738928100245269*^9, 3.738928132644609*^9}}, ExpressionUUID -> "700889cd-9578-41bb-a334-88ddacb32496"], Cell[BoxData[ RowBox[{ RowBox[{"Strip2", "[", RowBox[{"supercl_", ",", "clindices_", ",", RowBox[{"pr_:", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}]}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Strip", "[", RowBox[{ RowBox[{ "supercl", "\[LeftDoubleBracket]", "clindices", "\[RightDoubleBracket]"}], ",", RowBox[{"supercl", "\[LeftDoubleBracket]", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "@", RowBox[{"Length", "[", "supercl", "]"}]}], ",", "clindices"}], "]"}], "\[RightDoubleBracket]"}], ",", "steps", ",", "\[Infinity]", ",", "pr"}], "]"}], ",", RowBox[{"{", RowBox[{"steps", ",", "0", ",", "20", ",", "1"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.74136848699057*^9, 3.741368611563674*^9}}, ExpressionUUID -> "8ab52e52-3f84-4f8d-a365-4db3e31a2e5b"], Cell[BoxData[ RowBox[{ RowBox[{"Strip2nth", "[", RowBox[{"supercl_", ",", "clindices_", ",", "n_", ",", RowBox[{"pr_:", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}]}], "]"}], ":=", RowBox[{"Strip", "[", RowBox[{ RowBox[{ "supercl", "\[LeftDoubleBracket]", "clindices", "\[RightDoubleBracket]"}], ",", RowBox[{"supercl", "\[LeftDoubleBracket]", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "@", RowBox[{"Length", "[", "supercl", "]"}]}], ",", "clindices"}], "]"}], "\[RightDoubleBracket]"}], ",", "n", ",", "\[Infinity]", ",", "pr"}], "]"}]}]], "Input", CellChangeTimes->{{3.741368785086166*^9, 3.7413688007660637`*^9}}, ExpressionUUID -> "46333380-0488-4fad-a8b8-88fffa1829b2"], Cell[BoxData[ RowBox[{ RowBox[{"StripText", "[", RowBox[{"cl_", ",", "co_", ",", "steps_", ",", RowBox[{"sizemax_:", "\[Infinity]"}], ",", RowBox[{"fs_:", "500"}], ",", RowBox[{"fac_:", "1"}], ",", RowBox[{"pr_:", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "all", ",", "last", ",", "newlast", ",", "RZip", ",", "i", ",", "j", ",", "k", ",", "l", ",", RowBox[{"xmin", "=", "\[Infinity]"}], ",", RowBox[{"xmax", "=", RowBox[{"-", "\[Infinity]"}]}], ",", RowBox[{"ymin", "=", "\[Infinity]"}], ",", RowBox[{"ymax", "=", RowBox[{"-", "\[Infinity]"}]}], ",", "PLOTRANGE", ",", RowBox[{"SC", "=", RowBox[{"Union", "[", RowBox[{"cl", ",", "co"}], "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"pr", "\[Equal]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "SC", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "!=", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], "<", "xmin"}], ",", RowBox[{"xmin", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], ">", "xmax"}], ",", RowBox[{"xmax", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], "<", "ymin"}], ",", RowBox[{"ymin", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "-", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}], ">", "ymax"}], ",", RowBox[{"ymax", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "+", "1"}], ")"}], "/", RowBox[{"Abs", "[", RowBox[{"SC", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "]"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"PLOTRANGE", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xmin", ",", "xmax"}], "}"}], ",", RowBox[{"{", RowBox[{"ymin", ",", "ymax"}], "}"}]}], "}"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"PLOTRANGE", "=", "pr"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"Thick", ",", RowBox[{ RowBox[{"DrawCircleText", "[", RowBox[{"fs", ",", "fac"}], "]"}], "/@", RowBox[{"Orbit", "[", RowBox[{"co", ",", "cl", ",", "steps", ",", "sizemax"}], "]"}]}], ",", "Blue", ",", RowBox[{ RowBox[{"DrawCircleText", "[", RowBox[{"fs", ",", "fac"}], "]"}], "/@", "cl"}], ",", "Red", ",", RowBox[{"DrawCircle", "/@", "co"}]}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "PLOTRANGE"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.738927208715934*^9, 3.738927415468289*^9}, { 3.738927634505172*^9, 3.7389276370581217`*^9}, {3.738927683051382*^9, 3.7389276885879307`*^9}, {3.738928100245269*^9, 3.738928132644609*^9}, { 3.740412326038574*^9, 3.740412347939546*^9}, {3.740412394874261*^9, 3.740412398759706*^9}, {3.740412546418632*^9, 3.7404125480691137`*^9}, { 3.740412583876215*^9, 3.74041258647404*^9}, {3.7404128850553713`*^9, 3.740412908290814*^9}, {3.740412952535191*^9, 3.7404129553506613`*^9}, { 3.7404130026291447`*^9, 3.740413008717119*^9}, {3.740413118851839*^9, 3.7404131715298*^9}, {3.740413207185609*^9, 3.740413207433935*^9}, { 3.7404133315424747`*^9, 3.740413332150635*^9}}, ExpressionUUID -> "700889cd-9578-41bb-a334-88ddacb32496"], Cell[BoxData[ RowBox[{ RowBox[{"Isolated", "[", "Gram_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"iso", "=", RowBox[{"{", "}"}]}], ",", "i", ",", "j", ",", "b"}], "}"}], ",", "\n", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "Gram", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\n", RowBox[{ RowBox[{"b", "=", "True"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "Gram", "]"}]}], ",", RowBox[{"j", "++"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"i", "!=", "j"}], "&&", RowBox[{"0", "<", RowBox[{"Gram", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "<", "1"}]}], ",", RowBox[{"b", "=", "False"}]}], "]"}]}], "]"}], ";", "\n", RowBox[{"If", "[", RowBox[{"b", ",", RowBox[{"AppendTo", "[", RowBox[{"iso", ",", "i"}], "]"}]}], "]"}]}]}], "\n", "]"}], ";", "\n", "iso"}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{{3.738945308379125*^9, 3.738945308382166*^9}}, ExpressionUUID -> "286a1f83-8344-4bf9-a541-ff9a34f5c1f7"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"NoPoint", "[", RowBox[{"iso_", ",", "Gram_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "j", ",", "k", ",", "np"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"np", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "iso", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", " ", RowBox[{ RowBox[{"Length", "[", "iso", "]"}], "-", "i"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Gram", "[", RowBox[{"[", RowBox[{ RowBox[{ "iso", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{"iso", "[", RowBox[{"[", RowBox[{"i", "+", "j"}], "]"}], "]"}]}], "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"np", ",", RowBox[{"{", RowBox[{ RowBox[{ "iso", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{"iso", "[", RowBox[{"[", RowBox[{"i", "+", "j"}], "]"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "]"}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", "np"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.738945011631154*^9, 3.738945012708259*^9}}, ExpressionUUID -> "fc71a47c-10b5-402e-987f-0fedd0529138"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"IsoClusters", "[", RowBox[{"iso_", ",", "np_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "isocl", ",", "combos", ",", "i", ",", "j", ",", "L", ",", "sofarsogood"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"combos", "=", RowBox[{"Subsets", "[", RowBox[{"iso", ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"Length", "[", "iso", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"np", "\[Equal]", RowBox[{"{", "}"}]}], ",", RowBox[{"isocl", "=", "combos"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"isocl", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"L", "=", RowBox[{"Length", "[", "combos", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "L"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"sofarsogood", "=", "true"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "np", "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"SubsetQ", "[", RowBox[{ RowBox[{ "combos", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", RowBox[{ "np", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"sofarsogood", "=", "false"}], ";"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"sofarsogood", "==", "true"}], ",", RowBox[{"AppendTo", "[", RowBox[{"isocl", ",", RowBox[{ "combos", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "]"}], ";", "\[IndentingNewLine]", "isocl"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.738944909261614*^9, {3.738945013793562*^9, 3.738945023166484*^9}}, ExpressionUUID -> "4dd83f3b-827c-4dd9-b04f-f28a97b59439"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"SendToInt", "[", RowBox[{"\[Epsilon]_:", "0"}], "]"}], "[", "y_", "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"x", "=", RowBox[{"Simplify", "[", "y", "]"}]}], "}"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"x", "-", RowBox[{"Floor", "[", "x", "]"}]}], "]"}], "\[LessEqual]", "\[Epsilon]"}], " ", ",", RowBox[{"Floor", "[", "x", "]"}], ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"x", "-", RowBox[{"Ceiling", "[", "x", "]"}]}], "]"}], "\[LessEqual]", "\[Epsilon]"}], " ", ",", RowBox[{"Ceiling", "[", "x", "]"}], ",", "x"}], "]"}], ",", "x"}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.738945308389244*^9, 3.738945308392405*^9}}, ExpressionUUID -> "e71c3f60-3309-45a3-bb7b-fae8375263d1"], Cell[BoxData[ RowBox[{ RowBox[{"Orbit", "[", RowBox[{"co_", ",", "cl_", ",", "steps_", ",", RowBox[{"sizemax_:", "\[Infinity]"}], ",", RowBox[{"d_:", "2"}], ",", RowBox[{"\[Epsilon]_:", "0"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "j", ",", "k", ",", RowBox[{"orbit", "=", "cl"}], ",", "L"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "steps"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"L", "=", RowBox[{"Length", "[", "orbit", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", RowBox[{"Length", "[", "co", "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", RowBox[{"k", "\[LessEqual]", "L"}], ",", RowBox[{"k", "++"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ "orbit", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ".", RowBox[{"R", "[", RowBox[{ RowBox[{ "co", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], ",", "d"}], "]"}]}], ")"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "]"}], "\[LessEqual]", "sizemax"}], "&&", RowBox[{"!", RowBox[{"MemberQ", "[", RowBox[{"orbit", ",", RowBox[{"(*", " ", RowBox[{"SendToInt", "[", "\[Epsilon]", "]"}], " ", "*)"}], RowBox[{"Simplify", "/@", RowBox[{"(", RowBox[{ RowBox[{ "orbit", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ".", RowBox[{"R", "[", RowBox[{ RowBox[{ "co", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], ",", "d"}], "]"}]}], ")"}]}]}], "]"}]}]}], ",", RowBox[{"AppendTo", "[", RowBox[{"orbit", ",", RowBox[{"(*", " ", RowBox[{"SendToInt", "[", "\[Epsilon]", "]"}], " ", "*)"}], RowBox[{"Simplify", "/@", RowBox[{"(", RowBox[{ RowBox[{ "orbit", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ".", RowBox[{"R", "[", RowBox[{ RowBox[{ "co", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], ",", "d"}], "]"}]}], ")"}]}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "orbit"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.738944824107163*^9, 3.738944854152451*^9}, { 3.738945024436571*^9, 3.738945026444809*^9}, 3.738945103175056*^9, { 3.7389451491296864`*^9, 3.7389451491366673`*^9}, {3.738945281674213*^9, 3.738945308104998*^9}, {3.7389453729154882`*^9, 3.738945377899135*^9}}, ExpressionUUID -> "57fd6320-a3d2-4e91-a399-91b40109fd06"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Bend3", "[", RowBox[{"V_", ",", RowBox[{"sizemax_:", "\[Infinity]"}], ",", RowBox[{"d_:", "2"}], ",", RowBox[{"RING_:", "Integers"}]}], "]"}], "[", "iso_", "]"}], "[", "i_", "]"}], ":=", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"V", " ", "is", " ", "a", " ", "supercluster", " ", RowBox[{"matrix", ".", " ", "iso"}], " ", "is", " ", "the", " ", "indices", " ", "of", " ", "the", " ", RowBox[{"cluster", ".", " ", "1"}]}], "\[LessEqual]", "i", "\[LessEqual]"}], "|", "cocluster", "|"}], " ", "*)"}], RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "sol", ",", "assignments", ",", "rest", ",", "j", ",", "l", ",", "others1", ",", "others2", ",", RowBox[{"M", "=", RowBox[{"Length", "[", RowBox[{"V", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}]}], ",", "co", ",", "cl", ",", RowBox[{"orbit", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"steps", "=", "0"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"cl", "=", RowBox[{"V", "[", RowBox[{"[", "iso", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"co", "=", RowBox[{"V", "[", RowBox[{"[", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "@", RowBox[{"Length", "[", "V", "]"}]}], ",", "iso"}], "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "orbit", "]"}], "<", "M"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"steps", "++"}], ";", "\[IndentingNewLine]", RowBox[{"orbit", "=", RowBox[{"Orbit", "[", RowBox[{"co", ",", "cl", ",", "steps", ",", "sizemax", ",", "d"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"cl", "=", RowBox[{"orbit", "[", RowBox[{"[", RowBox[{";;", "M"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sol", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"BMat", "[", "M", "]"}], ".", "cl"}], "==", RowBox[{"cl", ".", RowBox[{"R", "[", RowBox[{ RowBox[{ "co", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], ",", "d"}], "]"}]}]}], ",", "RING"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"sol", "==", RowBox[{"{", "}"}]}], ",", "Null", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"sol", "=", RowBox[{ "sol", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", "\[IndentingNewLine]", RowBox[{"assignments", "=", RowBox[{"Association", "[", "sol", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rest", "=", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"BMat", "[", "M", "]"}], "]"}], ",", RowBox[{"Keys", "[", "assignments", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"l", "=", RowBox[{"Length", "[", "rest", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"l", "==", "0"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"BMat", "[", "M", "]"}], "/.", "assignments"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"others1", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{"rest", "==", RowBox[{"Table", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{"j", ",", "1", ",", "l"}], "}"}]}], "]"}]}], "]"}], "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", "\[IndentingNewLine]", RowBox[{"others2", "=", RowBox[{"<|", "|>"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "l"}], ",", RowBox[{"j", "++"}], ",", RowBox[{ RowBox[{"others2", "[", RowBox[{ "rest", "\[LeftDoubleBracket]", "j", "\[RightDoubleBracket]"}], "]"}], "=", RowBox[{"Subscript", "[", RowBox[{"a", ",", " ", "j"}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"others2", "=", RowBox[{"Normal", "[", "others2", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{" ", RowBox[{"Column", "[", RowBox[{"{", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"BMat", "[", "M", "]"}], "/.", "assignments"}], ")"}], "/.", "others2"}], "]"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"BMat", "[", "M", "]"}], "/.", "assignments"}], ")"}], "/.", "others1"}], "]"}], "]"}]}], "}"}], "]"}], "]"}], "*)"}], " ", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Det", "[", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"BMat", "[", "M", "]"}], "/.", RowBox[{"(", RowBox[{"assignments", "/.", "others1"}], ")"}]}], ")"}], "/.", "others1"}], "]"}], "]"}], "[", RowBox[{"[", "0", "]"}], "]"}], "==", "Symbol"}], ",", "Null", ",", "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"BMat", "[", "M", "]"}], "/.", RowBox[{"(", RowBox[{"assignments", "/.", "others1"}], ")"}]}], ")"}], "/.", "others1"}], "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.738932357256714*^9, 3.7389324230652847`*^9}, { 3.7389325010083523`*^9, 3.738932503374395*^9}, {3.73893313162103*^9, 3.738933158733818*^9}, 3.738944917168851*^9, 3.738945027388645*^9, { 3.738945066257535*^9, 3.73894506626511*^9}, 3.738945308110326*^9, { 3.739015942488061*^9, 3.739015948999207*^9}, {3.739016430855538*^9, 3.739016432990468*^9}}, ExpressionUUID -> "6c795944-012e-4b6b-9090-476dd8bc61c5"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Bend4", "[", RowBox[{"V_", ",", RowBox[{"d_:", "2"}], ",", RowBox[{"sizemax_:", "\[Infinity]"}]}], "]"}], "[", "iso_", "]"}], "[", "i_", "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"B", "=", RowBox[{ RowBox[{ RowBox[{"Bend3", "[", RowBox[{"V", ",", "sizemax", ",", "d", ",", "Integers"}], "]"}], "[", "iso", "]"}], "[", "i", "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "B", "]"}], ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Bend3", "[", RowBox[{"V", ",", "sizemax", ",", "d", ",", "Reals"}], "]"}], "[", "iso", "]"}], "[", "i", "]"}], ",", "\"\\""}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"B", ",", "\"\\""}], "}"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.7390159612546797`*^9, 3.739016048486837*^9}, { 3.73901657773106*^9, 3.739016580738469*^9}, {3.739017209956848*^9, 3.7390172242261257`*^9}}, ExpressionUUID -> "10cfd927-4a90-412b-a722-666f288db660"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"ConvertOtherQF", "[", "qn_", "]"}], "[", "x_", "]"}], ":=", RowBox[{"(*", RowBox[{ RowBox[{"assumes", " ", "xQx"}], ">", "0"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "n", ",", "Q", ",", "bhat", ",", "b", ",", "bz", ",", "ip", ",", RowBox[{"y", "=", "x"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"n", "=", RowBox[{ RowBox[{"Length", "[", "y", "]"}], "-", "2"}]}], ";", "\[IndentingNewLine]", RowBox[{"Q", "=", RowBox[{"Prepend", "[", RowBox[{ RowBox[{ RowBox[{"Function", "[", RowBox[{"l", ",", RowBox[{"Prepend", "[", RowBox[{"l", ",", "0"}], "]"}]}], "]"}], "/@", RowBox[{"IdentityMatrix", "[", RowBox[{"n", "+", "1"}], "]"}]}], ",", RowBox[{"Prepend", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"n", "+", "1"}]}], "]"}], ",", RowBox[{"-", "qn"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ip", "=", RowBox[{"y", ".", "Q", ".", "y"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"ip", ">", "0"}], ",", RowBox[{"y", "/=", RowBox[{"Sqrt", "[", "ip", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{"Flatten", "[", RowBox[{"Prepend", "[", RowBox[{ RowBox[{"y", "[", RowBox[{"[", RowBox[{"3", ";;"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{ "y", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], SqrtBox["qn"]}], "+", RowBox[{ "y", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ",", RowBox[{ RowBox[{ RowBox[{ "y", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], SqrtBox["qn"]}], "-", RowBox[{ "y", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}]}], "}"}]}], "]"}], "]"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.738945066270138*^9, 3.738945066273245*^9}, { 3.73894510318174*^9, 3.738945103185031*^9}, {3.7390356820669193`*^9, 3.739035729616485*^9}, {3.739037302064575*^9, 3.739037304471714*^9}, { 3.739144573494224*^9, 3.739144576541053*^9}}, ExpressionUUID -> "c8466294-94bc-48dc-b23d-0079abde2c32"], Cell[BoxData[{ RowBox[{ RowBox[{"SuppCoords1", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"2", ",", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "2"], RowBox[{"v", "[", "i", "]"}]}], ",", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "3"], RowBox[{"v", "[", "i", "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"10", ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "10"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "11"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"14", ",", RowBox[{ RowBox[{"3", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"v", "[", "1", "]"}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "14"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"3", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"v", "[", "1", "]"}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "15"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"16", ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "7"], RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "16"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"3", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "17"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"17", ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "7"], RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "17"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "7"], RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "17"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"Coords1", "[", "n_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"b", "=", "True"}], ",", RowBox[{"assignments", "=", RowBox[{"{", "}"}]}], ",", "vs"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"vs", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{"v", "[", RowBox[{"i", "+", "1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"n", "-", "1"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"-", RowBox[{"v", "[", "n", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", RowBox[{"AppendTo", "[", RowBox[{"assignments", ",", RowBox[{"(", RowBox[{ RowBox[{"v", "[", "i", "]"}], "->", RowBox[{ RowBox[{"IdentityMatrix", "[", RowBox[{"n", "+", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}]}], ")"}]}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{"b", ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"i", ">", "5"}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], " ", RowBox[{"b", "=", "False"}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], " ", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "<", RowBox[{"SuppCoords1", "[", RowBox[{"[", RowBox[{"i", ",", "1"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], " ", RowBox[{"b", "=", "False"}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], " ", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "==", RowBox[{"SuppCoords1", "[", RowBox[{"[", RowBox[{"i", ",", "1"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], " ", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords1", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}]}], "]"}], ";", RowBox[{"b", "=", "False"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], " ", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords1", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}]}], "]"}], ";", RowBox[{"i", "++"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"vs", "/.", "assignments"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "Input", CellChangeTimes->{ 3.7389453081163588`*^9, {3.739035625265772*^9, 3.73903563847363*^9}, { 3.7390358105327187`*^9, 3.739035820547597*^9}, {3.739103259931437*^9, 3.739103285080719*^9}}, ExpressionUUID -> "59ae80d6-2ce7-474b-84a6-98ac8f768908"], Cell[BoxData[{ RowBox[{ RowBox[{"SuppCoords2", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"3", ",", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "3"], RowBox[{"v", "[", "i", "]"}]}], ",", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "4"], RowBox[{"v", "[", "i", "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"9", ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "9"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "10"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"11", ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"2", RowBox[{"v", "[", "1", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "11"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"2", RowBox[{"v", "[", "1", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "12"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"13", ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"v", "[", "1", "]"}], "+", RowBox[{"v", "[", "2", "]"}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"v", "[", "1", "]"}], "+", RowBox[{"v", "[", "2", "]"}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "14"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"13", ",", RowBox[{ RowBox[{"3", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"2", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}], ",", RowBox[{ RowBox[{"3", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"2", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}]}], "}"}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"Coords2", "[", "n_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"b", "=", "True"}], ",", RowBox[{"assignments", "=", RowBox[{"{", "}"}]}], ",", "vs"}], "}"}], ",", "\n", RowBox[{ RowBox[{"vs", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{"v", "[", RowBox[{"i", "+", "1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"n", "-", "1"}]}], "}"}]}], "]"}]}], ";", "\n", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"-", RowBox[{"v", "[", "n", "]"}]}]}], "]"}], ";", "\n", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"2", RowBox[{"v", "[", "1", "]"}]}]}]}], "]"}], ";", "\n", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", RowBox[{"AppendTo", "[", RowBox[{"assignments", ",", RowBox[{"(", RowBox[{ RowBox[{"v", "[", "i", "]"}], "->", RowBox[{ RowBox[{"IdentityMatrix", "[", RowBox[{"n", "+", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"i", "+", "1"}], "]"}], "]"}]}], ")"}]}], "]"}]}], "]"}], ";", "\n", "\n", RowBox[{"i", "=", "1"}], ";", "\n", RowBox[{"While", "[", RowBox[{"b", ",", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"i", ">", "5"}], ",", "\n", RowBox[{"(*", "then", "*)"}], " ", RowBox[{"b", "=", "False"}], ",", "\n", RowBox[{"(*", "else", "*)"}], " ", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "<", RowBox[{"SuppCoords2", "[", RowBox[{"[", RowBox[{"i", ",", "1"}], "]"}], "]"}]}], ",", "\n", RowBox[{"(*", "then", "*)"}], " ", RowBox[{"b", "=", "False"}], ",", "\n", RowBox[{"(*", "else", "*)"}], " ", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "==", RowBox[{"SuppCoords2", "[", RowBox[{"[", RowBox[{"i", ",", "1"}], "]"}], "]"}]}], ",", "\n", RowBox[{"(*", "then", "*)"}], " ", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords2", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}]}], "]"}], ";", RowBox[{"b", "=", "False"}]}], ",", "\n", RowBox[{"(*", "else", "*)"}], " ", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords2", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}]}], "]"}], ";", RowBox[{"i", "++"}]}]}], "\n", "]"}]}], "\n", "]"}]}], "\n", "]"}]}], "\n", "]"}], ";", "\n", RowBox[{"If", "[", RowBox[{ RowBox[{"n", ">=", "13"}], ",", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords2", "[", RowBox[{"[", RowBox[{"5", ",", "2"}], "]"}], "]"}]}], "]"}]}], "]"}], ";", "\n", RowBox[{"vs", "/.", "assignments"}]}]}], "\n", "]"}]}]}], "Input", CellChangeTimes->{{3.7386891580211143`*^9, 3.738689158718886*^9}, 3.738945308130007*^9, {3.73903559882876*^9, 3.7390356205479937`*^9}, { 3.739035825183943*^9, 3.739035838109839*^9}}, ExpressionUUID -> "5670d8f9-fec4-455c-8737-b56095643da1"], Cell[BoxData[{ RowBox[{ RowBox[{"SuppCoords3", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"4", ",", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "4"], RowBox[{"v", "[", "i", "]"}]}], ",", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "5"], RowBox[{"v", "[", "i", "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"9", ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "9"], RowBox[{"v", "[", "i", "]"}]}]}]}], ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "9"], RowBox[{"v", "[", "i", "]"}]}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"10", ",", RowBox[{ RowBox[{"2", RowBox[{"(", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"v", "[", "1", "]"}]}], ")"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "2"}], "10"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"2", RowBox[{"(", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"v", "[", "1", "]"}]}], ")"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "2"}], "11"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"12", ",", RowBox[{ RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "2"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "3"}], "12"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "0"}], "2"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "3"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"12", ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "8"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "9"}], "12"], RowBox[{"v", "[", "i", "]"}]}]}], ",", RowBox[{ RowBox[{"5", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "8"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "9"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"13", ",", RowBox[{ RowBox[{"2", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}], ",", "Null"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"13", ",", RowBox[{ RowBox[{"8", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"6", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "3"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "4"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}], ",", RowBox[{ RowBox[{"8", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"6", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "3"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "4"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"13", ",", RowBox[{ RowBox[{"10", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"6", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "7"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "8"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}], ",", RowBox[{ RowBox[{"10", RowBox[{"v", "[", "0", "]"}]}], "+", RowBox[{"6", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "1"}], "7"], RowBox[{"v", "[", "i", "]"}]}]}], "+", RowBox[{"3", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"i", "=", "8"}], "13"], RowBox[{"v", "[", "i", "]"}]}]}]}]}], "}"}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Coords3", "[", "n_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"b", "=", "True"}], ",", RowBox[{"assignments", "=", RowBox[{"{", RowBox[{"Null", "\[Rule]", "Nothing"}], "}"}]}], ",", "vs"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"vs", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{"v", "[", RowBox[{"i", "+", "1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"n", "-", "1"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"-", RowBox[{"v", "[", "n", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"3", RowBox[{"v", "[", "1", "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"assignments", ",", RowBox[{"(", RowBox[{ RowBox[{"v", "[", "i", "]"}], "\[Rule]", RowBox[{ RowBox[{"IdentityMatrix", "[", RowBox[{"n", "+", "1"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"i", "+", "1"}], "\[RightDoubleBracket]"}]}], ")"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{"b", ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"i", ">", RowBox[{"Length", "[", "SuppCoords3", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], RowBox[{"b", "=", "False"}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], RowBox[{"If", "[", RowBox[{ RowBox[{"n", "<", RowBox[{"SuppCoords3", "\[LeftDoubleBracket]", RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}]}], ",", "\[IndentingNewLine]", RowBox[{"b", "=", "False"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "\[Equal]", RowBox[{"SuppCoords3", "\[LeftDoubleBracket]", RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords3", "\[LeftDoubleBracket]", RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}]}], "]"}], ";", RowBox[{"i", "++"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords3", "\[LeftDoubleBracket]", RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}]}], "]"}], ";", RowBox[{"i", "++"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"vs", "/.", "assignments"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "Input", CellChangeTimes->{{3.739031406829973*^9, 3.739031774918194*^9}, { 3.739033766093026*^9, 3.739033768086767*^9}, {3.7390339397692003`*^9, 3.739033941398597*^9}, 3.739035245890562*^9, {3.739035375900323*^9, 3.7390353792240753`*^9}, {3.739103147280191*^9, 3.7391031476267767`*^9}, 3.740142518574876*^9}, ExpressionUUID -> "67804960-79cf-4194-ab17-cbc9e1285087"], Cell[BoxData[{ RowBox[{ RowBox[{"SuppCoords7", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"2", ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"2", RowBox[{"v", "[", "1", "]"}]}], "+", RowBox[{"2", RowBox[{"v", "[", "2", "]"}]}]}], ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"2", RowBox[{"v", "[", "1", "]"}]}], "+", RowBox[{"2", RowBox[{"v", "[", "2", "]"}]}], "+", RowBox[{"v", "[", "3", "]"}]}]}], "}"}], "\[IndentingNewLine]", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Coords7", "[", "n_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"b", "=", "True"}], ",", RowBox[{"assignments", "=", RowBox[{"{", RowBox[{"Null", "\[Rule]", "Nothing"}], "}"}]}], ",", "vs"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"vs", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"v", "[", "i", "]"}]}], "+", RowBox[{"v", "[", RowBox[{"i", "+", "1"}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"n", "-", "1"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"-", RowBox[{"v", "[", "n", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{ RowBox[{"v", "[", "0", "]"}], "+", RowBox[{"3", RowBox[{"v", "[", "1", "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"assignments", ",", RowBox[{"(", RowBox[{ RowBox[{"v", "[", "i", "]"}], "\[Rule]", RowBox[{ RowBox[{"IdentityMatrix", "[", RowBox[{"n", "+", "1"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"i", "+", "1"}], "\[RightDoubleBracket]"}]}], ")"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"i", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{"b", ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"i", ">", RowBox[{"Length", "[", "SuppCoords7", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], RowBox[{"b", "=", "False"}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], RowBox[{"If", "[", RowBox[{ RowBox[{"n", "<", RowBox[{"SuppCoords7", "\[LeftDoubleBracket]", RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}]}], ",", "\[IndentingNewLine]", RowBox[{"b", "=", "False"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"n", "\[Equal]", RowBox[{"SuppCoords7", "\[LeftDoubleBracket]", RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "then", "*)"}], RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords7", "\[LeftDoubleBracket]", RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}]}], "]"}], ";", RowBox[{"i", "++"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", "else", "*)"}], RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"vs", ",", RowBox[{"SuppCoords7", "\[LeftDoubleBracket]", RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}]}], "]"}], ";", RowBox[{"i", "++"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"vs", "/.", "assignments"}]}]}], "\[IndentingNewLine]", "]"}]}]}], "Input", CellChangeTimes->{{3.740142533047473*^9, 3.740142642895567*^9}, { 3.740142682472848*^9, 3.740142696424613*^9}}, ExpressionUUID -> "5cb1227a-c718-400a-95b6-d38825406300"], Cell[BoxData[ RowBox[{ RowBox[{"DrawSphere", "[", RowBox[{"{", RowBox[{"bhat_", ",", "b_", ",", "bx_", ",", "by_", ",", "bz_"}], "}"}], "]"}], ":=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"op", "=", TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ {".9", RowBox[{"b", ">=", "0"}]}, {".2", RowBox[{"b", "<", "0"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "op", "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"b", "==", "0"}], ",", "\n", RowBox[{"Hyperplane", "[", RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by", ",", "bz"}], "}"}], ",", RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by", ",", "bz"}], "}"}], RowBox[{"bhat", "/", "2"}]}]}], "]"}], ",", "\n", "\n", RowBox[{"Sphere", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"bx", ",", "by", ",", "bz"}], "}"}], "/", "b"}], ",", RowBox[{"1", "/", RowBox[{"Abs", "[", "b", "]"}]}]}], "]"}]}], "]"}]}], "}"}]}], "]"}]}]], "Input", ExpressionUUID -> "1047565c-cafc-4ea7-bbdc-e1ee419b183a"], Cell[BoxData[ RowBox[{ RowBox[{"Zip", "[", "l__", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"L", "=", RowBox[{"List", "[", "l", "]"}]}], ",", "n", ",", "nth"}], "}"}], ",", RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", RowBox[{"L", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "]"}]}], ";", "\n", RowBox[{ RowBox[{ RowBox[{"nth", "[", "k_", "]"}], "[", "list_", "]"}], ":=", RowBox[{ "list", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}]}], ";", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"nth", "[", "k", "]"}], "/@", "L"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "n"}], "}"}]}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{3.738945066281893*^9, 3.738945149095705*^9}, ExpressionUUID -> "95b8e39b-0015-4c84-ab52-4b0d91f49be8"], Cell[BoxData[ RowBox[{ RowBox[{"PiFrac", "[", "x_", "]"}], ":=", RowBox[{"Round", "[", RowBox[{"\[Pi]", "/", RowBox[{"ArcCos", "[", "x", "]"}]}], "]"}]}]], "Input", ExpressionUUID -> "572b128d-8332-4f5e-9d7d-98b3559676d3"], Cell[BoxData[ RowBox[{ RowBox[{"Coxeter", "[", RowBox[{"coords_", ",", RowBox[{"d_:", "2"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"gram", ",", "i", ",", "j", ",", "n", ",", RowBox[{"edges", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"labels", "=", RowBox[{"{", "}"}]}], ",", RowBox[{"styles", "=", RowBox[{"{", "}"}]}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"gram", "=", RowBox[{"Gram", "[", RowBox[{"coords", ",", "d"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"n", "=", RowBox[{"Length", "[", "coords", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", "n"}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<", "i"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"gram", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"edges", ",", RowBox[{"{", RowBox[{"i", ",", "j"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"gram", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ">", "1"}], ",", RowBox[{"styles", "=", RowBox[{"{", RowBox[{"styles", ",", RowBox[{ RowBox[{"i", "<->", "j"}], "->", "Dashed"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"gram", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "<", "1"}], ",", RowBox[{"labels", "=", RowBox[{"{", RowBox[{"labels", ",", RowBox[{ RowBox[{"i", "<->", "j"}], "->", RowBox[{"Framed", "[", RowBox[{ RowBox[{ RowBox[{"PiFrac", "[", RowBox[{"gram", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "]"}], "-", "2"}], ",", RowBox[{"Background", "->", "White"}]}], "]"}]}]}], "}"}]}], ",", RowBox[{ RowBox[{"labels", "=", RowBox[{"{", RowBox[{"labels", ",", RowBox[{ RowBox[{"i", "<->", "j"}], "->", RowBox[{"Framed", "[", RowBox[{"\[Infinity]", ",", RowBox[{"Background", "->", "White"}]}], "]"}]}]}], "}"}]}], ";", RowBox[{"styles", "=", RowBox[{"{", RowBox[{"styles", ",", RowBox[{ RowBox[{"i", "<->", "j"}], "->", RowBox[{"Thickness", "[", "0.01", "]"}]}]}], "}"}]}]}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"labels", "=", RowBox[{"Flatten", "[", "labels", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"styles", "=", RowBox[{"Flatten", "[", "styles", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Graph", "[", RowBox[{"edges", ",", RowBox[{"EdgeLabels", "->", "labels"}], ",", RowBox[{"EdgeStyle", "->", "styles"}], RowBox[{"(*", RowBox[{",", RowBox[{"GraphLayout", "\[Rule]", "\"\\""}]}], "*)"}], ",", RowBox[{"VertexLabels", "->", RowBox[{"Table", "[", RowBox[{ RowBox[{"k", "->", "k"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "n"}], "}"}]}], "]"}]}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{ 3.7389453081391897`*^9, {3.7391031899140778`*^9, 3.739103218225246*^9}, { 3.7395398450212507`*^9, 3.7395398450805597`*^9}}, ExpressionUUID -> "bd3f994b-3c6c-4a8e-996e-63c72c081636"], Cell[BoxData[ RowBox[{ RowBox[{"McLeod", "=", RowBox[{"<|", RowBox[{ RowBox[{"1", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"2", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"3", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"5", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2", ",", "1", ",", "1"}], "}"}]}], "}"}]}], ",", RowBox[{"6", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2", ",", "0", ",", "1"}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"7", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "0", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1", ",", "0", ",", "1"}], "}"}]}], "}"}]}], ",", RowBox[{"10", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "2", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "6", ",", "3", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"30", ",", "30", ",", "10", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"40", ",", "40", ",", "20", ",", "11"}], "}"}]}], "}"}]}], ",", RowBox[{"11", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "0", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "1", ",", "0", ",", "1"}], "}"}]}], "}"}]}], ",", RowBox[{"13", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"13", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "2", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "3", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "4", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"52", ",", "39", ",", "13", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"52", ",", "52", ",", "13", ",", "14"}], "}"}]}], "}"}]}], ",", RowBox[{"14", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"14", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "2", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "7", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "4", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"28", ",", "14", ",", "7", ",", "5"}], "}"}]}], "}"}]}], ",", RowBox[{"15", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"15", ",", "0", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "1", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"15", ",", "15", ",", "4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"15", ",", "15", ",", RowBox[{"-", "4"}], ",", "8"}], "}"}]}], "}"}]}], ",", RowBox[{"17", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"17", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "2", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "4", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"68", ",", "34", ",", "17", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"19", ",", "8", ",", "0", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"17", ",", "9", ",", "1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"136", ",", "68", ",", "17", ",", "23"}], "}"}], ",", RowBox[{"{", RowBox[{"85", ",", "51", ",", "0", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{"204", ",", "102", ",", "0", ",", "35"}], "}"}]}], "}"}]}], ",", RowBox[{"19", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"19", ",", "0", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2", ",", "0", ",", "1"}], "}"}]}], "}"}]}], ",", RowBox[{"21", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"21", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "2", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "3", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "4", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"42", ",", "42", ",", "21", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"14", ",", "14", ",", "3", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"63", ",", "63", ",", "21", ",", "13"}], "}"}]}], "}"}]}], ",", RowBox[{"30", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"30", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"14", ",", "2", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "3", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "5", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "4", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "6", ",", "3", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"50", ",", "10", ",", "5", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"33", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"33", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"16", ",", "2", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "6", ",", "3", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "4", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "3", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "11", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"99", ",", "33", ",", "0", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"121", ",", "22", ",", "0", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"90", ",", "18", ",", "3", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"37", ",", "8", ",", "0", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"264", ",", "66", ",", "0", ",", "23"}], "}"}]}], "}"}]}], ",", RowBox[{"39", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"39", ",", "0", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "1", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "3", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"12", ",", "3", ",", RowBox[{"-", "1"}], ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"26", ",", "13", ",", RowBox[{"-", "3"}], ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"39", ",", "13", ",", "3", ",", "7"}], "}"}]}], "}"}]}]}], "|>"}]}], ";"}]], "Input", CellChangeTimes->{{3.737908911804963*^9, 3.737908946480762*^9}, { 3.738688330860764*^9, 3.7386883315447407`*^9}, 3.738688792467897*^9, 3.7416358227380123`*^9}, ExpressionUUID -> "4624ab5a-7b6d-4426-ab54-8938e9dafcb9"], Cell[BoxData[ RowBox[{ RowBox[{"McLeodNorm", "[", RowBox[{"m_", ",", RowBox[{"{", RowBox[{"x_", ",", "y_", ",", "z_", ",", "w_"}], "}"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"m", ",", "4"}], "]"}], "\[Equal]", "3"}], ",", RowBox[{ RowBox[{ RowBox[{"-", "2"}], "x", " ", "y"}], "+", RowBox[{"2", SuperscriptBox["z", "2"]}], "+", RowBox[{"2", "z", " ", "w"}], "+", RowBox[{ FractionBox[ RowBox[{"m", "+", "1"}], "2"], SuperscriptBox["w", "2"]}]}], ",", RowBox[{ RowBox[{ RowBox[{"-", "2"}], "x", " ", "y"}], "+", RowBox[{"2", SuperscriptBox["z", "2"]}], "+", RowBox[{"2", "m", " ", SuperscriptBox["w", "2"]}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.737909508875483*^9, 3.7379095252876377`*^9}, { 3.737909562271921*^9, 3.7379096007057962`*^9}}, ExpressionUUID -> "cdfff233-8923-43d7-a1a9-c2a91bfed120"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"ConvertMcLeod", "[", "m_", "]"}], "[", "initial_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "coords", ",", "ip", ",", "i", ",", "j", ",", "newinitial", ",", "take"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "5", "th", " ", "entry", " ", "of", " ", "initial", " ", "is", " ", RowBox[{"(", RowBox[{"e", ",", "e"}], ")"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"newinitial", "=", "initial"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "1"}], ",", RowBox[{"i", "\[LessEqual]", RowBox[{"Length", "[", "newinitial", "]"}]}], ",", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ip", "=", RowBox[{"McLeodNorm", "[", RowBox[{"m", ",", RowBox[{ "newinitial", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"ip", "\[NotEqual]", "2"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Need", " ", "to", " ", "normalize"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "4"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "/", RowBox[{"Sqrt", "[", RowBox[{"ip", "/", "2"}], "]"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Mod", "[", RowBox[{"m", ",", "4"}], "]"}], "\[NotEqual]", "3"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "*", RowBox[{"Sqrt", "[", "m", "]"}]}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Else", ",", " ", RowBox[{ RowBox[{"m", "%4"}], "\[Equal]", "3"}], ",", " ", RowBox[{"use", " ", "different", " ", "F"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "+", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "/", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "=", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "*", RowBox[{ RowBox[{"Sqrt", "[", "m", "]"}], "/", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"(*", RowBox[{"If", " ", "line"}], "*)"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Sqrt", "[", RowBox[{ RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "^", "2"}], "+", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "^", "2"}]}], "]"}], "\[NotEqual]", "1"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"if", " ", RowBox[{"line", "'"}], "s", " ", "last", " ", "coords", " ", RowBox[{"aren", "'"}], "t", " ", "normal", " ", "vector"}], ",", " ", "normalize"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "\[LessEqual]", "4"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], "*=", RowBox[{"1", "/", RowBox[{"Sqrt", "[", RowBox[{ RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}], "^", "2"}], "+", RowBox[{ RowBox[{"newinitial", "[", RowBox[{"[", RowBox[{"i", ",", "4"}], "]"}], "]"}], "^", "2"}]}], "]"}]}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "]"}]}]}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", "newinitial"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.737884107963065*^9, 3.7378841624421473`*^9}, { 3.737884227608287*^9, 3.737884255390635*^9}, {3.737884513595093*^9, 3.737884519421832*^9}, {3.7378845754334507`*^9, 3.737884666088702*^9}, { 3.737884709199037*^9, 3.737884874578044*^9}, {3.7378875700647297`*^9, 3.73788762174755*^9}, {3.737887969060891*^9, 3.737888022352797*^9}, { 3.7378880670757627`*^9, 3.737888074955681*^9}, {3.737888107968384*^9, 3.737888223377398*^9}, {3.737888654469172*^9, 3.7378887980316887`*^9}, { 3.7378888443268137`*^9, 3.737889039210113*^9}, {3.7378893568440866`*^9, 3.7378893664554*^9}, {3.737899633405757*^9, 3.73789966037351*^9}, { 3.7378996991356487`*^9, 3.737899763137661*^9}, {3.7378998730121727`*^9, 3.7378999869402943`*^9}, {3.7379000251136503`*^9, 3.7379001375205393`*^9}, {3.737900606985574*^9, 3.737900614428499*^9}, { 3.7379006467036467`*^9, 3.737900699138361*^9}, {3.737900743215499*^9, 3.7379007857991257`*^9}, {3.737900946328367*^9, 3.737901085300741*^9}, { 3.737901137507663*^9, 3.737901145175242*^9}, {3.7379012045307827`*^9, 3.7379012900126343`*^9}, {3.737902478734562*^9, 3.7379026138496428`*^9}, { 3.737902721853744*^9, 3.737902784155766*^9}, {3.737902973437417*^9, 3.7379030025701523`*^9}, {3.7379030857047873`*^9, 3.737903131415476*^9}, { 3.737903195791822*^9, 3.737903274606719*^9}, {3.7379033132795*^9, 3.7379033237611427`*^9}, {3.737903434327743*^9, 3.737903436960621*^9}, { 3.7379035760771713`*^9, 3.737903597515243*^9}, {3.737909406779757*^9, 3.737909407321754*^9}, {3.737909610685651*^9, 3.737909626844907*^9}, { 3.737909755243299*^9, 3.737909755313937*^9}, {3.737909801868739*^9, 3.737909804804656*^9}, 3.738597530633484*^9, {3.7386883542716017`*^9, 3.738688354529188*^9}, 3.738944919707275*^9}, ExpressionUUID -> "ab5d5fd4-7961-4e87-a81f-64b14282a695"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ConvertedMcLeod", "=", RowBox[{"Association", "[", RowBox[{ RowBox[{"Function", "[", RowBox[{"m", ",", RowBox[{"m", "\[Rule]", RowBox[{ RowBox[{"ConvertMcLeod", "[", "m", "]"}], "[", RowBox[{"McLeod", "[", "m", "]"}], "]"}]}]}], "]"}], "/@", RowBox[{"Keys", "[", "McLeod", "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.738688381090027*^9, 3.738688417973281*^9}, { 3.738689586333805*^9, 3.7386895873592463`*^9}, {3.738689680154801*^9, 3.738689682984211*^9}, 3.738933271793239*^9}, ExpressionUUID -> "dc704154-23b6-4e86-98fc-d9b18be80d99"], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"1", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"2", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["2"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"3", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["3"], "2"]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", FractionBox["1", "2"], ",", RowBox[{"-", FractionBox[ SqrtBox["3"], "2"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}]}], ",", RowBox[{"5", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["5"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["2"], ",", SqrtBox["2"], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["5", "2"]]}], "}"}]}], "}"}]}], ",", RowBox[{"6", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["6"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["2"], ",", SqrtBox["2"], ",", "0", ",", SqrtBox["3"]}], "}"}]}], "}"}]}], ",", RowBox[{"7", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["7"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["7"], "2"]}], "}"}]}], "}"}]}], ",", RowBox[{"10", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["10"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", "0", ",", SqrtBox["5"]}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "6", ",", "3", ",", RowBox[{"2", " ", SqrtBox["10"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["10"]}], ",", RowBox[{"3", " ", SqrtBox["10"]}], ",", SqrtBox["10"], ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["10"]}], ",", RowBox[{"4", " ", SqrtBox["10"]}], ",", RowBox[{"2", " ", SqrtBox["10"]}], ",", "11"}], "}"}]}], "}"}]}], ",", RowBox[{"11", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["11"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "1", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["11"], "2"]}], "}"}]}], "}"}]}], ",", RowBox[{"13", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["13"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["13", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "3", ",", "0", ",", SqrtBox["13"]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "4", ",", "2", ",", SqrtBox["13"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["13"]}], ",", RowBox[{"3", " ", SqrtBox["13"]}], ",", SqrtBox["13"], ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["13"]}], ",", RowBox[{"4", " ", SqrtBox["13"]}], ",", SqrtBox["13"], ",", "14"}], "}"}]}], "}"}]}], ",", RowBox[{"14", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["14"], ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", "0", ",", SqrtBox["7"]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["7"], ",", SqrtBox["7"], ",", "0", ",", RowBox[{"2", " ", SqrtBox["2"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["2"]}], ",", RowBox[{"2", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", SqrtBox["7"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["7"]}], ",", RowBox[{"2", " ", SqrtBox["7"]}], ",", SqrtBox["7"], ",", RowBox[{"5", " ", SqrtBox["2"]}]}], "}"}]}], "}"}]}], ",", RowBox[{"15", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["15"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "1", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["15"], "2"]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["15"], ",", SqrtBox["15"], ",", FractionBox[ SqrtBox["15"], "2"], ",", FractionBox["7", "2"]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["15"], ",", SqrtBox["15"], ",", "0", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"17", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["17"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["17", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["2"]}], ",", RowBox[{"2", " ", SqrtBox["2"]}], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["17", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["34"]}], ",", SqrtBox["34"], ",", SqrtBox[ FractionBox["17", "2"]], ",", FractionBox["11", SqrtBox["2"]]}], "}"}], ",", RowBox[{"{", RowBox[{"19", ",", "8", ",", "0", ",", RowBox[{"3", " ", SqrtBox["17"]}]}], "}"}], ",", RowBox[{"{", RowBox[{"17", ",", "9", ",", "1", ",", RowBox[{"3", " ", SqrtBox["17"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["34"]}], ",", RowBox[{"2", " ", SqrtBox["34"]}], ",", SqrtBox[ FractionBox["17", "2"]], ",", FractionBox["23", SqrtBox["2"]]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"5", " ", SqrtBox["17"]}], ",", RowBox[{"3", " ", SqrtBox["17"]}], ",", "0", ",", "16"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"12", " ", SqrtBox["17"]}], ",", RowBox[{"6", " ", SqrtBox["17"]}], ",", "0", ",", "35"}], "}"}]}], "}"}]}], ",", RowBox[{"19", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["19"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["19"], "2"]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["19"], "2"]}], "}"}]}], "}"}]}], ",", RowBox[{"21", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["21"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"5", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["21", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["3"]}], ",", SqrtBox["3"], ",", "0", ",", SqrtBox["7"]}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "4", ",", "2", ",", SqrtBox["21"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["21"]}], ",", RowBox[{"2", " ", SqrtBox["21"]}], ",", SqrtBox["21"], ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"7", " ", SqrtBox["2"]}], ",", RowBox[{"7", " ", SqrtBox["2"]}], ",", FractionBox["3", SqrtBox["2"]], ",", RowBox[{"3", " ", SqrtBox[ FractionBox["21", "2"]]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["21"]}], ",", RowBox[{"3", " ", SqrtBox["21"]}], ",", SqrtBox["21"], ",", "13"}], "}"}]}], "}"}]}], ",", RowBox[{"30", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["30"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"7", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", "0", ",", SqrtBox["15"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["3"]}], ",", SqrtBox["3"], ",", "0", ",", SqrtBox["10"]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["5"], ",", SqrtBox["5"], ",", "0", ",", SqrtBox["6"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["2"]}], ",", RowBox[{"2", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", SqrtBox["15"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["3"]}], ",", RowBox[{"2", " ", SqrtBox["3"]}], ",", SqrtBox["3"], ",", SqrtBox["10"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"10", " ", SqrtBox["5"]}], ",", RowBox[{"2", " ", SqrtBox["5"]}], ",", SqrtBox["5"], ",", RowBox[{"4", " ", SqrtBox["6"]}]}], "}"}]}], "}"}]}], ",", RowBox[{"33", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["33"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"8", " ", SqrtBox["2"]}], ",", SqrtBox["2"], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["33", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["6"], ",", SqrtBox["6"], ",", SqrtBox[ FractionBox["3", "2"]], ",", SqrtBox[ FractionBox["11", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["2"]}], ",", RowBox[{"2", " ", SqrtBox["2"]}], ",", FractionBox["1", SqrtBox["2"]], ",", SqrtBox[ FractionBox["33", "2"]]}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "3", ",", "1", ",", SqrtBox["33"]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["11"], ",", SqrtBox["11"], ",", "0", ",", RowBox[{"2", " ", SqrtBox["3"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["33"]}], ",", SqrtBox["33"], ",", "0", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"11", " ", SqrtBox["11"]}], ",", RowBox[{"2", " ", SqrtBox["11"]}], ",", "0", ",", RowBox[{"9", " ", SqrtBox["3"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"15", " ", SqrtBox["6"]}], ",", RowBox[{"3", " ", SqrtBox["6"]}], ",", SqrtBox[ FractionBox["3", "2"]], ",", RowBox[{"7", " ", SqrtBox[ FractionBox["11", "2"]]}]}], "}"}], ",", RowBox[{"{", RowBox[{"37", ",", "8", ",", "0", ",", RowBox[{"3", " ", SqrtBox["33"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"8", " ", SqrtBox["33"]}], ",", RowBox[{"2", " ", SqrtBox["33"]}], ",", "0", ",", "23"}], "}"}]}], "}"}]}], ",", RowBox[{"39", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["39"], ",", "0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "1", ",", FractionBox["1", "2"], ",", FractionBox[ SqrtBox["39"], "2"]}], "}"}], ",", RowBox[{"{", RowBox[{ SqrtBox["3"], ",", SqrtBox["3"], ",", FractionBox[ SqrtBox["3"], "2"], ",", FractionBox[ SqrtBox["13"], "2"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"4", " ", SqrtBox["3"]}], ",", SqrtBox["3"], ",", "0", ",", SqrtBox["13"]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"2", " ", SqrtBox["13"]}], ",", SqrtBox["13"], ",", "0", ",", RowBox[{"3", " ", SqrtBox["3"]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"3", " ", SqrtBox["13"]}], ",", SqrtBox["13"], ",", FractionBox[ SqrtBox["13"], "2"], ",", FractionBox[ RowBox[{"7", " ", SqrtBox["3"]}], "2"]}], "}"}]}], "}"}]}]}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{ 3.738933272426002*^9},ExpressionUUID->"58703291-e9cc-482d-9d11-\ 25056468bf00"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"BianchiMValues", "=", RowBox[{"{", RowBox[{ "1", ",", "2", ",", "3", ",", "5", ",", "6", ",", "7", ",", "10", ",", "11", ",", "13", ",", "14", ",", "15", ",", "17", ",", "19", ",", "21", ",", "30", ",", "33", ",", "39"}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.7379958940935287`*^9, 3.737995916741323*^9}, { 3.7386884345316753`*^9, 3.738688442308363*^9}}, ExpressionUUID -> "c87af652-2402-4faf-b775-612e6e347d75"], Cell[BoxData[ RowBox[{ RowBox[{"IsolatedBianchiClusters", "=", RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"1", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "3", "}"}]}], "}"}]}], ",", RowBox[{"2", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "3", "}"}]}], "}"}]}], ",", RowBox[{"3", "\[Rule]", RowBox[{"{", "}"}]}], ",", RowBox[{"5", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"6", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"7", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"10", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "7", "}"}], ",", RowBox[{"{", "8", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "9"}], "}"}]}], "}"}]}], ",", RowBox[{"11", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"13", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", "10", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9", ",", "10"}], "}"}]}], "}"}]}], ",", RowBox[{"14", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "7", "}"}], ",", RowBox[{"{", "8", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "9"}], "}"}]}], "}"}]}], ",", RowBox[{"15", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "7", "}"}], ",", RowBox[{"{", "8", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "8"}], "}"}]}], "}"}]}], ",", RowBox[{"17", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "8", "}"}], ",", RowBox[{"{", "11", "}"}], ",", RowBox[{"{", "12", "}"}], ",", RowBox[{"{", "13", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "11", ",", "12", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "11", ",", "12", ",", "13"}], "}"}]}], "}"}]}], ",", RowBox[{"19", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"21", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", "11", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9", ",", "11"}], "}"}]}], "}"}]}], ",", RowBox[{"30", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "1", "}"}], ",", RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "8", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", "10", "}"}], ",", RowBox[{"{", "11", "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "8", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11"}], "}"}]}], "}"}]}], ",", RowBox[{"33", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "7", "}"}], ",", RowBox[{"{", "10", "}"}], ",", RowBox[{"{", "11", "}"}], ",", RowBox[{"{", "12", "}"}], ",", RowBox[{"{", "13", "}"}], ",", RowBox[{"{", "15", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11", ",", "12"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11", ",", "13"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "7", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "7", ",", "11", ",", "13", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11", ",", "12", ",", "15"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10", ",", "11", ",", "13", ",", "15"}], "}"}]}], "}"}]}], ",", RowBox[{"39", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", "3", "}"}], ",", RowBox[{"{", "4", "}"}], ",", RowBox[{"{", "9", "}"}], ",", RowBox[{"{", "10", "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "9", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "9", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "9", ",", "10"}], "}"}]}], "}"}]}]}], "\[RightAssociation]"}]}], ";"}]], "Input", CellChangeTimes->{{3.738688879832636*^9, 3.73868889163118*^9}}, ExpressionUUID -> "7ebcc208-cc8a-40c4-8fb5-59d73423e141"], Cell[BoxData[ RowBox[{ RowBox[{"Cocluster", "[", RowBox[{"m_", ",", "iso_"}], "]"}], ":=", RowBox[{ RowBox[{"ConvertedMcLeod", "[", "m", "]"}], "[", RowBox[{"[", RowBox[{"Complement", "[", RowBox[{ RowBox[{"Range", "@", RowBox[{"Length", "[", RowBox[{"ConvertedMcLeod", "[", "m", "]"}], "]"}]}], ",", "iso"}], "]"}], "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.738599674810548*^9, 3.7385996767193747`*^9}, { 3.738599751088996*^9, 3.738599755523015*^9}, {3.738599904950974*^9, 3.738599906217889*^9}, {3.7386001065558643`*^9, 3.738600108801654*^9}, { 3.738600139319681*^9, 3.738600224150317*^9}, {3.738602447753256*^9, 3.738602448037435*^9}, {3.738602559358691*^9, 3.738602560147636*^9}, { 3.738688914431796*^9, 3.738688927436455*^9}, {3.7386893830352573`*^9, 3.738689383173956*^9}, {3.7386895498815727`*^9, 3.738689551214883*^9}}, ExpressionUUID -> "1bba04b1-9ce8-4d0a-bd63-86490b047db0"], Cell[BoxData[ RowBox[{ RowBox[{"Cluster", "[", RowBox[{"m_", ",", "iso_"}], "]"}], ":=", RowBox[{ RowBox[{"ConvertedMcLeod", "[", "m", "]"}], "[", RowBox[{"[", "iso", "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.738600245414927*^9, 3.738600263508556*^9}, { 3.738600302904683*^9, 3.738600306859164*^9}, {3.7386889287401123`*^9, 3.738688932686692*^9}, 3.738689552676963*^9}, ExpressionUUID -> "a63f8d4b-70cf-468f-90db-0766c9ce4c61"], Cell[BoxData[ RowBox[{ RowBox[{"GetBianchiStrips", "[", RowBox[{"m_", ",", RowBox[{"steps_:", "10"}], ",", RowBox[{"sizemax_:", "100"}]}], "]"}], ":=", RowBox[{ RowBox[{"Function", "[", RowBox[{"iso", ",", RowBox[{"Strip", "[", RowBox[{ RowBox[{"Cluster", "[", RowBox[{"m", ",", "iso"}], "]"}], ",", RowBox[{"Cocluster", "[", RowBox[{"m", ",", "iso"}], "]"}], ",", "10", ",", "100"}], "]"}]}], "]"}], "/@", RowBox[{"IsolatedBianchiClusters", "[", "m", "]"}]}]}]], "Input", CellChangeTimes->{{3.738688999968528*^9, 3.7386890631097927`*^9}}, ExpressionUUID -> "98bf6ba8-8f2c-4976-85d8-e7b4065505a7"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"MatrixImage", "[", "m_", "]"}], ":=", RowBox[{"Rasterize", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"m", ",", RowBox[{"TableAlignments", "\[Rule]", RowBox[{"{", RowBox[{"Center", ",", "Center"}], "}"}]}]}], "]"}], "//", "TraditionalForm"}], ",", "30"}], "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.738947091703576*^9, 3.738947099397743*^9}}, ExpressionUUID -> "9b464c02-175c-4c28-a399-872c8610c302"], Cell[BoxData[ RowBox[{ RowBox[{"Double", "[", RowBox[{"coords_", ",", "n_", ",", RowBox[{"d_:", "2"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"G", "=", RowBox[{"Coxeter", "[", RowBox[{"coords", ",", "d"}], "]"}]}], ",", RowBox[{"C", "=", "coords"}], ",", RowBox[{"v", "=", RowBox[{ "coords", "\[LeftDoubleBracket]", "n", "\[RightDoubleBracket]"}]}], ",", "C1", ",", "C2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "n", " ", "is", " ", "the", " ", "index", " ", "of", " ", "the", " ", "face", " ", "about", " ", "which", " ", "the", " ", "reflection", " ", "occurs"}], ",", " ", RowBox[{"G", " ", "is", " ", "original", " ", "coxeter"}], ",", " ", RowBox[{ "v", " ", "is", " ", "the", " ", "coords", " ", "of", " ", "that", " ", "face"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"C", "=", RowBox[{"Delete", "[", RowBox[{"C", ",", "n"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"C1", "=", "C"}], ";", "\[IndentingNewLine]", RowBox[{"C2", "=", RowBox[{"Simplify", "[", RowBox[{"C", ".", RowBox[{"R", "[", RowBox[{"v", ",", "d"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"C", "=", RowBox[{"Union", "[", RowBox[{"C1", ",", "C2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Column", "[", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"d", "\[Equal]", "2"}], ",", RowBox[{"{", RowBox[{"coords", ",", "G", ",", RowBox[{"Graphics", "[", RowBox[{"DrawCircle", "/@", "coords"}], "]"}], ",", "C1", ",", "C2", ",", "C", ",", RowBox[{"Coxeter", "[", RowBox[{"C", ",", "d"}], "]"}], ",", RowBox[{"Graphics", "[", RowBox[{"DrawCircle", "/@", "C"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"coords", ",", "G", ",", "C1", ",", "C2", ",", "C", ",", RowBox[{"Coxeter", "[", RowBox[{"C", ",", "d"}], "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.741298848622875*^9, 3.741298852355364*^9}, { 3.74130554094278*^9, 3.741305544118499*^9}, {3.741305622881525*^9, 3.741305663846339*^9}}, ExpressionUUID -> "ea923b4a-e3f1-469a-bc88-6ebf888f6922"] }, WindowSize->{878, 641}, WindowMargins->{{Automatic, 168}, {Automatic, 2}}, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (July 28, \ 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 510, 16, 32, "Input"], Cell[1071, 38, 438, 14, 32, "Input"], Cell[1512, 54, 8660, 227, 864, "Input"], Cell[10175, 283, 28409, 702, 2406, "Input"], Cell[38587, 987, 12615, 308, 852, "Input"], Cell[51205, 1297, 1630, 44, 117, "Input"], Cell[52838, 1343, 13996, 330, 1272, "Input"], Cell[66837, 1675, 11918, 296, 789, "Input"], Cell[78758, 1973, 2840, 74, 369, "Input"], Cell[81601, 2049, 1344, 36, 138, "Input"], Cell[82948, 2087, 4837, 130, 201, "Input"], Cell[87788, 2219, 476, 14, 32, "Input"], Cell[88267, 2235, 2639, 64, 390, "Input"], Cell[90909, 2301, 629, 20, 32, "Input"], Cell[91541, 2323, 5199, 135, 306, "Input"], Cell[96743, 2460, 363, 11, 32, "Input"], Cell[97109, 2473, 1195, 36, 96, "Input"], Cell[98307, 2511, 385, 11, 32, "Input"], Cell[98695, 2524, 3089, 85, 327, "Input"], Cell[101787, 2611, 901, 28, 54, "Input"], Cell[102691, 2641, 1871, 52, 75, "Input"], Cell[104565, 2695, 7561, 200, 390, "Input"], Cell[112129, 2897, 1172, 34, 75, "Input"], Cell[113304, 2933, 991, 28, 54, "Input"], Cell[114298, 2963, 8272, 213, 390, "Input"], Cell[122573, 3178, 1466, 39, 201, "Input"], Cell[124042, 3219, 2073, 53, 180, "Input"], Cell[126118, 3274, 2808, 70, 306, "Input"], Cell[128929, 3346, 1034, 29, 54, "Input"], Cell[129966, 3377, 3927, 92, 285, "Input"], Cell[133896, 3471, 7365, 182, 621, "Input"], Cell[141264, 3655, 1353, 37, 138, "Input"], Cell[142620, 3694, 2684, 73, 224, "Input"], Cell[145307, 3769, 6905, 189, 732, "Input"], Cell[152215, 3960, 6838, 191, 795, "Input"], Cell[159056, 4153, 9852, 273, 954, "Input"], Cell[168911, 4428, 4582, 116, 537, "Input"], Cell[173496, 4546, 3047, 82, 120, "Input"], Cell[176546, 4630, 967, 29, 75, "Input"], Cell[177516, 4661, 238, 6, 32, "Input"], Cell[177757, 4669, 4751, 118, 453, "Input"], Cell[182511, 4789, 15881, 409, 621, "Input"], Cell[198395, 5200, 996, 30, 49, "Input"], Cell[199394, 5232, 8119, 179, 495, "Input"], Cell[CellGroupData[{ Cell[207538, 5415, 627, 14, 32, "Input"], Cell[208168, 5431, 21191, 681, 1175, "Output"] }, Open ]], Cell[229374, 6115, 485, 10, 32, "Input"], Cell[229862, 6127, 29047, 750, 1146, "Input"], Cell[258912, 6879, 964, 20, 32, "Input"], Cell[259879, 6901, 458, 10, 32, "Input"], Cell[260340, 6913, 682, 18, 54, "Input"], Cell[261025, 6933, 570, 15, 54, "Input"], Cell[261598, 6950, 2582, 63, 285, "Input"] } ] *)