Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Based (copying) on andre'sandre's answer here is a modification.

Based (copying) on andre's answer here is a modification.

Based (copying) on andre's answer here is a modification.

deleted 3 characters in body
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
face = Import["http://cliparts.co/cliparts/6Ty/ogn/6TyognE8c.png"] 

enter image description here

  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"] 

enter image description here enter image description here

face = Import["http://cliparts.co/cliparts/6Ty/ogn/6TyognE8c.png"] 

enter image description here

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"] 

enter image description here

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"] 

enter image description here enter image description here

added 90 characters in body
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
Table[Show[cowTable[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 -> Framed[coeff]StringForm["(``), V=``", coeff, vcow], ImageSize -> 200], {coeff, 0, 1, 0.25}] 

enter image description hereenter image description here

NIntegrate[1,{x,y,z}∈MeshRegion[(#((Norm[#]/Rcow)^-1))&/@cow[[1,2,1]], cow[[1,2,2]]]] 

3.88847

Although the final radius is same as Rcow, You do not get Vcow for 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.

Table[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 -> Framed[coeff], ImageSize -> 200], {coeff, 0, 1, 0.25}] 

enter image description here

NIntegrate[1,{x,y,z}∈MeshRegion[(#((Norm[#]/Rcow)^-1))&/@cow[[1,2,1]], cow[[1,2,2]]]] 

3.88847

Although the final radius is same as Rcow, You do not get Vcow for the volume because, on this sphere, several layers are overlapping on each other (reminds me the length of British coastline).

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}] 

enter image description here

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.

added 517 characters in body
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
Loading
added 204 characters in body
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
Loading
Tweeted twitter.com/StackMma/status/770364864858644480
added 28 characters in body
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
Loading
added 549 characters in body
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
Loading
Source Link
Sumit
  • 16k
  • 2
  • 36
  • 75
Loading