({{, (RefLink[SphericalShell, paclet:ref/SphericalShell])[c,{(Subscript[r, inner]),(Subscript[r, outer])}]
represents a filled spherical shell centered at c with inner radius (Subscript[r, inner]) and outer radius (Subscript[r, outer]).}})

OpenersNotesSection(Spacer1)Details

(RefLink[SphericalShell, paclet:ref/SphericalShell]) can be used as a geometric region and a graphics primitive.

(RefLink[SphericalShell, paclet:ref/SphericalShell])[] is equivalent to (RefLink[SphericalShell, paclet:ref/SphericalShell])[{0,0,0},{1/2,1}].

(RefLink[SphericalShell, paclet:ref/SphericalShell])[r] is equivalent to (RefLink[SphericalShell, paclet:ref/SphericalShell])[{0,0,0},{r/2,r}].

(RefLink[SphericalShell, paclet:ref/SphericalShell])[{(Subscript[r, inner]),(Subscript[r, outer])}] is equivalent to (RefLink[SphericalShell, paclet:ref/SphericalShell])[{0,0,0},{(Subscript[r, inner]),(Subscript[r, outer])}].

(RefLink[SphericalShell, paclet:ref/SphericalShell]) represents a filled spherical shell {x|(Subscript[r, inner])≤(Norm[x-c])≤(Subscript[r, outer])}. The region is n dimensional for point c of length n.

(RefLink[SphericalShell, paclet:ref/SphericalShell]) allows c to be any point in (ℝ^n) and 0<(Subscript[r, inner])<(Subscript[r, outer]).

(RefLink[SphericalShell, paclet:ref/SphericalShell]) can be used in (RefLink[Graphics, paclet:ref/Graphics]) and (RefLink[Graphics3D, paclet:ref/Graphics3D]).

In graphics, the point c and radius r can be (RefLink[Dynamic, paclet:ref/Dynamic]) expressions.

Graphics rendering is affected by directives such as (RefLink[FaceForm, paclet:ref/FaceForm]), (RefLink[EdgeForm, paclet:ref/EdgeForm]), (RefLink[Specularity, paclet:ref/Specularity]), (RefLink[Opacity, paclet:ref/Opacity]), and color.

OpenersPrimaryExamplesSection(Spacer1)Examples  (34)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

The standard spherical shell at the origin:

SphericalShell[]

Graphics3D[{Opacity[0.5],%}]

Volume and centroid:

Volume[SphericalShell[{0,0,0},{(Subscript[r, inner]),(Subscript[r, outer])}]]

RegionCentroid[SphericalShell[{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])},{(Subscript[r, inner]),(Subscript[r, outer])}]]

OpenersExampleSection1(Spacer1)Scope  (20)

OpenersExampleSubsection0(Spacer1)Graphics  (10)

OpenersExampleSubsubsection0(Spacer1)Specification  (5)

The standard spherical shell:

Graphics3D[{Opacity[0.5],SphericalShell[{0,0,0},{1/2,1}]}]

Spherical shells with different outer radii:

Graphics3D[{Opacity[0.5],SphericalShell[{0,0,0},{1/2,1}],SphericalShell[{3,0,0},{1/2,2}]}]

Spherical shells with different inner radii:

Graphics3D[{FaceForm[Yellow,Blue],SphericalShell[{0,0,0},{1/2,1}],FaceForm[Yellow,Blue],SphericalShell[{2,0,0},{1/4,1}]},PlotRange->{{-1,3},{-.2,1},{-1,1}}]

Short form for a spherical shell with radii {1/2,1} at the origin:

Graphics3D[{Opacity[0.5],SphericalShell[]},Axes->True]

Short form for a spherical shell with radii {r/2,r} at the origin:

Graphics3D[{Opacity[0.5],SphericalShell[4]},Axes->True]

OpenersExampleSubsubsection1(Spacer1)Styling  (4)

Colored spherical shells:

Table[Graphics3D[{Opacity[0.5],c,SphericalShell[]}],{c,{Red,Green,Blue,Yellow}}]

Different properties can be specified for the front and back of faces using (RefLink[FaceForm, paclet:ref/FaceForm]):

Graphics3D[{FaceForm[Yellow,Blue],SphericalShell[]},PlotRange->{{-1,1},{-.3,1},{-1,1}}]

Spherical shells with different specular exponents:

Table[Graphics3D[{Orange,Specularity[White,n],Opacity[0.5],SphericalShell[]}],{n,{5,20,100}}]

White spherical shell that glows red:

Graphics3D[{Glow[Red],White,Opacity[0.5],SphericalShell[]}]

(RefLink[Opacity, paclet:ref/Opacity]) specifies the face opacity:

Table[Graphics3D[{Opacity[o],SphericalShell[]}],{o,{0.3,0.5,0.9}}]

OpenersExampleSubsubsection2(Spacer1)Coordinates  (1)

Points can be (RefLink[Dynamic, paclet:ref/Dynamic]):

DynamicModule[{x},{Slider[Dynamic[x],{-0.5,0.5}],Graphics3D[{SphericalShell[],SphericalShell[Dynamic[{x,1,1}],1/4]}]}]

OpenersExampleSubsection1(Spacer1)Regions  (10)

Embedding dimension is the dimension of the space in which the spherical shell lives:

RegionEmbeddingDimension[SphericalShell[{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])},{(Subscript[r, inner]),(Subscript[r, outer])}]]

Geometric dimension is the dimension of the shape itself:

RegionDimension[SphericalShell[{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])},{(Subscript[r, inner]),(Subscript[r, outer])}]]

Membership testing:

ℛ=SphericalShell[{0,0,0},1];

{RegionMember[ℛ,{1,0,0}],RegionMember[ℛ,{0,0,0}],RegionMember[ℛ,{1,1,1}]}

Get conditions for point membership:

RegionMember[SphericalShell[{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])},r],{x,y,z}]

Volume:

ℛ=SphericalShell[{0,0,0},1];

{Volume[ℛ],RegionMeasure[ℛ]}

Centroid:

c=RegionCentroid[ℛ]

Graphics3D[{{Opacity[0.5],LightBlue,ℛ},{PointSize[Large],Red,Point[c]}}]

Distance from a point:

ℛ=SphericalShell[{0,0,0},{3/4,1}];

{RegionDistance[ℛ,{1,0,0}],RegionDistance[ℛ,{0,0,0}],RegionDistance[ℛ,{1,1,1}]}

The equidistance contours for a spherical shell:

ContourPlot3D[Evaluate@RegionDistance[ℛ,{x,y,z}],{x,-2,2},{y,0,2},{z,-2,2},Mesh->None,Contours->{0.25,0.5,1},BoxRatios->Automatic]

Signed distance from a point:

ℛ=SphericalShell[{0,0,0},1];

{SignedRegionDistance[ℛ,{1,0,0}],SignedRegionDistance[ℛ,{1/2,1/2,1/2}],SignedRegionDistance[ℛ,{1,1,1}]}

Nearest point in the region:

ℛ=SphericalShell[{0,0,0},1];

{RegionNearest[ℛ,{1,0,0}],RegionNearest[ℛ,{1/2,1/2,1/2}]}

Nearest points to an enclosing sphere:

spherePoints[{n_,m_},c_,r_]:=
Flatten[Table[c+r{Cos[k 2π/n]Sin[l π/m],Sin[k 2π/n]Sin[l π/m],Cos[l π/m]},{k,0.,n-1},{l,0.,m-1}],1];

pl=spherePoints[{16,8},RegionCentroid[ℛ],2];
npl=Table[RegionNearest[ℛ,p],{p,pl}];

Legended[Graphics3D[{ℛ,{Thin,Gray,Line[Transpose[{pl,npl}]]},{Red,Point[pl]},{PointSize[Medium],Blue,Point[npl]}},Lighting->"Neutral",Boxed->False],PointLegend[{Red,Blue},{"start","nearest"}]]

A spherical shell is bounded:

BoundedRegionQ[SphericalShell[{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])},r]]

RegionBounds[SphericalShell[{0,0,0},r]]

ℛ=SphericalShell[{0,0,0},1];

BoundedRegionQ[ℛ]

Find its range:

b=RegionBounds[ℛ]

Graphics3D[{{EdgeForm[White],Opacity[0.2,Yellow],Cuboid@@Transpose[b]},ℛ},Boxed->False]

Integrate over a spherical shell region:

ℛ=SphericalShell[{(Subscript[c, 1]),(Subscript[c, 2]),(Subscript[c, 3])},r];

Integrate[x y z,{x,y,z}∈ℛ]

Optimize over a spherical shell region:

ℛ=SphericalShell[{1,2,3},4];

MinValue[{x y z-x y,{x,y,z}∈ℛ},{x,y,z}]

Solve equations in a spherical shell region:

ℛ=SphericalShell[{1,2,3},3];

Reduce[(x^2)+(y^2)+(z^2)==1&&x-y-z==-(1/2)&&(z^2)==x y+(1/4)&&{x,y,z}∈ℛ,{x,y,z}]

OpenersExampleSection3(Spacer1)Applications  (5)

A standard Ping-Pong ball, a spherical shell, has a mass of 2.7 grams and an outer radius of 40 millimeters:

outerradius=Quantity[40,"Millimeters"];
mass=Quantity[2.7,"Grams"];

It is made of celluloid, which has a density of 1.4` (10^3) kg/(m^3) . Knowing that mass=density ×volume, find the inner radius of a Ping-Pong ball:

density=Quantity[1.4*^3,"Kilograms"/"Meters"^3];

{sol}=Solve[Volume[SphericalShell[{innerradius,outerradius}]]*density==mass,innerradius,Reals]

The thickness is the difference between the inner and outer radius:

thickness=outerradius-innerradius/.sol

It was once believed that the universe was a system of concentric celestial spheres. At the center of the universe was Earth, and surrounding it were the spherical shells for the planets and the Sun. There was disagreement about the exact order of the planets and the Sun. Plato and Ptolemy ordered the celestial spheres differently:

universeaccordingtoplato={"Earth","Moon","Sun","Mercury","Venus","Mars","Jupiter","Saturn"};
universeaccordingtoptolemy={"Earth","Moon","Mercury","Venus","Sun","Mars","Jupiter","Saturn"};

Visualize and compare the two philosophers' universes using a set of labeled spherical shells:

celestialSphericalShellls={Ball[],SphericalShell[{1,2}],SphericalShell[{2,3}],SphericalShell[{3,4}],SphericalShell[{4,5}],SphericalShell[{5,6}],SphericalShell[{6,7}],SphericalShell[{7,8}]};

Row[Graphics3D[Table[{Hue[i/16],celestialSphericalShellls[[i]],Text[#[[i]],{0,0,i-.5}]},{i,8}],PlotRange->{{-9,9},{0,9},{-9,9}},ViewPoint->Front]&/@{universeaccordingtoplato,universeaccordingtoptolemy}]

A pearl is formed, layer by layer, by a mollusk. The pearl's optical properties come from light reflecting off many translucent layers, as opposed to only an opaque surface layer. The difference that translucent layers make can be seen by creating two sets of nested spherical shells that differ in opacity:

layers=30;pearl=Table[{Specularity[.3,100],Opacity[.2],SphericalShell[{0,0,0},{Sqrt[i],Sqrt[i+1]}]},{i,layers}];
nonpearl=Table[{Specularity[.3,100],Opacity[1],SphericalShell[{0,0,0},{Sqrt[i],Sqrt[i+1]}]},{i,layers}];

Row[Graphics3D[#,PlotRange->Sqrt[layers+1]*{{-1,1},{-1,.1},{-1,1}},ViewPoint->Back]&/@{pearl,nonpearl}]

Golf balls have multiple layers, the outer, dimpled shell, and one or more inner layers. Model the outer layer as the (RefLink[RegionDifference, paclet:ref/RegionDifference]) between a spherical shell and a collection of balls. Get a distribution for the dimples using the (RefLink[MeshCoordinates, paclet:ref/MeshCoordinates]) of a sphere's mesh:

points=MeshCoordinates@DiscretizeRegion[Sphere[],MaxCellMeasure->.02];

Discretize the region over an interval to get a "cut-away" view of half of it:

outershell=BoundaryDiscretizeRegion[RegionDifference[SphericalShell[{0,0,0},{.7,1}],Ball[points,.1]],{{-1,0},{-1,1},{-1,1}},MaxCellMeasure->.01];

Finally, make a ball for the inner core of the golf ball, offset from the center to get a visual separation of layers:

innercore=Graphics3D[{Gray,Ball[{0.3,0,0},.7]}];

Show[outershell,innercore]

A balloon can be approximated as a spherical shell. Suppose the balloon is made of 10 units of material. Find out how the thickness depends on the outer radius of the balloon:

t=ϵ/.First@Solve[Volume[SphericalShell[{ρ-ϵ,ρ}]]==10,ϵ,Reals]

Plot[t,{ρ,1,10},PlotRange->All,ImageSize->Small,AxesOrigin->{0,0}]

Suppose the material is such that under the given conditions it will break if it has thickness less than 0.1`. Find the largest possible outer radius balloon given that constraint:

MaxValue[{ρ,t≥0.1},ρ]

Here are some different cases of the solution visualized:

Graphics3D[{FaceForm[Red,Blue],Table[SphericalShell[{ρ-t,ρ}],{ρ,{2,3,4}}]},PlotRange->{All,All,{-4,0}}]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

A (RefLink[Ball, paclet:ref/Ball]) is the limit of (RefLink[SphericalShell, paclet:ref/SphericalShell]) as (Subscript[r, inner]) approaches 0:

Manipulate[Graphics3D[{FaceForm[Yellow,Blue],Ball[],SphericalShell[{2,0,0},{ri,1}]},PlotRange->{{-1,3},{0,1},{-1,1}},ImageSize->Small],{{ri,.5},.5,.00001}]

A (RefLink[Sphere, paclet:ref/Sphere]) is the limit of (RefLink[SphericalShell, paclet:ref/SphericalShell]) as (Subscript[r, inner]) goes to (Subscript[r, outer]):

Manipulate[Graphics3D[{Yellow,Sphere[],FaceForm[Yellow,Blue],SphericalShell[{2,0,0},{ri,1}]},PlotRange->{{-1,3},{0,1},{-1,1}},ImageSize->Small],{{ri,.5},.5,.9999}]

A (RefLink[SphericalShell, paclet:ref/SphericalShell]) is the closure of (RefLink[RegionDifference, paclet:ref/RegionDifference]) between two concentric (RefLink[Ball, paclet:ref/Ball]) regions:

(Subscript[ℛ, 1])=RegionUnion[RegionDifference[Ball[{0,0,0},2],Ball[{0,0,0},1]],Sphere[{0,0,0},1]];
(Subscript[ℛ, 2])=SphericalShell[{0,0,0},{1,2}];

RegionEqual[(Subscript[ℛ, 1]),(Subscript[ℛ, 2])]

(RefLink[SphericalShell, paclet:ref/SphericalShell]) is all points less than  ((Subscript[r, o])-(Subscript[r, i]))/2 from a sphere of radius  ((Subscript[r, o])+(Subscript[r, i]))/2:

(Subscript[ℛ, 1])=Sphere[{a,b,c},((Subscript[r, o])+(Subscript[r, i]))/2];
(Subscript[ℛ, 2])=SphericalShell[{a,b,c}, {(Subscript[r, i]),(Subscript[r, o])}];

Reduce[(Subscript[∀, {(Subscript[r, i]),(Subscript[r, o])},0<(Subscript[r, i])<(Subscript[r, o])])(RegionDistance[(Subscript[ℛ, 1]),{x,y,z}]≤(1/2) ((Subscript[r, o])-(Subscript[r, i]))⧦RegionMember[(Subscript[ℛ, 2]),{x,y,z}]),{x,y,z},Reals]

OpenersExampleSection5(Spacer1)Neat Examples  (3)

Random spherical shell collections:

Graphics3D[Table[{Opacity[.5,Hue[RandomReal[]]],SphericalShell[RandomReal[1,{3}],RandomReal[1]]},{50}]]

Corkscrewing spherical shells:

Graphics3D[Table[{Opacity[.5,Hue[i/20]],SphericalShell[{2Cos[i*Pi/5],2Sin[i*Pi/5],i},1]},{i,1,20}]]

Nested spherical shells:

Graphics3D[Table[{Opacity[.15,Hue[i/3]],SphericalShell[{0,0,0},{3i,3i+1}]},{i,1,5}]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Annulus, paclet:ref/Annulus])  ▪  (RefLink[Ball, paclet:ref/Ball])  ▪  (RefLink[Circle, paclet:ref/Circle])  ▪  (RefLink[Sphere, paclet:ref/Sphere])  ▪  (RefLink[ShellRegion, paclet:ref/ShellRegion])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Geometric Regions, paclet:guide/GeometricSpecialRegions])}})}})