voxelize | R Documentation |
Bins point cloud data into 3D pixels, otherwise known as 'voxels'.
voxelize(x, edge_length, threads = 1L)
x |
A |
edge_length |
A numeric |
threads |
The number of threads to use for computing the voxel data. Default is 1. |
A data object of class 'lac_voxels
', which inherits from
data.table
. The output contains 4 columns: X, Y, Z, and
N. The first three columns encode the spatial coordinates of each voxel
while the fourth denotes the total number of points they contain.
# simulate a diagonal line of points with XYZ coordinates
pc <- data.frame(X = 0:99, Y = 0:99, Z = 0:99)
# convert point data to cubic voxels of length 5
voxelize(pc, edge_length = c(5,5,5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.