# rotate: Rotate a point cloud around a pivot point (3D) In recexcavAAR: 3D Reconstruction of Archaeological Excavations

## Description

Rotate a point cloud around a defined pivot point by defined angles. The default rotation angle around each axis is zero and the default pivot point is the center point of the point cloud (defined by mean())

## Usage

 ```1 2``` ```rotate(x, y, z, degrx = 0, degry = 0, degrz = 0, pivotx = NA_real_, pivoty = NA_real_, pivotz = NA_real_) ```

## Arguments

 `x` vector of x axis values of rotation point cloud `y` vector of y axis values of rotation point cloud `z` vector of z axis values of rotation point cloud `degrx` rotation angle around x axis in degree (default = 0) `degry` rotation angle around y axis in degree (default = 0) `degrz` rotation angle around z axis in degree (default = 0) `pivotx` x axis value of pivot point (default = mean(x)) `pivoty` y axis value of pivot point (default = mean(y)) `pivotz` z axis value of pivot point (default = mean(z))

## Value

data.frame with the spatial coordinates of the resulting points

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```circ <- draw_circle(0,0,0,5) #library(rgl) #plot3d( # circ, # xlim = c(-6,6), # ylim = c(-6,6), # zlim = c(-6,6) #) rotcirc <- rotate(circ\$x, circ\$y, circ\$z, degrx = 45) #plot3d( # rotcirc, # xlim = c(-6,6), # ylim = c(-6,6), # zlim = c(-6,6) #) ```

recexcavAAR documentation built on May 1, 2019, 6:48 p.m.