fan.sphere {espadon}R Documentation

Creation of spherical fan object.

Description

The fan.sphere function creates a "fan" class object containing, among others, the coordinates of the unit director vectors of the rays of a spherical fan.

Usage

fan.sphere(
  angle = 1,
  method = c("regular", "random"),
  origin = c(0, 0, 0),
  ref.pseudo = "",
  frame.of.reference = "",
  alias = "",
  description = "spherical fan"
)

Arguments

angle

Positive number specifying the angle (or mean angle in case of method = "random") between two nearest vectors.

method

Requested method of fan calculation from among 'regular' and 'random'. By default, method = regular. See details.

origin

Numeric vector, giving the xyz coordinates of the fan origin. By default c (0, 0, 0).

ref.pseudo

Character string, frame of reference pseudonym of the created object.

frame.of.reference

Character string, frame of reference of the created object.

alias

Character string, $alias of the created object.

description

Character string, describing the the created object.

Details

The "regular" and "random" method are explained by Deserno [1].

Value

Returns a "fan" class object (see espadon.class for class definitions) containing, among others,

References

[1] Deserno, Markus (Online; accessed 2022-08-24). “How to generate equidistributed points on the surface of a sphere.” https://www.cmu.edu/biolphys/deserno/pdf/sphere_equi.pdf.

See Also

fan.beam, fan.planar, fan.to.voxel

Examples

regular.fan <- fan.sphere (angle = 30)
head (regular.fan$xyz)
random.fan <- fan.sphere (angle = 30, method = "random")
head (random.fan$xyz)
library (rgl)
open3d ()
points3d (regular.fan$xyz)
open3d ()
points3d (random.fan$xyz)

[Package espadon version 1.6.0 Index]