dkmap {doolkit}R Documentation

3d topographic map

Description

Map topographic variables on a 3d triangle mesh.

Usage

dkmap(
  mesh,
  y,
  alpha = 1,
  alpha.above = TRUE,
  alpha.faces = NULL,
  alpha.thresh = NULL,
  bg = "white",
  col = "slope",
  col.levels = 100,
  col.main = "black",
  col.lab = "black",
  col.sub = "black",
  col.axis = "black",
  max.range = NULL,
  min.range = NULL,
  lit = TRUE,
  cex = 2,
  cex.axis = 2,
  cex.main = 4,
  cex.sub = 3,
  cex.lab = 2,
  family = "sans",
  font.axis = 1,
  font.lab = 2,
  font.main = 3,
  font.sub = 2,
  main = "",
  sub = "",
  legend = TRUE,
  legend.lab = "y",
  legend.type = "stack",
  windowRect = NULL,
  orient = "current",
  bbox = FALSE,
  origin = TRUE,
  scalebar = FALSE,
  smooth = TRUE
)

Arguments

mesh

object of class mesh3d

y

a vector of values for each polygon of the mesh, usually a topographic variable

alpha

an integer between 0 and 1 corresponding to alpha value for the selected polygons (see alpha.above, alpha.faces and alpha.thresh)

alpha.above

logical, if TRUE polygons affected by alpha should have a y value above alpha.thresh, if FALSE their y value should be below alpha.thresh

alpha.faces

a numeric vector of indices indicating which faces affected by alpha

alpha.thresh

a numeric value indicating a threshold for alpha

bg

the color to be used for the background. Defaults to "white".

col

a vector of colors for texturing the polygons according to y

col.levels

the number of color levels

col.main

the color to be used for legend main titles. Defaults to "black".

col.lab

the color to be used for the legend labels. Defaults to "black".

col.sub

the color to be used for plot sub-titles. Defaults to "black".

col.axis

the color to be used for legend axis annotation. Defaults to "black".

max.range

optional; the maximal range of the scale

min.range

optional; the minimal range of the scale

lit

logical, specifying if lighting calculation should take place on geometry

cex

a numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. This starts as 1 when a device is opened, and is reset when the layout is changed, e.g. by setting mfrow.

cex.axis

the magnification to be used for legend axis annotation relative to the current setting of cex.

cex.main

the magnification to be used for main titles relative to the current setting of cex.

cex.sub

the magnification to be used for sub-titles relative to the current setting of cex.

cex.lab

the magnification to be used for legend labels relative to the current setting of cex.

family

the name of a font family for drawing text. The maximum allowed length is 200 bytes. This name gets mapped by each graphics device to a device-specific font description. The default value is "" which means that the default device fonts will be used (and what those are should be listed on the help page for the device). Standard values are "serif", "sans" and "mono", and the Hershey font families are also available.

font.axis

the font to be used for axis annotation.

font.lab

the font to be used for the legend axis

font.main

the font to be used for plot main titles.

font.sub

the font to be used for plot sub-titles.

main

the main title (on top) using font, size (character expansion) and color par(c("font.main", "cex.main", "col.main"))

sub

sub-title (at bottom) using font, size and color par(c("font.sub", "cex.sub", "col.sub"))

legend

a logical indicating whether a legend should be displayed.

legend.lab

a label for the legend axis.

legend.type

a character string specifying the type of legend to be used; default is "stack", which corresponds to a stacked vertical legend; "pie" generates a pie-shaped legend and "log" generates a stacked vertical legend, but does a log transformation of the data (base: e=exp(1)). The "log" is mostly useful for DNE maps.

windowRect

the dimensions of the rgl window (default is the current size or, if size is below 1000*800, c(20, 20, 1020, 820))

orient

the orientation of the view. For more details, see dksetview

bbox

a logical, if TRUE a bounding box will be displayed around the surface object

origin

logical, whether to set the z of the mesh's lowermost point to zero

scalebar

A logical indicating whether a scalebar should be displayed

smooth

A logical indicating whether the color of polygons should blend with neighbor polygons for a smoother rendering

Value

An rgl window displaying the topography of a variable over a 3d mesh.

See Also

rgl

Examples

#Map of orientation:
orient <- orient(dkmodel$complex)
dkmap(dkmodel$complex, orient, col.levels = 8, col = "orient",
legend.lab = "Orientation (degrees)",legend.type = "pie", min.range = 0,
max.range = 360, orient = "occlusal")

#Map of area-relative curvature:
arc <- arc(dkmodel$complex)
dkmap(dkmodel$complex, arc, col = "arc", legend.lab = "ARC",
min.range = -20, max.range = 20, col.levels = 15, orient = "occlusal")

#Map of Dirichlet normal energy:
dne <- dne(dkmodel$complex)
dkmap(dkmodel$complex, dne, col = "dne", legend.lab = "DNE",
legend.type = "log", orient = "occlusal")

#Map of 3d-Area of polygons (for surface checking):
dkmap(dkmodel$complex, Rvcg::vcgArea(dkmodel$complex, perface = TRUE)$pertriangle,
legend.lab = "3d Area (mm\U00B2)", orient = "occlusal")

[Package doolkit version 1.42.2 Index]