(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 6428, 229] NotebookOptionsPosition[ 5734, 199] NotebookOutlinePosition[ 6117, 216] CellTagsIndexPosition[ 6074, 213] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[Cell[BoxData[ FormBox[ StyleBox[ RowBox[{"mpower", ":", "delaunayTriangulationToConnectionMatrix"}], FontSize->16], TraditionalForm]]]], "Title", CellChangeTimes->{{3.404490178801264*^9, 3.404490208350175*^9}}], Cell[TextData[{ "17-Nov-2007 revised for ", StyleBox["Mathematica", FontSlant->"Italic"], " Version 6" }], "Text", CellChangeTimes->{{3.404490217791727*^9, 3.404490226044322*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"points", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6.8", ",", "7.4"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3."}], ",", "9.6"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "9.3"}], ",", RowBox[{"-", "6.9"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4"}], ",", RowBox[{"-", "7.3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.9", ",", RowBox[{"-", "7.1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "10.6"}], ",", RowBox[{"-", "17.5"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1."}], ",", RowBox[{"-", "17.5"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2", ",", RowBox[{"-", "17.5"}]}], "}"}]}], "}"}]}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6.8`", ",", "7.4`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3.`"}], ",", "9.6`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "10.6`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2`", ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.4044901624216022`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"dt", "=", RowBox[{"delaunayTriangulation", "[", "points", "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"edges", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "9"}], "}"}]}], "}"}]}], ",", RowBox[{"statistics", "\[Rule]", RowBox[{"{", RowBox[{ "11.48742936392689`", ",", "10.679419459877021`", ",", "2.560791288223172`"}], "}"}]}]}], "}"}]], "Output", CellChangeTimes->{3.404490164881731*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"delaunayTriangulationToConnectionMatrix", "[", RowBox[{"edges", "/.", "dt"}], "]"}], "//", "MatrixForm"}]], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "1", "1", "1", "1", "1", "0", "0", "0"}, {"1", "0", "1", "0", "0", "1", "0", "0", "0"}, {"1", "1", "0", "1", "0", "0", "0", "0", "0"}, {"1", "0", "1", "0", "1", "0", "1", "1", "0"}, {"1", "0", "0", "1", "0", "1", "0", "1", "1"}, {"1", "1", "0", "0", "1", "0", "0", "0", "1"}, {"0", "0", "0", "1", "0", "0", "0", "1", "0"}, {"0", "0", "0", "1", "1", "0", "1", "0", "1"}, {"0", "0", "0", "0", "1", "1", "0", "1", "0"} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output", CellChangeTimes->{3.404490167370805*^9}] }, Open ]] }, Open ]] }, WindowSize->{711, 820}, WindowMargins->{{Automatic, 309}, {Automatic, 91}}, CellLabelAutoDelete->True, Magnification->1., FrontEndVersion->"6.0 for Mac OS X x86 (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 234, 5, 56, "Title"], Cell[827, 30, 185, 6, 26, "Text"], Cell[CellGroupData[{ Cell[1037, 40, 908, 32, 43, "Input"], Cell[1948, 74, 911, 32, 43, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2896, 111, 103, 2, 27, "Input"], Cell[3002, 115, 1450, 45, 58, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4489, 165, 155, 3, 27, "Input"], Cell[4647, 170, 1059, 25, 157, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)