Last chance! 50% off unlimited learning
Sale ends in
coo.rotate.center
rotates (counter-clockwise) coo
with a theta
angle (in radians) and with the center of symmetry specified by center
.coo.rotate.center(coo, theta, center=c(0, 0))
list
or a matrix
of coordinates.numeric
. The angle to rotate the shape.list
with x; y
components or a a matrix of (x; y)
coordinates.data(bot)
coo <- coo.scale(coo.center(bot@coo[[1]]))
coo.plot(coo, main="The bottle's revolution", ylim=c(-10, 50))
r <- seq(pi/6, 2*pi, pi/6)
cols <- col.summer(12)
for (i in seq(along=r)) {
coo.draw(coo.rotate.center(coo, r[i], center=c(0, 20)), border=cols[i], col=NA)
}
abline(v=0, h=0, col="grey60", lty=2)
points(0, 20, pch=3, col="red")
Run the code above in your browser using DataLab