generate_sphere: Generate a spherical point cloud

View source: R/generate_sphere.R

generate_sphereR Documentation

Generate a spherical point cloud

Description

Generate a spherical point cloud

Usage

generate_sphere(angular_res = 1, r = 1, sph = FALSE)

Arguments

angular_res

the angular resolution that sets the spacing between points.

r

numeric. The sphere radius.

sph

logical. If TRUE the spherical coordinates of the points are returned, if FALSE the XYZ coordinates are returned.

Value

a data.table containing points coordinates.

Examples

# generate a sphere
sph <- viewshed3d::generate_sphere()

# plot the sphere
rgl::plot3d(sph)


Blecigne/viewshed3d documentation built on Nov. 5, 2022, 9:08 p.m.