Learn R Programming

rTLS (version 0.2.5.6)

rotate2D: Rotate a plane of coordinates

Description

Rotate a plane of coordinates to a given angle.

Usage

rotate2D(plane, angle, threads = 1)

Value

A data.table with the rotation applied to plane.

Arguments

plane

A data.table with two columns describing the plane of coordinates.

angle

A numeric vector describing the degrees of rotation.

threads

An integer specifying the number of threads to use. Experiment to see what works best for your data on your hardware.

Author

J. Antonio Guzmán Q.

Examples

Run this code

data(pc_tree)

plot(pc_tree[,1:2])

#Rotate in 45 degrees using Z axis of the cloud
plot(rotate2D(pc_tree[,1:2], angle = 45))

Run the code above in your browser using DataLab