# Wolfram Language™

Live Version Coming Soon Check out other examples

## Make a 3D Image from a Point Cloud

From a set of points in three dimensions, construct a 3D image.

X

### how it works

This set of over 100,000 points was obtained by scanning a toy house:

In[1]:=
X

You can see what the points look like via ListPointPlot3D:

In[2]:=
X
Out[2]=

To turn those discrete points into a 3D image, find the ranges along each coordinate axis of the point coordinates:

In[3]:=
X
Out[3]=

Append 0.5 to each range to get a description of bins in each axis direction. The x axis bins go from -41 to 52 in 0.5 unit increments:

In[4]:=
X
Out[4]=

Count the number of points that fall within each bin:

In[5]:=
X

Each bin count corresponds to a voxel value. Rearrange the voxels so that they correspond to the original point positions when made into a 3D image:

In[6]:=
X

Make an image from the rearranged bin counts:

In[7]:=
X
Out[7]=

Refine the image by adjusting the voxel values for better contrast and blurring slightly to blend the values:

In[8]:=
X
Out[8]=

Package those steps as a function that can be applied to any point cloud:

In[9]:=
X