Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lines3d

Methods of 3d line plotting


Description

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'.

Usage

lines3d

## S4 method for signature 'trigrid'
lines3d(x, arcs = FALSE, ...)

## S4 method for signature 'Line'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'Lines'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'SpatialLines'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'SpatialLinesDataFrame'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'Polygon'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'Polygons'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'SpatialPolygons'
lines3d(x, radius = authRadius, ...)

## S4 method for signature 'SpatialPolygonsDataFrame'
lines3d(x, radius = authRadius, ...)

Arguments

x

(trigrid, hexagrid, facelayer or sp) Object to be plotted.

arcs

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).

radius

(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.

Format

An object of class nonstandardGenericFunction of length 1.

Details

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.

Value

The function does not return any value.

Examples

# create a hexagonal grid
  g <- hexagrid(c(2,2))
# plot the grid in 3d space
#  lines3d(g, col="blue")

icosa

Global Triangular and Penta-Hexagonal Grids Based on Tessellated Icosahedra

v0.10.1
GPL-3
Authors
Adam T. Kocsis [aut, cre]
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.