# Find irregular bounding shape of 3D particle distribution

I have some 3D particle data

e.g.

(x0,y0,z0)
(x1,y1,z1)
(x2,y2,z2)
...


I want to find the irregular bounding shape of the distribution. The image below shows an example distribution from three directions (x/y, y/z, x/z), as well as a spherical bounding box, which is a poor approximation to the true distribution.

For this particular use case, I wish to throw away particles near the edge of the distribution, since in my application these are subject to boundary effects. So, if I have a rough approximation of the bounding shape in 3D, I can scale this down and discard particles outside the re-scaled shape.

Solutions in interpreted languages (Python, R) preferable.

• Can you provide some example data? Jul 8, 2017 at 10:32
• updated, but the data format is unimportant Jul 8, 2017 at 14:06