Cushion Surface

Author

Eric W. Weisstein
July 1, 2014

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

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

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

Cushion

Equation

cushion:=z^2 x^2-z^4-2z x^2+2z^3+x^2-z^2-(x^2-z)^2-y^4-2x^2 y^2-y^2z^2+2y^2 z+y^2;

FullSimplify[cushion]

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

Surface

V5

<<Graphics`ContourPlot3D`

Through[{Minimize,Maximize}[{z,cushion==0},{x,y,z}]]

Maximize[{x^2+y^2,cushion==0},{x,y,z}]

FullSimplify[Sqrt[First[%]]]

N[%]

With[{r=1.26},
ContourPlot3D[cushion,{x,-r,r},{y,-r,r},{z,-1/3,1},PlotPoints->7,Boxed->False]
]//Timing

V6

With[{r=1.3},ContourPlot3D[cushion==0,{x,-r,r},{y,-r,r},{z,-r,r},Boxed->False,Axes->False,PlotPoints->20,MaxRecursion->3]]

Properties

k=FullSimplify[GaussianCurvature[cushion,{x,y,z}]]

ByteCount/@k

k[[2]]

Volume

RegionPlot3D[-(x^4)-(y^4)+(y^2) (1-(-2+z) z)-(z^2) (2+(-2+z) z)+(x^2) (1-2 (y^2)+(z^2))>0,{x,-1.3,1.3},{y,-1.3,1.3},{z,-.5,1.2}]

NIntegrate[Boole[-(x^4)-(y^4)+(y^2) (1-(-2+z) z)-(z^2) (2+(-2+z) z)+(x^2) (1-2 (y^2)+(z^2))>0],{x,-1.3,1.3},{y,-1.3,1.3},{z,-.5,1.2}]//Timing

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

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

Cylindrical

POV-Ray

<<Utilities`POVray`

POVCoefficients[cushion,{x,y,z}]

Cushion Corner

eqn=(-1+x^3)^2+(-1+y^3)^2+(-1+z^2)^3==0;

Extent

MinValue[{#,eqn},{x,y,z}]&/@{x,y,z}

MaxValue[{#,eqn},{x,y,z}]&/@{x,y,z}//FullSimplify

Surface

ContourPlot3D[(-1+x^3)^2+(-1+y^3)^2+(-1+z^2)^3==0,{x,0,(2^(1/3))},{y,0,(2^(1/3))},{z,-1,1}]

RegionPlot3D[(-1+x^3)^2+(-1+y^3)^2+(-1+z^2)^3<0,{x,0,(2^(1/3))},{y,0,(2^(1/3))},{z,-1,1},MaxRecursion->7,PlotPoints->25]

Volume

Cartesian

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

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

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

Cylindrical

FullSimplify[First[eqn]/.{x->r Cos[θ],y->r Sin[θ]},r>0&&0<θ<2π]

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

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

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

Spherical

FullSimplify[First[eqn]/.{x->r Cos[θ]Sin[ϕ],y->r Sin[θ]Sin[ϕ],z->Cos[ϕ]},r>0&&0<θ<2π&&0<ϕ<π]

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

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