0

Hi want to generate 3d pores in the surface of sphere something like that. 3d pore

Please suggest me how it can be done in Mathematica.

mattiav27
  • 6,677
  • 3
  • 28
  • 64
user3704712
  • 189
  • 5

1 Answers1

5

There are some nice tools using Derived Geometric Regions that you can use for this

For example:

router = 2; (*outside radius*)
rinner = 1; (*inside radius*)
rsmall = 0.1; (*radius of small pores*)
nsmall = 40; (*number of small pores*)
radii = RandomReal[{rinner + 2*rsmall, router - 2 rsmall},nsmall];(*radial position of smallpores*)

angle1 = RandomReal[{0, 2 $\Pi$},nsmall];(*angular position of small pores*)
coords = Map[radii[[#]]*{0, Sin[angle1[[#]]], Cos[angle1[[#]]]} &,Range[nsmall]];(*coordinates of small pores*)
hollowsphere = RegionDifference[Ball[{0, 0, 0}, 2], Ball[{0, 0, 0}, 1]];(*first region interesection*)
smallspheres =  RegionUnion[Map[Ball[coords[[#]], rsmall] &, Range[nsmall]]];(*combine small pores*)

hollowsphereminussmallspheres = RegionDifference[hollowsphere, smallspheres] (*second region interesection*)
r1 = ImplicitRegion[x < 0, {x, y, z}]; (*For visualization*)
rplot = RegionIntersection[r1, hollowsphereminussmallspheres];

Then use this to plot:

RegionPlot3D[rplot, PlotPoints -> 100]

giving:

hollowsphere

Not exactly as the image but if you play with the arrangement of the pores you should get what you want.

Dunlop
  • 4,023
  • 5
  • 26
  • 41