(* 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[ 14146, 481] NotebookOptionsPosition[ 13343, 448] NotebookOutlinePosition[ 13837, 468] CellTagsIndexPosition[ 13794, 465] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["mPower: delaunayMedian", "Title", CellChangeTimes->{{3.4044903289891157`*^9, 3.404490333967792*^9}}], Cell["19-Nov-2007 revised for M6", "Text", CellChangeTimes->{{3.404490337400372*^9, 3.404490342000108*^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.404490345315534*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"delaunayMedian", "[", "points", "]"}]], "Input"], Cell[BoxData["10.679419459877021`"], "Output", CellChangeTimes->{3.404490347757729*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"dt", "=", RowBox[{"delaunayTriangulation", "[", RowBox[{"points", ",", RowBox[{"delaunayFormat", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"edgeCoordinates", "->", " ", "True"}], ",", RowBox[{"regions", "\[Rule]", " ", "True"}], ",", RowBox[{"regionCoordinates", "\[Rule]", " ", "True"}]}], "}"}]}]}], "]"}]}]], "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[{"regions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "1", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "5", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "9", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "1", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "8", ",", "9"}], "}"}], ",", RowBox[{"{", RowBox[{"8", ",", "4", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8", ",", "5"}], "}"}]}], "}"}]}], ",", RowBox[{"edgeCoordinates", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6.8`", ",", "7.4`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3.`"}], ",", "9.6`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"6.8`", ",", "7.4`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3.`"}], ",", "9.6`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"6.8`", ",", "7.4`"}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "3.`"}], ",", "9.6`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "10.6`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2`", ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2`", ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "10.6`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2`", ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}]}], "}"}]}], ",", RowBox[{"regionCoordinates", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"6.8`", ",", "7.4`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6.8`", ",", "7.4`"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3.`"}], ",", "9.6`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2`", ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.9`", ",", RowBox[{"-", "7.1`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3.`"}], ",", "9.6`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"10.2`", ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "10.6`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "9.3`"}], ",", RowBox[{"-", "6.9`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", RowBox[{"-", "17.5`"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "0.4`"}], ",", RowBox[{"-", "7.3`"}]}], "}"}]}], "}"}]}], "}"}]}], ",", RowBox[{"statistics", "\[Rule]", RowBox[{"{", RowBox[{ "11.48742936392689`", ",", "10.679419459877021`", ",", "2.560791288223172`"}], "}"}]}]}], "}"}]], "Output", CellChangeTimes->{3.404490350246705*^9}] }, Open ]] }, Open ]] }, WindowSize->{771, 854}, WindowMargins->{{Automatic, 508}, {Automatic, 82}}, DockedCells->(FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, Placeholder]}]& ), 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, 107, 1, 76, "Title"], Cell[700, 26, 108, 1, 26, "Text"], Cell[CellGroupData[{ Cell[833, 31, 908, 32, 43, "Input"], Cell[1744, 65, 909, 32, 43, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2690, 102, 72, 1, 27, "Input"], Cell[2765, 105, 88, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2890, 111, 395, 10, 43, "Input"], Cell[3288, 123, 10027, 321, 238, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)