cloudGenerator {DIGSS}R Documentation

Cloud Generator

Description

Creates a cloud of dots inside ellipsoid sites

Usage

cloudGenerator(
  density,
  a,
  b,
  angle,
  center.x,
  center.y,
  type = "uniform",
  precision = 30,
  plot = FALSE
)

Arguments

density

dots (artifacts) per m2

a

ellipse (site) long axis in km

b

ellipse (site) short axis in km

angle

ellipse (site) angle of rotation in radians

center.x

center of ellipse in x axis

center.y

center of ellipse in y axis

type

type of density distribution. Choose from:

  • uniform: dots are uniformly distributed within ellipse

  • linear: density of dots decreases linearly from center

  • spherical: density of dots decreases following elliptical function (abrupt drop near margins)

  • sinusoidal: density of dots decreases following sinusoidal equation

precision

how many slices of the distribution will be made (more = much slower run times). Default = 30

plot

if function should plot results. function does not work outside surveySim()

Details

cloudGenerator() creates a cloud of point inside an ellipsoid site of predefined size and shape, to represent the locations of artifacts in a site. The function can build artifact scatters with different densities profiles. The function uses an "onion-layer" approach to approximate the density of points from the center. In practice, it means that each site is composed of N ellipse slices surrounding the previous slice, with each slice having a different artifact density depending on the density function selected. This approach also makes the surveySim function more efficient, since it will search for artifact hits only on the slices that intersect the survey pits.

Value

A list with two objects:

coords A list of the bands (N=precision) that represent the site, each populated with the X and Y coordinates for all artifacts generates inside them.
info A list with the number of pieces created (⁠$total.pieces⁠), area of the site (⁠$total.area⁠), and artifact density in the site (⁠$actual.density⁠)

Examples

   #create a small site with low density uniform distribution
   uni.site<-cloudGenerator(0.1,0.1,0.05,pi/4,0.5,0.5,type="u")

   #plot a site with uniform artifact distribution through surveySim
   SiteParameters<-parametersExample
   SiteParameters$simulations=1
   SiteParameters$site.density=1
   SiteParameters$obj.density=0.1
   SiteParameters$obj.distribution = "u"
   surveySim(SiteParameters,plot.artifacts = TRUE)

   #plot a site with sinusoidal artifact distribution through surveySim
   SiteParameters$obj.distribution = "si"
   surveySim(SiteParameters,plot.artifacts = TRUE)


[Package DIGSS version 1.0.2 Index]