Learn R Programming

isocubes (version 1.0.0)

coord_rotate: Rotate object around a coordinate axis

Description

Rotate object around a coordinate axis

Usage

coord_rotate(coords, theta, axis = "z")

Value

data.frame of transformed coordinates

Arguments

coords

data.frame with 'x', 'y' and 'z' coordinates

theta

angle in radians.

axis

axis to rotate around. Default: 'z'. Valid values: 'x', 'y', 'z'

Examples

Run this code
obj_letter |>
   coord_rotate(pi/2, 'y') |>
   isocubesGrob() |>
   grid::grid.draw()

Run the code above in your browser using DataLab