6. 空間内の平面

Veca={-2,-1,1};
Vecv={1,2,-1};
Vecu={0,1,1};
VecNormal={3,-1,1};
Manipulate[
Show[
ParametricPlot3D[Veca+t*Vecv+s*Vecu,{t,-2,4},{s,-4,4},PlotStyle->Opacity[0.5],Boxed->False,Axes->None],
Graphics3D[{
{Red,Thick,Arrow[{{0,0,0},Veca}]},Point[{0,0,0}],
{Blue,Thick,Arrow[{Veca,Veca+Vecv}]},Text[Style[v,Large],Veca+1.1*Vecv],
{Blue,Thick,Arrow[{Veca,Veca+Vecu}]},Text[Style[u,Large],Veca+1.1*Vecu],
{Green,Thick,Arrow[{Veca,Veca+VecNormal}]},Text[Style[v\[Cross]u,Large],Veca+1.1*VecNormal]
}],
Graphics3D[{PointSize[Large],Point[Veca+k*Vecv+l*Vecu]}]
],{{k,0,"パラメータ t"},-2,2},{{l,0,"パラメータ s"},-2,2},SaveDefinitions->True
]

Veca={-2,-1,1};
Vecv={1,2,-1};
Vecu={0,1,1};
VecNormal={3,-1,1};
Manipulate[
Show[
ParametricPlot3D[Veca+t*Vecv+s*Vecu,{t,-2,4},{s,-4,4},PlotRange->4,PlotStyle->Opacity[0.5]],
Graphics3D[{
{Red,Thick,Arrow[{{0,0,0},Veca}]},Point[{0,0,0}],
{Blue,Thick,Arrow[{Veca,Veca+Vecv}]},Text[Style[v,Large],Veca+1.1*Vecv],
{Blue,Thick,Arrow[{Veca,Veca+Vecu}]},Text[Style[u,Large],Veca+1.1*Vecu],
{Green,Thick,Arrow[{Veca,Veca+VecNormal}]},Text[Style[v\[Cross]u,Large],Veca+1.1*VecNormal]
}],
ContourPlot3D[3 x-y+z==d,{x,-4,4},{y,-4,4},{z,-4,4},ContourStyle->Opacity[0.8],Mesh->None],
Graphics3D[Text["3 x-y+z=d",Veca-0.5*Vecv-Vecu+(d+4)*VecNormal/(Norm[VecNormal]^2)]]
],{{d,-4,"定数項 d"},-5,5},SaveDefinitions->True
]

7. 平面内の円周

Manipulate[
Show[
ParametricPlot[{Cos[t],Sin[t]},{t,0,2*Pi},PlotRange->1.3],
ParametricPlot[{0.2*{Cos[t],Sin[t]},0.21*{Cos[t],Sin[t]}},{t,0,s}],
Graphics[{PointSize[Large],Point[{Cos[s],Sin[s]}]}],
Graphics[{
Point[{{Cos[s],0},{0,Sin[s]} }],
Line[{{0,0},{Cos[s],Sin[s]}}],
{Dashed,Line[{{Cos[s],0},{Cos[s],Sin[s]},{0,Sin[s]}}]},
Text[Style[t,Large],{0.25,0.1}],
Text[Style["cos(t)",Large],{Cos[s],-0.1} ],
Text[Style["sin(t)",Large],{0,Sin[s]+0.1} ]
}]
],
{{s,Pi/6,"角度 t"},0.01,2Pi},SaveDefinitions->True
]

8. 空間内の球面

Manipulate[
Show[
Graphics3D[{Opacity[0.5],Sphere[{0,0,0},1]},PlotRange->{{-1.3,1.3},{-1.3,1.3},{-1.3,1.3}}],(* 球面 *)
Graphics3D[{
Arrow[{{-1.3,0,0},{1.3,0,0}}],Text[x,{1.4,0,0}],(* x軸 *)
Arrow[{{0,-1.3,0},{0,1.3,0}}],Text[y,{0,1.4,0}],(* y軸 *)
Arrow[{{0,0,-1.3},{0,0,1.3}}],Text[z,{0,0,1.4}](* z軸 *)
}],
Graphics3D[{PointSize[Large],Point[{Cos[u]*Cos[v],Sin[u]*Cos[v], Sin[v]}]}],(* 球面上の点P *)
(* 点pを通り，xy-平面に平行な平面 *)
Graphics3D[{Opacity[1.0],Polygon[{{1,1,Sin[v]},{-1,1,Sin[v]},{-1,-1,Sin[v]},{1,-1,Sin[v]},{1,1,Sin[v]}}]}],
ParametricPlot3D[{Cos[r]*Cos[v],Sin[r]*Cos[v], Sin[v]},{r,0,2*Pi}],
Graphics3D[{
Arrow[{{-1.1,0,Sin[v]},{1.1,0,Sin[v]}}],
Arrow[{{0,-1.1,Sin[v]},{0,1.1,Sin[v]}}]
}],
Graphics3D[{(* 媒介変数s *)
{Red,Line[{{0,0,0},{Cos[u]*Cos[v],Sin[u]*Cos[v], Sin[v]}}]},
{Red,Dashed,Line[{{Cos[u]*Cos[v],Sin[u]*Cos[v], Sin[v]},{Cos[u]*Cos[v],Sin[u]*Cos[v], 0},{0,0,0}}]},
Text[Style[s,Red],0.35*{Cos[u]*Cos[v/2],Sin[u]*Cos[v/2], Sin[v/2]}]
}],
ParametricPlot3D[{0.2*{Cos[u]*Cos[r],Sin[u]*Cos[r], Sin[r]},0.22*{Cos[u]*Cos[r],Sin[u]*Cos[r], Sin[r]}},{r,Min[0,v],Max[0,v]}],
Graphics3D[{(* 媒介変数t *)
Point[{{0,Sin[u]*Cos[v], Sin[v]},{Cos[u]*Cos[v],0, Sin[v]}}],
{Blue,Line[{{0,0,Sin[v]},{Cos[u]*Cos[v],Sin[u]*Cos[v], Sin[v]}}]},
{Blue,Dashed,Line[{{0,Sin[u]*Cos[v], Sin[v]},{Cos[u]*Cos[v],Sin[u]*Cos[v], Sin[v]},{Cos[u]*Cos[v],0, Sin[v]}}]},
Text[Style[t,Blue],{0.35*Cos[u/2]*Cos[v],0.35*Sin[u/2]*Cos[v], Sin[v]}]
}],
ParametricPlot3D[{{0.2*Cos[r]*Cos[v],0.2*Sin[r]*Cos[v], Sin[v]},{0.22*Cos[r]*Cos[v],0.22*Sin[r]*Cos[v], Sin[v]}},{r,0,u}],
ParametricPlot3D[{{0.2*Cos[r],0.2*Sin[r], 0},{0.22*Cos[r],0.22*Sin[r], 0}},{r,0,u}]
],{{u,Pi/3,"媒介変数t"},0,2*Pi},{{v,Pi/4,"媒介変数s"},-Pi/2,Pi/2},SaveDefinitions->True
]