| rotate {secr} | R Documentation |
Rotate a set of points.
rotate (object, degrees, centrexy = NULL, ...)
object |
object that may be coerced to a numeric matrix |
degrees |
clockwise angle of rotation in degrees |
centrexy |
vector with xy coordinates of rotation centre |
... |
other arguments (not used) |
The first column of object holds the x coordinates of the points and the second holds the y coordinates. If centrexy is NULL then rotation is about (0,0).
A generic method, introduced for the class-specific method rotate.traps.
A matrix with the location of each point rotated about the centre.
Murray Efford murray.efford@otago.ac.nz
temp <- matrix(runif (20) * 2 - 1, nc = 2) temp2 <- rotate(temp, 25) plot(temp, xlim=c(-1.5,1.5), ylim = c(-1.5,1.5), pch = 16) points (0,0, pch=2) points (temp2, pch = 1) arrows (temp[,1], temp[,2], temp2[,1], temp2[,2], length = 0.1)