Evenly spaced points in oddly shaped volume?

In summary, to evenly distribute points in a volume, you can randomly generate more points than you need, step through the points and find the point whose distance to any other point is the smallest, and delete that point.
  • #1
blrnd
1
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
  • #2
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:
  • #3
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.
 
  • #4
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...
 
  • #5
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.
 

1. How do you define "evenly spaced points" in an oddly shaped volume?

"Evenly spaced points" refers to a set of points that are uniformly distributed throughout the entire volume. This means that the distance between any two adjacent points is the same, regardless of the shape or size of the volume.

2. Why is evenly spacing points important in scientific research?

Evenly spacing points allows for more accurate and consistent measurements in scientific research. It helps to eliminate bias and can provide a better representation of the entire volume, rather than just a specific area.

3. What methods can be used to achieve evenly spacing points in an oddly shaped volume?

One method is to use a grid pattern, where points are placed at regular intervals along each axis. Another method is to use a random sampling approach, where points are randomly distributed throughout the volume. There are also specialized algorithms and software that can assist with evenly spacing points in complex shapes.

4. What are the challenges in achieving evenly spaced points in an oddly shaped volume?

The main challenge is accurately defining the boundaries and shape of the volume. This can be difficult for irregular or complex shapes. In addition, evenly spacing points may not always be possible due to the limitations of the chosen method or the volume itself.

5. How can evenly spaced points be validated in an oddly shaped volume?

One way to validate evenly spaced points is through statistical analysis. This involves measuring the distances between points and determining if they meet the criteria for being evenly spaced. Another method is to visually inspect the distribution of points and identify any patterns or irregularities.

Similar threads

  • Quantum Physics
Replies
16
Views
1K
  • Beyond the Standard Models
Replies
4
Views
2K
  • Differential Geometry
Replies
10
Views
2K
Replies
50
Views
3K
  • Introductory Physics Homework Help
Replies
12
Views
851
  • Biology and Medical
Replies
9
Views
2K
  • Sci-Fi Writing and World Building
Replies
1
Views
548
  • General Math
Replies
4
Views
1K
Replies
2
Views
2K
  • Special and General Relativity
2
Replies
63
Views
3K
Back
Top