0

Here's a simple example, where there are built-in functions to describe both objects.

{shell, ball} = DiscretizeGraphics /@ {Sphere[], Ball[]}

enter image description here

The first of these is a 2D region embedded in 3D, the other is a 3D region.

RegionDimension /@ {shell, ball}
RegionEmbeddingDimension /@ {shell, ball}
Area /@ {shell, ball}
Volume /@ {shell, ball}
(* {2, 3} *)
(* {3, 3} *)
(* {12.5066, ∞} *)
(* {0, 4.15297} *)

Show[#, PlotRange -> {{0, 1}, {0, 1}, {0, 1}}] & /@ {shell, ball}

enter image description here

Is there any method to essentially convert the shell into the ball? In practice, the shell would come from discretizing a Plot3D or some other type of method, and I want to create a filled object from that shell

Jason B.
  • 68,381
  • 3
  • 139
  • 286
  • 3
    Have you seen this? – RunnyKine Apr 13 '16 at 08:19
  • 1
    @RunnyKine - sometimes you just can't come up with the right search terms. I'll delete, or close as duplicate. TriangulateMesh@BoundaryDiscretizeGraphics@Sphere[] is the answer. Thanks! – Jason B. Apr 13 '16 at 08:22
  • Yeah, sometimes the titles don't tell you the real story. :) – RunnyKine Apr 13 '16 at 08:24
  • I'll leave it up for others' future searches, but chris's title is pretty accurate description of what I'm trying to do here – Jason B. Apr 13 '16 at 08:25
  • @RunnyKine - I can't get this method to work on the more complicated example I'm trying, but it's too localized I think for a post here. I put the code in the chatroom if you could look at it – Jason B. Apr 13 '16 at 10:53
  • Did you see my message in chat? – RunnyKine Apr 13 '16 at 17:29
  • @RunnyKine I did, haven't had time to digest yet (its amazing how long it takes to get three kids to bed lol). Thanks for putting in so much work, I had thought of your alpha shape function but didn't know there was a3D version. Is a lot of effort to get the volume available to graze in for a goat in space tethered to a spherical silo :-) – Jason B. Apr 13 '16 at 18:34
  • Hope you succeeded in putting the kids to bed :). Yeah, there's a 3D version of it, I posted it long before the 2D one you found. I actually have a more general one that handles both 2D and 3D depending on the input data. – RunnyKine Apr 13 '16 at 20:48

0 Answers0