Evenly spaced points in oddly shaped volume?

  • Context: Graduate 
  • Thread starter Thread starter blrnd
  • Start date Start date
  • Tags Tags
    Points Volume
Click For Summary

Discussion Overview

The discussion revolves around the problem of distributing a specified number of points evenly within a 3D volume that has a non-standard shape, such as that of human organs. Participants explore various methods for achieving this distribution and address the challenge of determining whether a point lies inside or outside the defined volume.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant suggests generating evenly distributed points in a cube surrounding the object and then removing points that fall outside the shape, emphasizing the need for a mathematical description of the shape.
  • Another participant proposes finding a transformation that maps points from a cube to the desired object, referencing tensor theory and deformation theory as potential areas for further exploration.
  • A different approach involves simulating 'charged particles' that repel each other until they reach a stable average distance, which could help in distributing points evenly.
  • One participant outlines a method involving the random generation of a large number of points, followed by an iterative process to remove points based on their proximity to others, which is claimed to yield a more uniform distribution.
  • To determine point inclusion within the volume, a mathematical description using bounding planes is discussed, where the orientation of the planes helps define whether a point is inside or outside the volume.

Areas of Agreement / Disagreement

Participants present multiple competing methods for distributing points and determining point inclusion, with no consensus reached on a single best approach. The discussion remains unresolved regarding the most effective technique.

Contextual Notes

Some methods depend on specific mathematical descriptions of the volume, and the effectiveness of the proposed algorithms may vary based on the complexity of the shape in question.

blrnd
Messages
1
Reaction score
0
This might be more of an algorithm question than a math question: how do I go about distributing n points as evenly as possible in a 3D volume of non-basic shape? Think human organs or the like. A related question is how do you know when you're inside a 3D volume versus outside it?

Thanks!
 
Physics news on Phys.org
The easiest way, I think, would be to generate evenly distributed points in a cube around the object of interest, and then delete all of the points that fall outside of the shape. Of course, this requires that you have a mathematical description of the shape of interest, so that you can find the "outside".

May I ask what this is for? If you're trying to calculate its volume (an application where techniques like these come up), then uniformly distributed points are usually not the best way to go.
 
Last edited:
Hey blrnd and welcome to the forums.

Building on Number Nine's advice, I suggest you find a transformation that takes the cube to your desired object and then map the generated points in the cube to that object.

If you want more information look into tensor theory and deformation theory in continuum mechanics. By translating the cube to the object, you simulate the random uniform distribution in the cube and then just transform it.

You could possibly even find a transformation that allows you to get an actual 3D PDF for the object itself but this is going to be a lot harder and is not necessary for simulation.
 
Hi blrnd,
I remember having done exactly this a long time ago, the technique I found was to spread 'charged particles' randomly and simulate them repealing each other until the average distance would stay stable.
Cheers...
 
Another way that works in a volume of arbitrary dimensions is as follows:

(1) Randomly generate many more points in the volume than you need, say 100n points.
(2) Step through the points and find the point whose distance to any other point is the smallest. Delete this point.
(3) Repeat step 2 until you are down to the n points that you want.

This algorithm is simple to code, and generates points that are more or less uniformly distributed through the volume.

To determine whether a point is inside or outside of the volume, you need to have some mathematical description of the volume. Often this is done by having a set of bounding planes. The orientation of the planes is then defined so that one side of the plane points 'inward', and and one side points 'outward'. A point is inside of the volume if it is on the inward side of all planes, and it is outside if it is on the outward side of any plane.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 50 ·
2
Replies
50
Views
8K
Replies
12
Views
3K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 16 ·
Replies
16
Views
4K