Oloid

Author

Eric W. Weisstein
June 30, 2009

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

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

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

Two-Circle Roller

With[{n=20},
Show[Graphics3D[{Polygon[Table[{Sin[x], Cos[x], 0}, {x, 0, 2 Pi,Pi/n}]],Polygon[Table[{Sin[x] + Sqrt[2], 0, Cos[x]}, {x, 0, 2 Pi,Pi/n}]]}],Boxed -> False]
]

Oloid

With[{n=20},
Show[Graphics3D[{Polygon[Table[{Sin[x], Cos[x], 0}, {x, 0, 2 Pi,Pi/n}]],Polygon[Table[{Sin[x] + 1, 0, Cos[x]}, {x, 0, 2 Pi,Pi/n}]]}],Boxed -> False]
]

g=Show[Graphics3D[With[{n=10},
{
ConvexHull3D[Flatten[{Table[{Sin[x], Cos[x], 0}, {x, 0, 2 Pi,Pi/n}],Table[{Sin[x] + Sqrt[2], 0, Cos[x]}, {x, 0, 2 Pi,Pi/n}]},1]
]
}],Boxed->False]]

LiveGraphics3D

<<Utilities`LiveGraphics3D`

WriteLiveForm["oloid.m",g]//Timing

Equation

From Michael Trott
Mathematica GuideBook for Graphics

oloid[{x_,y_,z_}]:=81-720 y^2+1888 y^4+256 y^8-14080 x^2 y^2 z^2+1728 (x^2 y-y z^2)+3584 (y^3 z^2-x^2 y^3)-4096 (x^2 y^4+y^4 z^2)-864 (x^4-x^2 z^2+z^4)-2304 (x^4 z^2+x^2 z^4+x^4 z^4)+4608 (y z^4-x^4 y)-1280 (x^4 y^2+y^6+y^2 z^4)+6144 (x^4 y^3-y^3 z^4)+1536 (x^6-x^4 y^4+x^6 z^2+x^2 y^4 z^2-y^4 z^4+z^6+x^2 z^6)+3072 (x^6 y+x^2 y^2+x^2 y^5+x^4 y z^2+y^2 z^2+x^4 y^2 z^2-y^5 z^2-x^2 y z^4+x^2 y^2 z^4-y z^6)-2048 (x^6 y^2+y^2 z^6)-768 (x^8+z^8)

Plot

ContourPlot3D[oloid[{x,y,z}]==0,{x,-1.5,1.5},{y,-1.5,1.5},{z,-1.5,1.5},AxesLabel->{x,y,z}]

With[{r=1.01},
ContourPlot3D[oloid[{x,y,z}]==0,{x,-2,2},{y,-2,2},{z,-2,2},Boxed->False,Axes->False,RegionFunction->((#3^2+(#2+r/2)^2<r^2&&#2<0)||(#1^2+(#2-r/2)^2<r^2&&#2>0)&)]
]

RegionPlot3D[oloid[{x,y,z}]>0&&(z^2+(y+1/2)^2<1&&y<0||x^2+(y-1/2)^2<1&&y>0),{x,-1,1},{y,-1.5,1.5},{z,-1,1},PlotPoints->40,Boxed->False, Axes->False]

Volume

NIntegrate[Boole[oloid[{x,y,z}]>0&&(z^2+(y+1/2)^2<1&&y<0||x^2+(y-1/2)^2<1&&y>0)],{x,-1,1},{y,-1.5,1.5},{z,-1,1}]//Timing

NIntegrate[Boole[oloid[{x,y,z}]>0&&(z^2+(y+1/2)^2<1&&y<0||x^2+(y-1/2)^2<1&&y>0)],{x,-1,1},{y,-1.5,1.5},{z,-1,1},Method->"QuasiMonteCarlo",PrecisionGoal->3,MaxPoints->10^6]//Timing

2NIntegrate[Boole[oloid[{x,y,z}]>0&&(z^2+(y+1/2)^2<1&&y<0||x^2+(y-1/2)^2<1&&y>0)],{x,-1,1},{y,0,1.5},{z,-1,1},Method->"QuasiMonteCarlo",PrecisionGoal->3,MaxPoints->10^6]//Timing

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

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

Centroid

NIntegrate[{x,y,z}Boole[oloid[{x,y,z}]>0&&(z^2+(y+1/2)^2<1&&y<0||x^2+(y-1/2)^2<1&&y>0)],{x,-1,1},{y,-1.5,1.5},{z,-1,1},Method->"QuasiMonteCarlo",PrecisionGoal->3,MaxPoints->10^6]//Timing

Properties

(c=GaussianCurvature[oloid[{x,y,z}],{x,y,z}])//Timing

Simplify[c,(z^2+(y+1/2)^2<1&&y<0||x^2+(y-1/2)^2<1&&y>0)]

SortBy[%,ByteCount]