Skip to contents

Transforms icosahedral triangle coordinates to the 2D PLANE representation (unfolded icosahedron). Each triangle is rotated and translated to its position in the unfolded layout.

Usage

hexify_icosa_tri_to_plane(
  icosa_triangle_face,
  icosa_triangle_x,
  icosa_triangle_y,
  polyhedron = c("icosahedron", "octahedron", "tetrahedron")
)

Arguments

icosa_triangle_face

Triangle face number (0-19 on the icosahedron), integer or vector

icosa_triangle_x

X coordinate on triangle face

icosa_triangle_y

Y coordinate on triangle face

polyhedron

The solid whose faces are unfolded: "icosahedron" (default), "octahedron" or "tetrahedron"

Value

Data frame with columns:

plane_x

X coordinate in PLANE space (range ~0 to 5.5 on the icosahedron)

plane_y

Y coordinate in PLANE space (range ~0 to 1.73)

Details

Equivalent to 'dggridR' dgPROJTRI_to_PLANE().

The PLANE layout of the icosahedron arranges all 20 faces into a roughly rectangular region. Faces 0-4 and 5-9 form the upper row, while faces 10-14 and 15-19 form the lower row. Adjacent faces share edges in this representation. The octahedron lays its four diamonds side by side, each a northern face over its southern one; the tetrahedron lays face 3 in the middle of a triangle of edge 2 with the three faces around vertex 0 at its corners.

Examples

# Get PLANE coordinates from triangle coordinates
fwd <- hexify_forward(lon = 2.35, lat = 48.86)
plane <- hexify_icosa_tri_to_plane(
  icosa_triangle_face = fwd["face"],
  icosa_triangle_x = fwd["icosa_triangle_x"],
  icosa_triangle_y = fwd["icosa_triangle_y"]
)
print(plane)