Cell[CellGroupData[{Cell[BoxData[ RowBox[{"Manipulate", "[", " ", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"v", ",", "c", ",", "f", ",", "a", ",", "b"}], "}"}], ",", " ", RowBox[{ RowBox[{"v", "=", RowBox[{"{", RowBox[{"vx", ",", "vy", ",", "vz"}], "}"}]}], ";", " ", RowBox[{"c", "=", RowBox[{"Join", "[", RowBox[{"c2", ",", RowBox[{"{", "0", "}"}]}], "]"}]}], ";", " ", RowBox[{"f", "=", RowBox[{"{", RowBox[{"0", ",", "0", ",", "h"}], "}"}]}], ";", " ", RowBox[{"a", "=", RowBox[{"Normalize", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "vy"}], ",", "vx", ",", "0"}], "}"}], "]"}]}], ";", " ", RowBox[{"b", "=", RowBox[{"Normalize", "[", RowBox[{"Cross", "[", RowBox[{"a", " ", ",", "v"}], "]"}], "]"}]}], ";", " ", RowBox[{"Show", "[", RowBox[{ RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{ RowBox[{"\[Lambda]", " ", "f"}], "+", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Lambda]"}], ")"}], "c"}], "+", RowBox[{"r", RowBox[{"(", RowBox[{"1", "-", "\[Lambda]"}], ")"}], RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "\[Alpha]", "]"}], " ", "a"}], "+", RowBox[{ RowBox[{"Sin", "[", "\[Alpha]", "]"}], "b"}]}], ")"}]}]}], ",", RowBox[{"{", RowBox[{"\[Alpha]", ",", "0", ",", RowBox[{"2", "\[Pi]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\[Lambda]", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "3"}], ",", "3"}], "}"}]}], "}"}]}], ",", RowBox[{"Boxed", "->", "bo"}], ",", RowBox[{"Axes", "->", "ax"}], ",", RowBox[{"Mesh", "->", "ms"}], ",", RowBox[{"ImageSize", "->", RowBox[{"{", RowBox[{"450", ",", "500"}], "}"}]}]}], "]"}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{"If", "[", RowBox[{"dv", ",", RowBox[{"Arrow", "[", RowBox[{"{", RowBox[{"c", ",", RowBox[{"c", "+", RowBox[{"2", RowBox[{"Normalize", "[", "v", "]"}]}]}]}], "}"}], "]"}], ",", RowBox[{"{", "}"}]}], "]"}], "}"}], "]"}], ",", RowBox[{"SphericalRegion", "->", "True"}]}], "]"}]}]}], "]"}], ",", " ", " ", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold", ",", "12"}], "]"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"vx", ",", RowBox[{"-", "1"}], ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}]}], "}"}], ",", RowBox[{"-", "2"}], ",", "2", ",", ".01", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"Appearance", "->", "\"\\""}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"vy", ",", "1", ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}]}], "}"}], ",", RowBox[{"-", "2"}], ",", "2", ",", ".01", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"Appearance", "->", "\"\\""}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"vz", ",", "1", ",", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Italic"}], "]"}]}], "}"}], ",", RowBox[{"-", "2"}], ",", "2", ",", ".01", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"Appearance", "->", "\"\\""}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"dv", ",", "True", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"True", ",", "False"}], "}"}]}], "}"}], ",", "Delimiter", ",", " ", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold", ",", "12"}], "]"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"c2", ",", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", RowBox[{"-", "2"}]}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"r", ",", "2", ",", "\"\\""}], "}"}], ",", "0", ",", "3", ",", ".01", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"Appearance", "->", "\"\\""}]}], "}"}], ",", "Delimiter", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"h", ",", "2", ",", "\"\\""}], "}"}], ",", "0", ",", "3", ",", ".01", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"Appearance", "->", "\"\\""}]}], "}"}], ",", "Delimiter", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"ax", ",", "True", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"True", ",", "False"}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"bo", ",", "True", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"True", ",", "False"}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"ms", ",", "False", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"True", ",", "False"}], "}"}]}], "}"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{ 3.5825713159346666`*^9, {3.5825713548616667`*^9, 3.582571516348667*^9}, {3.582640563785029*^9, 3.5826405837654934`*^9}, {3.582642445596196*^9, 3.5826424568723235`*^9}, {3.582891843823256*^9, 3.5828919178953876`*^9}, 3.760724235835128*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`ax$$ = True, $CellContext`bo$$ = True, $CellContext`c2$$ = {0, 0}, $CellContext`dv$$ = True, $CellContext`h$$ = 2, $CellContext`ms$$ = False, $CellContext`r$$ = 2, $CellContext`vx$$ = -1, $CellContext`vy$$ = 1, $CellContext`vz$$ = 1, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[ Style["orthogonal vector", Bold, 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`vx$$], -1, Style["x", Italic]}, -2, 2, 0.01}, {{ Hold[$CellContext`vy$$], 1, Style["y", Italic]}, -2, 2, 0.01}, {{ Hold[$CellContext`vz$$], 1, Style["z", Italic]}, -2, 2, 0.01}, {{ Hold[$CellContext`dv$$], True, "show"}, {True, False}}, { Hold[ Style["base", Bold, 12]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`c2$$], {0, 0}, "base\ncenter"}, {-2, -2}, {2, 2}}, {{ Hold[$CellContext`r$$], 2, "radius"}, 0, 3, 0.01}, {{ Hold[$CellContext`h$$], 2, "height\nof apex"}, 0, 3, 0.01}, {{ Hold[$CellContext`ax$$], True, "axes"}, {True, False}}, {{ Hold[$CellContext`bo$$], True, "box"}, {True, False}}, {{ Hold[$CellContext`ms$$], False, "mesh"}, {True, False}}}, Typeset`size$$ = {450., {248., 252.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`vx$182051$$ = 0, $CellContext`vy$182052$$ = 0, $CellContext`vz$182053$$ = 0, $CellContext`dv$182054$$ = False, $CellContext`c2$182055$$ = {0, 0}, $CellContext`r$182056$$ = 0, $CellContext`h$182057$$ = 0, $CellContext`ax$182058$$ = False, $CellContext`bo$182059$$ = False, $CellContext`ms$182060$$ = False}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`ax$$ = True, $CellContext`bo$$ = True, $CellContext`c2$$ = {0, 0}, $CellContext`dv$$ = True, $CellContext`h$$ = 2, $CellContext`ms$$ = False, $CellContext`r$$ = 2, $CellContext`vx$$ = -1, $CellContext`vy$$ = 1, $CellContext`vz$$ = 1}, "ControllerVariables" :> { Hold[$CellContext`vx$$, $CellContext`vx$182051$$, 0], Hold[$CellContext`vy$$, $CellContext`vy$182052$$, 0], Hold[$CellContext`vz$$, $CellContext`vz$182053$$, 0], Hold[$CellContext`dv$$, $CellContext`dv$182054$$, False], Hold[$CellContext`c2$$, $CellContext`c2$182055$$, {0, 0}], Hold[$CellContext`r$$, $CellContext`r$182056$$, 0], Hold[$CellContext`h$$, $CellContext`h$182057$$, 0], Hold[$CellContext`ax$$, $CellContext`ax$182058$$, False], Hold[$CellContext`bo$$, $CellContext`bo$182059$$, False], Hold[$CellContext`ms$$, $CellContext`ms$182060$$, False]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`v$, $CellContext`c$, $CellContext`f$, \ $CellContext`a$, $CellContext`b$}, $CellContext`v$ = \ {$CellContext`vx$$, $CellContext`vy$$, $CellContext`vz$$}; \ $CellContext`c$ = Join[$CellContext`c2$$, {0}]; $CellContext`f$ = { 0, 0, $CellContext`h$$}; $CellContext`a$ = Normalize[{-$CellContext`vy$$, $CellContext`vx$$, 0}]; $CellContext`b$ = Normalize[ Cross[$CellContext`a$, $CellContext`v$]]; Show[ ParametricPlot3D[$CellContext`\[Lambda] $CellContext`f$ + ( 1 - $CellContext`\[Lambda]) $CellContext`c$ + \ ($CellContext`r$$ (1 - $CellContext`\[Lambda])) ( Cos[$CellContext`\[Alpha]] $CellContext`a$ + Sin[$CellContext`\[Alpha]] $CellContext`b$), \ {$CellContext`\[Alpha], 0, 2 Pi}, {$CellContext`\[Lambda], 0, 1}, PlotRange -> {{-3, 3}, {-3, 3}, {-3, 3}}, Boxed -> $CellContext`bo$$, Axes -> $CellContext`ax$$, Mesh -> $CellContext`ms$$, ImageSize -> {450, 500}], Graphics3D[{ If[$CellContext`dv$$, Arrow[{$CellContext`c$, $CellContext`c$ + 2 Normalize[$CellContext`v$]}], {}]}], SphericalRegion -> True]], "Specifications" :> { Style["orthogonal vector", Bold, 12], {{$CellContext`vx$$, -1, Style["x", Italic]}, -2, 2, 0.01, ImageSize -> Tiny, Appearance -> "Labeled"}, {{$CellContext`vy$$, 1, Style["y", Italic]}, -2, 2, 0.01, ImageSize -> Tiny, Appearance -> "Labeled"}, {{$CellContext`vz$$, 1, Style["z", Italic]}, -2, 2, 0.01, ImageSize -> Tiny, Appearance -> "Labeled"}, {{$CellContext`dv$$, True, "show"}, { True, False}}, Delimiter, Style[ "base", Bold, 12], {{$CellContext`c2$$, {0, 0}, "base\ncenter"}, {-2, -2}, {2, 2}}, {{$CellContext`r$$, 2, "radius"}, 0, 3, 0.01, ImageSize -> Tiny, Appearance -> "Labeled"}, Delimiter, {{$CellContext`h$$, 2, "height\nof apex"}, 0, 3, 0.01, ImageSize -> Tiny, Appearance -> "Labeled"}, Delimiter, {{$CellContext`ax$$, True, "axes"}, { True, False}}, {{$CellContext`bo$$, True, "box"}, { True, False}}, {{$CellContext`ms$$, False, "mesh"}, { True, False}}}, "Options" :> {ControlPlacement -> Left}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{654., {277., 283.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{3.760724235835393*^9}, CellID->1039294038] }, {2}]]