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

translate

Translating an icosahedral grid object in 3d Cartesian space


Description

The function translates the coordinates of a grid object with the specified 3d vector.

Usage

translate(gridObj, vec)

## S4 method for signature 'trigrid,numeric'
translate(gridObj, vec)

## S4 method for signature 'hexagrid,numeric'
translate(gridObj, vec)

Arguments

gridObj

(trigrid or hexagrid) Icosahedral grid object.

vec

(numeric) A vector of length 3. This is the translation vector.

Value

The same grid structure as the input, but with translated coordinates.

Examples

# create a grid and plot it
g <- trigrid(3)
# lines3d(g)
# translate the grid to (15000,15000,15000)
g2 <- translate(g, c(15000,15000,15000))
# lines3d(g2)

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.