ParaboloidTangentSphere::usage="The notebook will ask you for the center and radius of a sphere. The center of the sphere will be the focus of the paraboloid, because it is internally tangent to it at its vertex. It will also ask you for the coefficients of the directrix plane A, B and C of the equation Ax + B y + C z = D. The notebook calculates D. It will also ask you for the extension in x, y and z: {x0, x1}, {y0, y1}, {z0, z1}. At that moment evaluate the notebook. The calculation of the equation of the paraboloid will be from its definition: A point moves in such a way that is distance to the focus is equal to its distance to the directrix plane. Reference: Personal.";
In[]:=
ParaboloidTangentToSphere[{h_,k_,l_},r_,{A_,B_,C1_},{x0_,x1_},{y0_,y1_},{z0_,z1_}]:=Module{},D1=Ah+Bk+C1l-2r++;D2=2r+++Ah+Bk+C1l;t1=++;t2=++;x11=h+t1A;y11=k+t1B;z11=l+t1C1;x22=h+t2A;y22=k+t2B;z22=l+t2C1;xve1=;yve1=;zve1=;xve2=;yve2=;zve2=;V1={xve1,yve1,zve1};V2={xve2,yve2,zve2};eq1=(++)(++);eq2=(++)(++);p=Grid[{{Paraboloid1(Green),Paraboloid2(Yellow)},{{V1,eq1},{V2,eq2}}},ItemSize15,ItemStyle->DarkGreen,FrameAll];Print[" "];Print[p];Show[{ParametricPlot3D[{rCos[u]Sin[v]+h,rSin[u]Sin[v]+k,rCos[v]+l},{u,0,2π},{v,0,π},PlotStyle->{Opacity[1],Red,Specularity[White,40]},MeshFalse,PerformanceGoal"Quality"],ContourPlot3D[eq1,{x,x0,x1},{y,y0,y1},{z,z0,z1},ContourStyle->Directive[Green,Opacity[0.2],Specularity[White,40]],MeshFalse,PerformanceGoal->"Quality",PlotPoints->60],Graphics3D[{Black,Ball[V1,0.4]}]},AxesLabel->(Style[#,15,Blue]&/@{"X","Y","Z"}),AxesOrigin{0,0,0},AxesTrue,BoxedFalse,BoxRatiosAutomatic,PlotRange{{x0,x1},{y0,y1},{z0,z1}},ViewPoint{1.3,-2.4,2.},ImageSize700]Show[{ParametricPlot3D[{rCos[u]Sin[v]+h,rSin[u]Sin[v]+k,rCos[v]+l},{u,0,2π},{v,0,π},PlotStyle->{Opacity[1],Red,Specularity[White,40]},MeshFalse,PerformanceGoal"Quality"],ContourPlot3D[eq2,{x,x0,x1},{y,y0,y1},{z,z0,z1},ContourStyle->Directive[Yellow,Opacity[0.2],Specularity[White,40]],MeshFalse,PerformanceGoal->"Quality",PlotPoints->60],Graphics3D[{Black,Ball[V2,0.4]}]},AxesLabel->(Style[#,15,Blue]&/@{"X","Y","Z"}),AxesOrigin{0,0,0},AxesTrue,BoxedFalse,BoxRatiosAutomatic,PlotRange{{x0,x1},{y0,y1},{z0,z1}},ViewPoint{1.3,-2.4,2.},ImageSize700]
2
A
2
B
2
C1
2
A
2
B
2
C1
D1-Ah-Bk-C1l
2
A
2
B
2
C1
D2-Ah-Bk-C1l
2
A
2
B
2
C1
x11+h
2
y11+k
2
z11+l
2
x22+h
2
y22+k
2
z22+l
2
2
A
2
B
2
C1
2
(h-x)
2
(k-y)
2
(l-z)
2
(-D1+Ax+By+C1z)
2
A
2
B
2
C1
2
(h-x)
2
(k-y)
2
(l-z)
2
(-D2+Ax+By+C1z)
Example:
Sphere: C{- 2, 8, 5}, r = 6, Plane: {1, 1, 1},
Extension: {x, -15, 15}, {y, - 20, 20}, {z, - 15, 15}
Sphere: C{- 2, 8, 5}, r = 6, Plane: {1, 1, 1},
Extension: {x, -15, 15}, {y, - 20, 20}, {z, - 15, 15}
In[]:=
ParaboloidTangentToSphere[{-2,8,5},6,{1,1,1},{-15,15},{-20,20},{-15,15}]
Paraboloid1 | Paraboloid2 |
1 2 3 ),1 2 3 ),1 2 3 ),3(2 (-2-x) 2 (8-y) 2 (5-z) 2 -11+12 3 +x+y+z | 1 2 3 ),1 2 3 ),1 2 3 ),3(2 (-2-x) 2 (8-y) 2 (5-z) 2 -11-12 3 +x+y+z |
Out[]=