Hemisphere

Author

Eric W. Weisstein
June 10, 2014

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Surfaces/Hemisphere.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Hemisphere.html.

©2014 Wolfram Research, Inc. except for portions noted otherwise

Figure

n=20;
Hemisphere:=Graphics3D[{ParametricPlot3D[{Cos[t]Sin[p],Sin[t]Sin[p],Cos[p]},{t,0,2Pi},{p,0,Pi/2},Boxed->False,Axes->False,DisplayFunction->Identity][[1]],Polygon[Table[{Cos[2Pi i/n],Sin[2Pi i/n],0},{i,n}]]}]

WriteLiveForm[hemisphe.m,Show[Hemisphere,opts]]

Show[Graphics3D[{EdgeForm[],Hemisphere[[1]]}],Boxed->False]

Volume

vol=Integrate[ρ^2 Cos[ϕ],{θ,0,2Pi},{ϕ,0,Pi/2},{ρ,0,r}]

π Integrate[(r^2-z^2),{z,0,r}]

<<Graphics`InequalityGraphics`

With[{r=1},InequalityPlot3D[x^2+y^2+z^2<r^2&&z>0,{x},{y},{z}]]

Integrate[Boole[x^2+y^2+z^2<r^2&&z>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->r>0]

Cylindrical Coordinates

Integrate[r,{θ,0,2π},{r,0,R},{z,0,Sqrt[R^2-r^2]},Assumptions->R>0]//Timing

Spherical Coordinates

Integrate[ρ^2 Sin[ϕ],{θ,0,2π},{ϕ,0,π/2},{ρ,0,R}]//Timing

Cartesian Coordinates

Integrate[1,{x,-R,R},{y,-Sqrt[R^2-x^2],Sqrt[R^2-x^2]},{z,0,Sqrt[R^2-x^2-y^2]}]//Timing

Inequality

V7

Integrate[Boole[x^2+y^2+z^2≤R^2],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->R>0]//Timing

Integrate[Boole[x^2+y^2+z^2≤R^2],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->R>0,GenerateConditions->True]//Timing

Integrate[Boole[(x-x0)^2+(y-y0)^2+(z-z0)^2≤R^2],{x,-∞,∞},{y,-∞,∞},{z,z0,∞},Assumptions->R>0&&(x0|y0|z0)∈Reals]//Timing

V8

Integrate[Boole[x^2+y^2+z^2≤R^2],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->R>0]//Timing

Integrate[Boole[x^2+y^2+z^2≤R^2],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->R>0,GenerateConditions->True]//Timing

Integrate[Boole[(x-x0)^2+(y-y0)^2+(z-z0)^2≤R^2],{x,-∞,∞},{y,-∞,∞},{z,z0,∞},Assumptions->R>0&&(x0|y0|z0)∈Reals]//Timing

Properties

Centroid

Assuming[a>0,Centroid[x^2+y^2+z^2<a^2&&z>0,{x,y,z}]]//Timing

zbar=π Integrate[z(r^2-z^2),{z,0,r}]

zbar/vol

zz=Integrate[z Boole[x^2+y^2+z^2<r^2&&z>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->r>0]

zbar = (zz/((2/3)π (r^2)))

Inertia Tensor

About origin

With[{ρ=(M/((2/3)π (a^3)))},ρ Integrate[Boole[r<a]InertiaTensor[{r,θ,ϕ},"CoordinateSystem"->"Spherical"](r^2)Sin[ϕ],{r,0,∞},{θ,0,2π},{ϕ,0,π/2},Assumptions->a>0]
]//Timing

With[{ρ=(M/((2/3)π (a^3)))},ρ Integrate[Boole[x^2+y^2+z^2<a^2]InertiaTensor[{x,y,z},"CoordinateSystem"->"Cartesian"],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->a>0]
]//Timing

About centroid

With[{ρ=(M/((2/3)π (a^3)))},ρ Integrate[Boole[x^2+y^2+(z-3a/8)^2<a^2]InertiaTensor[{x,y,z},"CoordinateSystem"->"Cartesian"],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->a>0]
]//Timing

divide by 2:

Volume

Integrate[Boole[r<a](r^2)Sin[ϕ],{r,0,∞},{θ,0,2π},{ϕ,0,π/2},Assumptions->a>0]//Timing

Integrate[Boole[x^2+y^2+z^2<a^2],{x,-∞,∞},{y,-∞,∞},{z,0,∞},Assumptions->a>0]//Timing

Mean Radius

(1/((2 π)/3))Integrate[(Sqrt[(x^2)+(y^2)+(z^2)])Boole[x^2+y^2+z^2≤1],{x,-∞,∞},{y,-∞,∞},{z,0,∞}]//Timing

(1/((2 π)/3))Integrate[r (r^2)Sin[ϕ],{r,0,1},{ϕ,0,π/2},{θ,0,2π}]//Timing

Mean Square Radius

(1/((2 π)/3))Integrate[((x^2)+(y^2)+(z^2))Boole[x^2+y^2+z^2≤1],{x,-∞,∞},{y,-∞,∞},{z,0,∞}]//Timing

(1/((2 π)/3))Integrate[(r^2)(r^2)Sin[ϕ],{r,0,1},{ϕ,0,π/2},{θ,0,2π}]//Timing

Vector Properties

eqn=a{Cos[u] Sin[v],Sin[u] Sin[v],Cos[v]};
rules={Abs[x_]^(n_/;Mod[n,2]==0):>x^n};
assum=a>0&&0<u<2π&&0<v<π/2;

Vector Length

Assuming[assum,FullSimplify[Norm[eqn]/.rules]]

Normal Vector

Assuming[assum,FullSimplify[NormalVector[eqn,{u,v}]/.rules]]