(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 6424, 185] NotebookOptionsPosition[ 5896, 168] NotebookOutlinePosition[ 6239, 183] CellTagsIndexPosition[ 6196, 180] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[TextData[StyleBox["Sphere data generating", FontColor->RGBColor[1, 0, 0]]], "Subsubsection", CellChangeTimes->{{3.868246565233054*^9, 3.868246587004671*^9}},ExpressionUUID->"0d16f333-3393-4279-a3f3-\ 6ed0a972b62f"], Cell[CellGroupData[{ Cell[TextData[Cell[BoxData[{ RowBox[{ RowBox[{ StyleBox["Input", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"Sphere", " ", "sph", " ", "with", " ", "center", " ", "c"}], " ", "\[Element]", " ", RowBox[{ RowBox[{ SuperscriptBox["\[DoubleStruckCapitalR]", "3"], "and", " ", "radius", " ", "r"}], " ", ">", "0"}]}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{"variance", " ", "sigma"}], FontColor->RGBColor[0, 0, 1]], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{"data", " ", "number", " ", "m"}], ";"}], FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ StyleBox["Output", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ "Data", " ", "uniformly", " ", "distributed", " ", "on", " ", "the", " ", "sphere", " ", "sph"}], FontColor->RGBColor[0, 0, 1]]}], StyleBox[",", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox[ RowBox[{ RowBox[{ RowBox[{"and", " ", "data", " ", "set", " ", StyleBox["\[ScriptCapitalA]", FontColor->RGBColor[0, 0, 1]]}], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox["\[Subset]", FontColor->RGBColor[0, 0, 1]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], RowBox[{ StyleBox[ SuperscriptBox["\[DoubleStruckCapitalR]", "3"], FontColor->RGBColor[0, 0, 1]], " ", "homogeneously", " ", "scattered", " ", "around", " ", "the", " ", "sphere"}]}], ";"}], FontColor->RGBColor[0, 0, 1]]}], "\[IndentingNewLine]", RowBox[{ StyleBox["Submodules", FontColor->RGBColor[1, 0, 0]], StyleBox[":", FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontColor->RGBColor[0, 0, 1]], StyleBox["None", FontColor->RGBColor[0, 0, 1]]}]}], "Text", CellChangeTimes->{{3.8208938752340946`*^9, 3.8208939165097227`*^9}, 3.8208939777537127`*^9, {3.82089402908541*^9, 3.8208940654953437`*^9}, { 3.820894178610306*^9, 3.8208942451936073`*^9}, {3.820894336841039*^9, 3.8208943606992674`*^9}, {3.8222252468201857`*^9, 3.8222252579121275`*^9}, {3.8222263768275585`*^9, 3.8222264735149126`*^9}, {3.8222267120062532`*^9, 3.8222267137917337`*^9}, 3.8222268123848886`*^9, {3.8223097789208064`*^9, 3.822309786698867*^9}}, FontSize-> 12,ExpressionUUID->"ecae62cf-4924-40df-be74-651d90ff4ad7"]], "Subsection", CellChangeTimes->{{3.868246254366021*^9, 3.8682462755903225`*^9}, { 3.8690250273395615`*^9, 3.869025042552888*^9}, {3.8690251065488477`*^9, 3.8690251608816423`*^9}, {3.8690252701815977`*^9, 3.8690253041100616`*^9}, { 3.869025338348714*^9, 3.869025367855494*^9}, {3.8690254160584574`*^9, 3.869025451124421*^9}, {3.8690257613911047`*^9, 3.8690259124606857`*^9}, { 3.8690260429489784`*^9, 3.8690260783487635`*^9}, {3.8690261091553082`*^9, 3.86902611662175*^9}, {3.8690261500525312`*^9, 3.8690261500525312`*^9}, { 3.8694578604926567`*^9, 3.869457861618338*^9}, {3.8694579125126266`*^9, 3.869457912752282*^9}},ExpressionUUID->"bb5dcf13-b7b1-4dcb-9ebf-\ 7fd6a2f319ca"], Cell[BoxData[ RowBox[{ RowBox[{"DataSph", "[", RowBox[{"c_", ",", "r_", ",", "sigma_", ",", "m_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"sph", ",", "A"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"sph", "=", RowBox[{"RandomPoint", "[", RowBox[{ RowBox[{"Sphere", "[", RowBox[{"c", ",", "r"}], "]"}], ",", "m"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"A", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"MultinormalDistribution", "[", RowBox[{ RowBox[{"sph", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"sigma", " ", RowBox[{"IdentityMatrix", "[", "3", "]"}]}]}], "]"}], ",", RowBox[{"{", "1", "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "sph", "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"A", ",", "sph"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.8681663330032177`*^9, 3.868166578673594*^9}, { 3.8686210211295576`*^9, 3.868621021350667*^9}, {3.86902742408899*^9, 3.8690274245732307`*^9}, 3.8690288283203707`*^9, {3.869274910359125*^9, 3.869274932090497*^9}},ExpressionUUID->"768180b3-371a-43ff-982a-\ bc5c22af19bf"] }, Open ]] }, WindowSize->{803, 461}, WindowMargins->{{Automatic, 172}, {Automatic, 82}}, FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 224, 4, 44, "Subsubsection",ExpressionUUID->"0d16f333-3393-4279-a3f3-6ed0a972b62f"], Cell[CellGroupData[{ Cell[807, 28, 3535, 95, 81, "Subsection",ExpressionUUID->"bb5dcf13-b7b1-4dcb-9ebf-7fd6a2f319ca"], Cell[4345, 125, 1535, 40, 124, "Input",ExpressionUUID->"768180b3-371a-43ff-982a-bc5c22af19bf"] }, Open ]] } ] *)