# DrawDensity3D: Graphic representation of a point Density Map. In VecStatGraphs3D: Vector analysis using graphical and analytical methods in 3D

## Description

The density map was built as follows: a) vectors are moved to a common origin without changing its angle and module, b) end position perform a point cloud of varying density that depends on the accumulation of vectors with similar properties, c) end positions are used for to calculate the density map as a surface with values depending on the end-position accumulation per area unit. Areas where there is a greater number of points (end position of the vectors) will have a deeper color (red), while the areas a lesser density will have a less intense color (white).

## Usage

 `1` ```DrawDensity3D(vectors, Div = 40, Layers = 3, DrawAxes = FALSE) ```

## Arguments

 `vectors` Matrix containing the values of the coordinates `Div` Integer value that indicates the number of divisions that will have the density map. The default value is 40 `Layers` Integer value that indicates the number of layers that will have the density map. The default value is 3 `DrawAxes` Logical value, if DrawAxes=TRUE draw axes, if DrawAxes=FALSE draw not axes. The default value is FALSE

## Details

Kernel descriptors are used to create the density map. To perform these calculations the MASS package is required.

The parameter Div is very important because a very large value will cause the creation of the slow density map, and a very small value would create a ineffective density map.

One way to get a set of coordinates X, Y and Z of the origin position and end position (coordinates X, Y and Z of the vector) or of the colatitude and longitude, it is using the `LoadData3D` function.

Typical usages are

 ```1 2 3 4 5``` ``` DrawDensity3D(vectors, ...) DrawDensity3D(vectors, Div = 60, ...) DrawDensity3D(vectors, Layers = 4, DrawAxes = TRUE, ...) ...... ```

## Value

This function returns no value, creates a 3D Graph that represents a density map of the input values.

## Author(s)

Ruiz-Cuetos, J.C., [email protected], Felicisimo, A.M., [email protected], Cuartero, A., [email protected], Polo, M.E., [email protected], Rodriguez, P.G. [email protected]

## References

`DrawModuleAndAngleDistribution3D`.

## Examples

 ```1 2 3 4``` ``` FileName<-system.file("data/XYZcoor.txt", package="VecStatGraphs3D") dat<-LoadData3D(FileName, Type=1) coordinates<-dat[,4:6] DrawDensity3D(coordinates, Layers=3, Div=50) ```

VecStatGraphs3D documentation built on May 29, 2017, 10:51 a.m.