CylinderCircumscribedSphere::usage="Find the equation of a cylinder whose direction of the generatrix is {1, 1, 1} and is circumscribed around the sphere with center C{-2, 4, 5} and radius r = 4. Reference: Personal. ";
Method 1:
Parametric equations of the generatrix:
{x,y,z}={a,b,c}+t{1,1,1};
Substituting in the equation of the sphere:
In[]:=
Expand[++==16]
2
(a+t+2)
2
(b+t-4)
2
(c+t-5)
Out[]=
45+4a+-8b+-10c+-14t+2at+2bt+2ct+316
2
a
2
b
2
c
2
t
3+(2a+2b+2c-14)t+29+4a+-8b+-10c+==0;
2
t
2
a
2
b
2
c
Considering the condition of tangency between the cylinder and the sphere (discriminant is equal to zero):
In[]:=
Expand[-12(29+4a+-8b+-10c+)==0]
2
(2a+2b+2c-14)
2
a
2
b
2
c
-152-104a-8+40b+8ab-8+64c+8ac+8bc-80;
2
a
2
b
2
c
The point {a, b, c} is on the cylinder, then the equation of the cylinder is:
-19-13x-+5y+xy-+8z+xz+yz-==0;++-xy-xz-yz+13x-5y-8z+19==0;
2
x
2
y
2
z
2
x
2
y
2
z
Method 2:
Equation of the cylinder (by the definition of the straight circular cylinder):
r=;
A({x,y,z}-{h,k,l})
A
Where {x, y, z} is any point on the cylinder, {h, k, l} it is a point on the axis of the cylinder, it can be the center of the sphere, A is the director vector of the generatrix and r is the radius of the cylinder (sphere).
In[]:=
4==
Norm[{1,1,1}({x,y,z}-{-2,4,5})]
Norm[{1,1,1}]
In[]:=
4++;Expand[48==++]
2
Abs[-6-x+y]
2
Abs[7+x-z]
2
Abs[-1-y+z]
3
2
(-6-x+y)
2
(7+x-z)
2
(-1-y+z)
4886+26x+2-10y-2xy+2-16z-2xz-2yz+2;++-xy-xz-yz+13x-5y-8z+19==0;
2
x
2
y
2
z
2
x
2
y
2
z
To create the animation:
Plane that cuts to the sphere passing through its center:
x+y+z+D==0;-2+4+5+D=0;D=-7;x+y+z-7==0;
The plane intersects the sphere resulting in the circumference:
In[]:=
x=-y-z+7;y=u;z=v;{-1,1,0}{1,1,1}
In[]:=
{1,1,-2};{-2,4,5}+{-1,1,0}+{1,1,-2}
4Cos[θ]
Norm[{-1,1,0}]
4Sin[θ]
Norm[{1,1,-2}]
-2-2Sin[θ],4+2Sin[θ],5-4Sin[θ];
2
Cos[θ]+22
3
2
Cos[θ]+22
3
2
3
In[]:=
ManipulateCent={-2,4,5};ContactPoint[t_]:=-2-2Sin[t],4+2Sin[t],5-4Sin[t];Show[{ParametricPlot3D[ContactPoint[t1]+t{1,1,1},{t,-8,8},PlotStyle->{Black,Thick}],Table[ParametricPlot3D[ContactPoint[k]+t{1,1,1},{t,-8,8},PlotStyle->{Opacity[0.2],Green},PerformanceGoal->"Speed"],{k,0,t1,0.1}],ParametricPlot3D[ContactPoint[u],{u,0,t1},PlotStyle->{Blue,Thick}],Graphics3D[{Red,Specularity[White,40],Sphere[Cent,4],Black,Ball[ContactPoint[t1],0.3]}]},AxesLabel->(Style[#,15,Blue]&/@{"X","Y","Z"}),AxesOrigin{0,0,0},AxesTrue,BoxedFalse,BoxRatiosAutomatic,PlotRange15,ViewPoint{-3,3,-10},ImageSize700],Style["Cylinder:",Bold,Large],{{t1,0.00002,"Value (t1)"},0.00001,2π,0.00001},ControlPlacementTop
2
Cos[t]+22
3
2
Cos[t]+22
3
2
3
Out[]=

