1
$\begingroup$

enter image description here

I am trying to determine how the Dirichlet eigenvalues of the Laplacian of a circular region change. I would calculate the principal eigenvaluen of this image, and gradually decrease the radius of the deleted regions so that figure approaches a circle.

The position, number and size of the deletions should be random if possible, but once fixed, remain constant throughout the calculation process.

(The general outline of the process I follow is given in my question here).

$\endgroup$
  • $\begingroup$ Like this: DiscretizeRegion[Fold[RegionDifference, Disk[], Disk @@@ {{{0, 0}, 1/5}, {{2/3, 1/3}, 1/20}, {{1/2, -1/4}, 1/8}}]]? $\endgroup$ – J. M. will be back soon Jun 30 '16 at 16:21
  • $\begingroup$ yes basically this @J.M. $\endgroup$ – Aritra Saha Jun 30 '16 at 16:44
3
$\begingroup$

Here is a modified version of my previous answer, which prevents overlap between the randomly selected "holes" in the circular pattern. You can adjust:

  • the radius of the Disk from which the center points are selected, which is currently set to $0.7$ to only allow holes fully enclosed by the circular region;
  • the minimum allowed distance between the selected centers. This is currently set to $0.5$, i.e. more than twice the largest radius of the holes, to give well-separated holes.

Here is the new code:

While[
 Not@(And @@ Thread[
     centers = RandomPoint[Disk[{0, 0}, 0.7], 3]; 
     EuclideanDistance @@@ Subsets[centers, {2}] > 0.5
    ])
]

Function[
  {radius}, 
  DiscretizeRegion[RegionDifference[Disk[], RegionUnion[Disk[#, radius] & /@ centers]]]
] /@ Range[0.2, 0.025, -0.025]

Mathematica graphics

$\endgroup$
  • $\begingroup$ This is exactly what I wanted. Thanks. Can this method be generalized for deletions in any shape? @MarcoB $\endgroup$ – Aritra Saha Jun 30 '16 at 16:51
  • $\begingroup$ With this method you can easily end up with inner circles that are so close to the boundary that they go over, like this. If you wanted to avoid that you'd have to make the Disk inside the RandomChoice have a radius smaller by 0.2 $\endgroup$ – Jason B. Jun 30 '16 at 17:06
  • $\begingroup$ @guy141 Sure, just change the region from which you are subtracting. For instance, if you use Polygon[1.5 CirclePoints[5]] instead of Disk[] as the first argument of RegionDifference in the code above, you obtain this result. $\endgroup$ – MarcoB Jun 30 '16 at 17:08
  • $\begingroup$ For some reason, this runs faster if you use DiscretizeGraphics@RegionPlot[ instead of DiscretizeRegion[ $\endgroup$ – Jason B. Jun 30 '16 at 17:12
  • $\begingroup$ @guy141 Also, JasonB raises a good point about the center selection; you might want to change the code to centers = RandomPoint[Disk[{0, 0}, 0.8], 3] to prevent clipped disks. $\endgroup$ – MarcoB Jun 30 '16 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.