Skip to contents

rotates a shape of 'theta' angles (in radians) and with a (x; y) 'center'.

Usage

coo_rotatecenter(coo, theta, center = c(0, 0))

Arguments

coo

matrix of (x; y) coordinates or any Coo object.

theta

numeric the angle (in radians) to rotate shapes.

center

numeric the (x; y) position of the center

Value

a matrix of (x; y) coordinates, or a Coo object.

Examples

b <- bot[1]
coo_plot(b)
coo_draw(coo_rotatecenter(b, -pi/2, c(200, 200)), border='red')