Rotate a plane of coordinates to a given angle.

rotate2D(plane, angle, threads = 1)

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.

Value

A data.table with the rotation applied to plane.

Author

J. Antonio Guzmán Q.

Examples


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))