Being a theoretical physicist, I always have a great respect for Spherical Cow. So I thought about making one myself. I am not sure how can I create (something considered to be the simplest!) this marvel.
One possible way could be using the ExampleData
for Cow
and map it on a sphere - something like
Show[ExampleData[{"Geometry3D", "Cow"}],
Graphics3D[Sphere[{-.1, 0, 0.05}, .25]]]
I was wondering if there is a way to apply a continuous deformation to the data to get the final sphere (like blowing a balloon).
Another possible way (which is probably the Spherical cow approach of making a Spherical cow) is to map an image of a cow on a sphere.
face = Import["http://cliparts.co/cliparts/6Ty/ogn/6TyognE8c.png"]
cow = Graphics[{Disk[10 {RandomReal[], RandomReal[]}, RandomReal[]] & /@ Range[20],
Inset[face]}, AspectRatio -> 1,ImageSize -> 500];
ParametricPlot3D[{Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]}, {u, 0, 2 Pi},
{v, 0, Pi}, Mesh -> None, PlotPoints -> 100,
TextureCoordinateFunction -> ({#4, 1 - #5} &), Boxed -> False,
PlotStyle -> Texture[Show[cow, ImageSize -> 1000]],
Lighting -> "Neutral", Axes -> False, RotationAction -> "Clip"]
Then it is difficult to manage the legs and the tail.
Fixed volume cow
Based (copying) on andre's answer here is a modification.
First, we calculate the volume of the cow and the radius of equivalent sphere
cow = ExampleData[{"Geometry3D", "Cow"}];
Vcow = NIntegrate[1, {x, y, z} ∈ MeshRegion[cow[[1, 2, 1]], cow[[1, 2, 2]]]]
Rcow = (3/(4 Pi) Vcow)^(1/3)
0.674671
0.544086
Now insert Rcow
in the scaling
Table[vcow = NIntegrate[1, {x, y, z} ∈ MeshRegion[(# ((Norm[#]/Rcow)^-coeff)) & /@
cow[[1, 2, 1]], cow[[1, 2, 2]]]];
Show[cow /. GraphicsComplex[array1_, rest___] :>
GraphicsComplex[(# ((Norm[#]/Rcow)^-coeff)) & /@ array1, rest],
Axes -> True, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}} 0.6,
Boxed -> True, PlotLabel -> StringForm["(``), V=``", coeff, vcow], ImageSize -> 200],
{coeff, 0, 1, 0.25}]
Although the final radius is same as Rcow
, the volume keeps increasing because, on this sphere, several layers are overlapping on each other (reminds me the length of British coastline) which causes overcounting during the numerical integration.
NIntegrate
to a sequence of gradually transformed cows, applySequenceLimit
, and evaluate the results for spherical adherence. Also I have to say, the attention this question and answers have is getting blown up of proportion. $\endgroup$MeshRegion
removing the duplicate points. One thing for sure - spherical cow is not the simplest cow as it claimed to be. $\endgroup$