GeometricLocusSpheres::usage="Find the general equation of the spheres tangent to the OX and OY axes, and to the plane. Find the geometric locus of its centers.​References:UsunárizBalanzategui,Ubaldo.UsunárizSala,Ignacio.ProblemasdeGeometríaAnalíticayDiferencial.p.254;Personal.";
Devolopment:
Center and radius of the sphere:
{α,β,γ};r;
For being tangent to OX:
In[]:=
2
r
==
2
β
+
2
γ
;
For being tangent to OY:
In[]:=
2
r
==
2
α
+
2
γ
;
In[]:=
2
α
+
2
γ
==
2
β
+γ;
In[]:=
α==±β;
Case 1:
In[]:=
α==β
The center is:
In[]:=
{β,β,γ};
The normal to the plane traced from the center of the sphere:
In[]:=
x-β
1
==
y-β
1
;z==γ;
The intersection point with the plane is:
In[]:=
Solve
x-β
1
==
y-β
1
,z==γ,x+y==3,{x,y,z}
Out[]=
x
3
2
,y
3
2
,zγ
In[]:=

3
2
,
3
2
,γ;
Distance from the center to the point is r:
In[]:=
2
β-
3
2
+
2
β-
3
2
==
2
β
+
2
γ
;​​2
2
β-
3
2
==
2
β
+
2
γ
;
The geometric locus of its center is:
In[]:=
x=y;2
2
y-
3
2
==
2
y
+
2
z
;
In[]:=
Expand2
2
y-
3
2
==
2
y
+
2
z

Out[]=
9
2
-6y+2
2
y

2
y
+
2
z
In[]:=
x=y;2
2
y
-2
2
z
-12y+9==0;
General equation of tangent spheres:
In[]:=
Expand[
2
(x-β)
+
2
(y-β)
+
2
(z-γ)
==
2
β
+
2
γ
]
Out[]=
2
2
y
+
2
z
-4yβ+2
2
β
-2zγ+
2
γ

2
β
+
2
γ
In[]:=
2
x
+
2
y
+
2
z
-2βx-2βy-2γz+
2
β
==0;​​
2
x
+
2
y
+
2
z
-2βx-2βy±2
2
2
β-
3
2
-
2
β
z+
2
β
==0;​​
2
x
+
2
y
+
2
z
-2βx-2βy±2
2
β
-6β+
9
2
z+
2
β
==0;​​
Case 2:
In[]:=
α==-β
The center is:
In[]:=
{-β,β,γ};
The normal to the plane traced from the center of the sphere:
In[]:=
x+β
1
==
y-β
1
;z==γ;
The intersection point with the plane is:
In[]:=
Solve
x+β
1
==
y-β
1
,z==γ,x+y==3,{x,y,z}
Out[]=
x
3
2
-β,y
1
2
(3+2β),zγ
In[]:=

3
2
-β,
3
2
+β,γ;
Distance from the center to the point is r:
In[]:=
2
-β-
3
2
+β
+
2
β-
3
2
-β
==
2
β
+
2
γ
;​​
9
2
==
2
β
+
2
γ
;
The geometric locus of its center is:
In[]:=
x=-y;
2
y
+
2
z
==
9
2
;
General equation of tangent spheres:
In[]:=
Expand[
2
(x+β)
+
2
(y-β)
+
2
(z-γ)
==
2
β
+
2
γ
]
Out[]=
2
2
y
+
2
z
-4yβ+2
2
β
-2zγ+
2
γ

2
β
+
2
γ
In[]:=
2
x
+
2
y
+
2
z
+2βx-2βy-2γz+
2
β
==0;​​
2
x
+
2
y
+
2
z
+2βx-2βy±2
9
2
-
2
β
z+
2
β
==0;​​
Domain of β case 1 for the animation:
In[]:=
Reduce
2
β
-6β+
9
2
>=0,β
β≤
1
2
6-3
2
||β≥
1
2
6+3
2
;
Domain of β case 2 for the animation:
In[]:=
Reduce
9
2
-
2
β
>=0,β
-
3
2
≤β≤
3
2
;
Animation of the case 1:
In[]:=
​​Manipulateζ[t_]:=t{1,0,0};
ζ
1
[t_]:=t{0,1,0};
σ
1
[β_,u_,v_]:=
2
β-
3
2
Cos[u]Sin[v]+β,
2
β-
3
2
Sin[u]Sin[v]+β,
2
β-
3
2
Cos[v]+
2
β
-6β+
9
2
;​​
σ
2
[β_,u_,v_]:=
2
β-
3
2
Cos[u]Sin[v]+β,
2
β-
3
2
Sin[u]Sin[v]+β,
2
β-
3
2
Cos[v]-
2
β
-6β+
9
2
;​​
ξ
1
[β_]:=β,β,
2
β
-6β+
9
2
;
ξ
2
[β_]:=β,β,-
2
β
-6β+
9
2
;​​i[x_,y_,z_]:=x+y-3;​​ShowParametricPlot3D[ζ[t],{t,-30,30},PlotStyleGray]/.Line[pts_,rest___]:>Tube[pts,0.2,rest],​​ParametricPlot3D[
ζ
1
[t],{t,-30,30},PlotStyleGray]/.Line[pts_,rest___]:>Tube[pts,0.2,rest],​​Graphics3D[{Yellow,Ball[
ξ
1
[β1],0.35]}],Graphics3D[{Yellow,Ball[
ξ
2
[β1],0.35]}],ParametricPlot3D[
σ
1
[β1,u,v],{u,0,2π},{v,0,π},PlotStyle->Opacity[0.3],MeshFalse,PerformanceGoal"Quality",ColorFunction"LightTemperatureMap"],ParametricPlot3D[
σ
2
[β1,u,v],{u,0,2π},{v,0,π},PlotStyle->Opacity[0.3],MeshFalse,PerformanceGoal"Quality",ColorFunction"LightTemperatureMap"],ContourPlot3D[i[x,y,z]==0,{x,-10,10},{y,-10,10},{z,-30,30},MeshFalse,PerformanceGoal"Quality",ContourStyle->Directive[Purple,Opacity[0.2],Specularity[White,30]],MeshNone],ParametricPlot3D
ξ
1
[β],β,
1
2
6+3
2
,β1,PlotStyleYellow/.Line[pts_,rest___]:>Tube[pts,0.1,rest],ParametricPlot3D
ξ
2
[β],β,
1
2
6+3
2
,β1,PlotStyleYellow/.Line[pts_,rest___]:>Tube[pts,0.1,rest],​​AxesLabel->(Style[#,15,Blue]&/@{"X","Y","Z"}),AxesOrigin{0,0,0},AxesTrue,BoxedFalse,BoxRatiosAutomatic,PlotRangeAll,ImageSize900,ViewPoint{-3,12,1},Style["Geometric locus of the centers of the spheres:",Bold,Large],β1,
1
2
6+3
2
+0.00002,"Value (β)",
1
2
6+3
2
+0.00001,12,0.00001,ControlPlacementTop
View from all angles of case 1 (below):
Animation of the case 2:
View from all angles of case 2 (below):