rgblur: Helper for 'makecluster' to 3D gaussian blur cluster...

View source: R/rapt_cluster-sim.R

rgblurR Documentation

Helper for makecluster to 3D gaussian blur cluster positions.

Description

Function which returns a list of coordinates of radial gaussian blurred points with uniform probability to be sent in any direction. This function was written to apply a blur in positions of RCP spaced clusters. The radial distribution is actually "folded normal" due to the fact that r > 0.

Usage

rgblur(n = 1, mean = 0, sd = 1, coords = "rec", method = "r")

Arguments

n

The number of points you want returned

mean

Mean of the regular normal distribution for radius.

sd

Standard deviation for the normal distribution for radius.

coords

Return command. Either "rec" or "sph". See below for more.

method

One of "r" and "xyz". "r" uniformly distributes direction and normally distributes r, while "xyz" normally distributes x, y and z.

Value

If coords = "rec", returns a vector of cartesian coordinates. If coords = "sph", returns a vector of spherical coordinates.

References

https://en.wikipedia.org/wiki/Folded_normal_distribution

See Also

makecluster


aproudian2/rapt documentation built on Dec. 15, 2022, 4:24 a.m.