This is a generic function used to plot the edge lines of either a trigrid
or a hexagrid
object, a facelayer
, or Spatial
objects in 3d space. The method is also implemented for
the object classes defined by the package 'sp'.
lines3d# S4 method for trigrid
lines3d(x, arcs = FALSE, ...)
# S4 method for Line
lines3d(x, radius = authRadius, ...)
# S4 method for Lines
lines3d(x, radius = authRadius, ...)
# S4 method for SpatialLines
lines3d(x, radius = authRadius, ...)
# S4 method for SpatialLinesDataFrame
lines3d(x, radius = authRadius, ...)
# S4 method for Polygon
lines3d(x, radius = authRadius, ...)
# S4 method for Polygons
lines3d(x, radius = authRadius, ...)
# S4 method for SpatialPolygons
lines3d(x, radius = authRadius, ...)
# S4 method for SpatialPolygonsDataFrame
lines3d(x, radius = authRadius, ...)
The function does not return any value.
An object of class nonstandardGenericFunction
of length 1.
(trigrid
, hexagrid
, facelayer
or sp
) Object to be plotted.
logical
Value setting whether great circle arcs or segments shall be drawn betwenn the points of the grid.
Further graphical parameters passed to (see plot3d
).
(numeric
) Used for plotting objects that inherit from Spatial*
. The radius of the sphere the sp objects are plotted with. Default to the authalic (R2) radius of Earth.
The function is built on the openGL renderer of the R package rgl
, which needs to be installed for the function to run. Although the function is works without attaching rgl, note that if you want to attach both icosa
and rgl
,the rgl
package has to be loaded ifrst otherwise the function will not be usable.
# create a hexagonal grid
g <- hexagrid(c(2,2))
# plot the grid in 3d space
# lines3d(g, col="blue")
Run the code above in your browser using DataLab