How to sample uniformly from the surface of a (fish-) bowl?

64 Views Asked by At

Define a fish-bowl as a sphere comprised between two horizontal disks. That is, a sphere where we have replaced the top and bottom sectors by horizontal disks. See picture below.

How to sample uniformly from this surface?

My approach is to:

  1. Choose either the diskless bowl or one of the disk with probability proportional to its surface.
  2. Then, sample uniformly from this surface.
    • For the disks, we know how to do it in close form.
    • For the sphere with truncated sectors, I do rejection sampling by sampling from the sphere and rejecting until the sampled point is not in one of the removed sectors.

If my computation is correct, a surface area wholly comprised within a disk or within the truncated sphere has same probability. But what about the boundaries? My intuition is that the points neighbors to the circle of contact between a disk and the sphere won't be uniformly distributed.

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

The points will be uniformly distributed with respect to surface area - that's exactly what your algorithm guarantees. So I think you need to examine why your intuition says otherwise near the boundary. Perhaps the distribution won't look uniform there because the curvature changes.

You seem to want to connect the points sequentially. Then the lines that go through the interior of the sphere may seem to be sparser than those on the disks, since they have three dimensions to play in. If the result is somehow wrong for your application you need to select other than uniformly on area.