Lemon Surface

Author

Eric W. Weisstein
February 19, 2020

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

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

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

Slice

LemonSlice[R_,r_]:=ParametricPlot[{{x,Sqrt[R^2-(x+r)^2]},{x,-Sqrt[R^2-(x+r)^2]},{-x,Sqrt[R^2-(x+r)^2]},{-x,-Sqrt[R^2-(x+r)^2]}},{x,0,R-r},AspectRatio->Automatic,Axes->None,PlotStyle->Red,PlotRange->{{-(R-r),R-r},{-Sqrt[R^2+r^2],Sqrt[R^2+r^2]}}]

LemonSlice[1.,.5]

Surface

Lemon[R_,r_]:=RevolutionPlot3D[Evaluate[{x,#Sqrt[R^2-(x+r)^2]}&/@{-1,1}],{x,0,R-r},PlotStyle->Yellow]

Manipulate[Lemon[1,r],{{r,.5},0,1},SaveDefinitions->True]

Equation

Parametric

Solve[z^2==R^2-(x+r)^2,x]

Lemon2[r_,R_][u_,v_]:={Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v}

With[{r=.5,R=1},ParametricPlot3D[Lemon2[r,R][u,v],{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},PlotRange->All]]

Cartesian

Expand[((Sqrt[x^2+y^2])+r)^2-R^2+z^2==0]

2 r (Sqrt[(x^2)+(y^2)])==-((r^2)-(R^2)+(x^2)+(y^2)+(z^2))

eqn=FullSimplify[((((r^2)-(R^2)+(x^2)+(y^2)+(z^2)))^2)==4(r^2)((x^2)+(y^2))]

FullSimplify[Expand[Subtract@@eqn]]

AlgebraicDegree[eqn,{x,y,z}]

With[{r=.95,R=1},
ContourPlot3D[((((r^2)-(R^2)+(x^2)+(y^2)+(z^2)))^2)==4 (r^2) ((x^2)+(y^2)),{x,-.1,.1},{y,-.1,.1},{z,-1,1},Boxed->False,Axes->False,Mesh->False,BoxRatios->{1,1,1},PlotPoints->20]
]

Region

ParametricPlot

Solve[z^2==R^2-(x+r)^2,x]

With[{r=.5,R=1},ParametricPlot3D[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},PlotRange->All]]

RegionPlot3D

With[{R=1,r=.5},RegionPlot3D[(r^4)-2 (r^2) ((R^2)+(x^2)+(y^2)-(z^2))+(((-(R^2)+(x^2)+(y^2)+(z^2)))^2)>0,{x,-(R-r),R-r},{y,-(R-r),R-r},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},BoxRatios->Automatic]]

ContourPlot3D

With[{R=1,r=.5},ContourPlot3D[z^2==R^2-((Sqrt[x^2+y^2])+r)^2,{x,-(R-r),R-r},{y,-(R-r),R-r},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},BoxRatios->Automatic]]

ParametricRegion

Solve[z^2==R^2-(x+r)^2,x]

Block[{R=1,r=.5},Region@ParametricRegion[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}}]]

Properties

Centroid

With[{v=(2/3) π ((Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))-3 r (R^2) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])},Assuming[{0<r<R},FullSimplify[(1/v)Integrate[{ρ Cos[θ],ρ Sin[θ],z}ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{θ,0,2π},{ρ,0,-r+(Sqrt[(R^2)-(z^2)])}]]]]//Timing

FirstFundamentalForm

FullSimplify[FirstFundamentalForm[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,v}]]

Block[{R=1,r=.5},Region@ParametricRegion[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}}]]

With[{ϕ=(-r+(Sqrt[(R^2)-(v^2)])),ψ=1},{(ϕ^2),0,((D[ϕ,v])^2)+((D[ψ,v])^2)}]//FullSimplify

GaussianCurvature

FullSimplify[GaussianCurvature[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,v}],0<r<R&&-(Sqrt[(R^2)-(r^2)])<v<(Sqrt[(R^2)-(r^2)])]//.(R-v) (R+v)->R^2-v^2

InertiaTensor

InertiaMatrix[{ρ,θ,z},"CoordinateSystem"->"Cylindrical"]

With[{v=(2/3) π ((Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))-3 r (R^2) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])},Assuming[{0<r<R},FullSimplify[(1/v)Integrate[InertiaMatrix[{ρ,θ,z},"CoordinateSystem"->"Cylindrical"]ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{θ,0,2π},{ρ,0,-r+(Sqrt[(R^2)-(z^2)])}]]]]//Timing

i={{(((Sqrt[-(r^2)+(R^2)]) (2 (r^4)+101 (r^2) (R^2)+32 (R^4))-15 r (R^2) (4 (r^2)+5 (R^2)) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])/(40 ((Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))-3 r (R^2) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))]))),0,0},{0,(((Sqrt[-(r^2)+(R^2)]) (2 (r^4)+101 (r^2) (R^2)+32 (R^4))-15 r (R^2) (4 (r^2)+5 (R^2)) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])/(40 ((Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))-3 r (R^2) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))]))),0},{0,0,(((Sqrt[-(r^2)+(R^2)]) (6 (r^4)+83 (r^2) (R^2)+16 (R^4))-15 r (R^2) (4 (r^2)+3 (R^2)) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])/(20 ((Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))-3 r (R^2) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])))}};

i/.r->0

Limit[i,r->R,"Direction"->1]

MeanCurvature

FullSimplify[MeanCurvature[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,v}],0<r<R&&-(Sqrt[(R^2)-(r^2)])<v<(Sqrt[(R^2)-(r^2)])]//.(R-v) (R+v)->R^2-v^2

PrincipalCurvatures

FullSimplify[PrincipalCurvatures[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,v}],0<r<R&&-(Sqrt[(R^2)-(r^2)])<v<(Sqrt[(R^2)-(r^2)])]//.(R-v) (R+v)->R^2-v^2

SecondFundamentalForm

FullSimplify[SecondFundamentalForm[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,v}],0<r<R&&-(Sqrt[(R^2)-(r^2)])<v<(Sqrt[(R^2)-(r^2)])]/.(R-v) (R+v)->R^2-v^2

With[{ϕ=(-r+(Sqrt[(R^2)-(v^2)])),ψ=1},{-((Abs[ϕ]D[ψ,v])/(Sqrt[((D[ϕ,v])^2)+((D[ψ,v])^2)])),0,...}]//FullSimplify

Surface Area

SurfaceArea

SurfaceArea[s{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{s,0,1}]

SurfaceArea@Region@ParametricRegion[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}}]

SurfaceArea@Region@ParametricRegion[{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}}]

SurfaceArea[ParametricRegion[s{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{s,0,1}}]]

By hand as a surface of revolution

y[x_]:=(Sqrt[R^2-(x+r)^2])

Block[{R=1,r=.5},Plot[y[x],{x,0,R-r}]]

FullSimplify[y[x](Sqrt[1+D[y[x],x]^2]),0<r<R&&-(R-r)<x<R-r]

2π Integrate[%,{x,-(R-r),R-r}]

2π R ((R-r)-(-(R-r)))//Simplify

Volume

Solid of revolution by shells

Solve[z^2==R^2-(x+r)^2,z]

v=2Assuming[0<r<R,FullSimplify[2π Integrate[x(Sqrt[-(r^2)+(R^2)-2 r x-(x^2)]),{x,0,R-r}]]]

Simplify[v/.r->0,R>0]

Limit[v,r->R,Direction->1]

FullSimplify[Subtract@@{(1/3) π (-3 π r (R^2)+2 (Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))+6 r (R^2) ArcTan[(r/(Sqrt[-(r^2)+(R^2)]))]),(2/3) π ((Sqrt[-(r^2)+(R^2)]) ((r^2)+2 (R^2))-3 r (R^2) ArcCot[(r/(Sqrt[-(r^2)+(R^2)]))])},Assumptions->0<r<R]

Solid of revolution by washers

Block[{R=1,r=.5},Plot[(Sqrt[R^2-(x+r)^2]),{x,0,R-r},AspectRatio->Automatic]]

Solve[z^2==R^2-(x+r)^2,x]

v=Assuming[0<r<R,2FullSimplify[π Integrate[(((-r+(Sqrt[(R^2)-(z^2)])))^2),{z,0,(Sqrt[(R^2)-(r^2)])}]]]

Integrate Boole Cylindrical

Solve[z^2==R^2-(x+r)^2,x]

v=Assuming[{0<r<R},FullSimplify[2π Integrate[ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,0,-r+(Sqrt[(R^2)-(z^2)])}]]]

Simplify[v/.r->0,R>0]

Limit[v,r->R,Direction->1]

Integrate Boole

Assuming[{0<r<R},Integrate[Boole[z^2<R^2-((Sqrt[x^2+y^2])+r)^2],{x,-(R-r),R-r},{y,-(R-r),R-r},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}]]//Timing

Assuming[{0<r<R},Integrate[Boole[z^2<R^2-((Sqrt[x^2+y^2])+r)^2],{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{x,-(R-r),R-r},{y,-(R-r),R-r}]]//Timing

Assuming[{0<r<R},8Integrate[Boole[z^2<R^2-((Sqrt[x^2+y^2])+r)^2],{z,0,(Sqrt[(R^2)-(r^2)])},{x,0,R-r},{y,0,R-r}]]//Timing

Assuming[0<r<R,8Integrate[Boole[(r^4)-2 (r^2) ((R^2)+(x^2)+(y^2)-(z^2))+(((-(R^2)+(x^2)+(y^2)+(z^2)))^2)>0],{x,0,∞},{y,0,∞},{z,0,∞}]]//Timing

Volume

Volume[ParametricRegion[s{Cos[u](-r+(Sqrt[(R^2)-(v^2)])),Sin[u](-r+(Sqrt[(R^2)-(v^2)])),v},{{s,0,1},{u,0,2π},{v,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}}]]//Timing

Other Lemons

eqn1=a^4(x^2+z^2)==-(-a+y)^3 y^3;

eqn2=x^2-y^3 z^3==0;

GraphicsGrid[{{ContourPlot3D[Evaluate[eqn1],{x,-1/8,1/8},{y,0,1},{z,-1/8,1/8},BoxRatios->Automatic,ContourStyle->Yellow,PlotLabel->Style["citrus surface",Italic]],
ContourPlot3D[Evaluate[eqn2],{x,-2,2},{y,-2,2},{z,-2,2},RegionFunction->(#1^2+#2^2+#3^2<2^2&),ContourStyle->Yellow,PlotLabel->Style["limão surface",Italic]]}},ImageSize->400]

Citrus

Extent

Simplify[MinValue[{#,a^4(x^2+z^2)==-(-a+y)^3 y^3},{x,y,z}]&/@{x,y,z},a>0]

Simplify[MaxValue[{#,eqn1},{x,y,z}]&/@{x,y,z},a>0]

Cross Section

x^2+z^2==-(-1+y)^3 y^3/.z->0

ContourPlot[(x^2)==-(((-1+y))^3) (y^3),{y,0,1},{x,-1/8,1/8},AspectRatio->Automatic,MaxRecursion->4,ContourStyle->Red]

Plot[(Sqrt[-(((-1+y))^3) (y^3)]),{y,0,1},AspectRatio->Automatic]

Volume

RegionPlot3D[x^2+z^2<-(-1+y)^3 y^3,{x,-1/8,1/8},{y,0,1},{z,-1/8,1/8},BoxRatios->Automatic,AxesLabel->{x,y,z}]

NIntegrate[Boole[x^2+z^2<-(-1+y)^3 y^3],{x,-1/8,1/8},{y,0,1},{z,-1/8,1/8}]

...bug...

NIntegrate[Boole[x^2+z^2<-(-1+y)^3 y^3],{x,-1/8,1/8},{z,-1/8,1/8},{y,0,1}]

π Integrate[-(((-1+y))^3) (y^3),{y,0,1}]

N[%]

Volume Cylindrical

FullSimplify[a^4(x^2+z^2)+(-a+y)^3 y^3/.{x->r Cos[θ],y->z,z->r Sin[θ]},r>0&&0<θ<2π]

Integrate[Boole[a^4 (r^2)+(((-a+z))^3) (z^3)<0]r,{θ,0,2π},{r,0,∞},{z,-∞,∞},Assumptions->a>0]

Integrate[Boole[a^4 (r^2)+(((-a+z))^3) (z^3)<0]r,{θ,0,2π},{z,-∞,∞},{r,0,∞},Assumptions->a>0]

Volume Spherical

FullSimplify[x^2+z^2+(-1+y)^3 y^3/.{x->r Cos[θ]Sin[ϕ],y->r Cos[ϕ],z->r Sin[θ]Sin[ϕ]},r>0&&0<θ<2π&&0<ϕ<π]

Integrate[Boole[(r^2) (r ((Cos[ϕ])^3) (((-1+r Cos[ϕ]))^3)+((Sin[ϕ])^2))<0](r^2)Sin[ϕ],{θ,0,2π},{r,0,∞},{ϕ,0,π}]//Timing

Integrate[Boole[(r^2) (r ((Cos[ϕ])^3) (((-1+r Cos[ϕ]))^3)+((Sin[ϕ])^2))<0](r^2)Sin[ϕ],{θ,0,2π},{ϕ,0,π},{r,0,∞}]//Timing

Centroid

Integrate[{r Cos[θ],z,r Sin[θ]}Boole[a^4(r^2)+(((-a+z))^3) (z^3)<0]r,{θ,0,2π},{z,-∞,∞},{r,0,∞},Assumptions->a>0]/((π (a^3))/140)

Inertia Tensor

InertiaMatrix[{r,θ,z},"CoordinateSystem"->"Cylindrical"]

(M/(π/140))Integrate[InertiaMatrix[{r,θ,z},"CoordinateSystem"->"Cylindrical"]Boole[(r^2)+(((-1+z))^3) (z^3)<0]r,{θ,0,2π},{z,-∞,∞},{r,0,∞}]

(M/(π/140))Integrate[InertiaTensor[{r,θ,z},"CoordinateSystem"->"Spherical"]Boole[(r^2) (r ((Cos[ϕ])^3) (((-1+r Cos[ϕ]))^3)+((Sin[ϕ])^2))<0](r^2)Sin[ϕ],{θ,0,2π},{ϕ,0,π},{r,0,∞}]//Timing

Surface Area

FullSimplify[(Sqrt[-(((-1+y))^3) (y^3)])(Sqrt[1+((D[(Sqrt[-(((-1+y))^3) (y^3)]),y])^2)]),0<y<1]

2π Integrate[%,{y,0,1}]