plot_voxels: Plot Method for Voxels

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot_voxels.R

Description

The plot method for objects of class "voxels" created using the voxels function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_voxels(
  voxels,
  add.points = TRUE,
  add.voxels = TRUE,
  border = TRUE,
  points.size = 1,
  points.col = "black",
  fill.col = "forestgreen",
  line.lwd = 0.5,
  line.col = "black",
  alpha = 0.1,
  ...
)

Arguments

voxels

Object of class "voxels" from voxels.

add.points

Logical, if TRUE it adds the original points used to perform the voxelization. TRUE as default.

add.voxels

Logical, if TRUE it adds the voxels created. TRUE as default.

border

Logical, if TRUE it adds a line on the borders of each voxel. TRUE as default.

points.size

The points size, a positive number to use if plot add.points = TRUE.

points.col

A character defining the color of the points to use.

fill.col

A character vector defining the color to fill the voxels, it could be a range of colors or a solid color.

line.lwd

The line width, a positive number, defaulting to 0.5.

line.col

A character defining the color of the border lines to use.

alpha

A positive numeric vector describing the transparency of the voxels to fill. This value most be between 0.0 (fully transparent) .. 1.0 (opaque).

...

General arguments passed to rgl.

Value

A 3D plot of a point cloud and voxels.

Author(s)

J. Antonio Guzmán Q.

See Also

voxels, voxels_counting, summary_voxels

Examples

1
2
3
4
5
data("pc_tree")

###Create cubes of a size of 7x7x3.5.
vox <- voxels(pc_tree, edge_length = c(7, 7, 3.5))
plot_voxels(vox)

Antguz/rTLS documentation built on Dec. 14, 2021, 9:49 a.m.