Description Usage Arguments Value Author(s) Examples
Rotate Cartesian Coordinates around a given center. Translate or flip cartesian coordinates. Stretch cartesian coordinates.
1 |
x |
X coordinates |
y |
Y coordinates |
angle |
Angle the points should be rotated. Positive angles rotate clockwise, negative counterclock. |
type |
Define the type of angle that is given. Default is "degrees", alternative is "radial" |
method |
Define method to be used for rotation. Default method is "transform" uses an transformation matrix. Other method "polar" transforms coordinates to polar, "polar_extended" additionally returns distances of points from center. Results are the same for both methods. |
center |
Center around which coordinates should be rotated, give a vector containing and x and y coordinate. |
translate |
Move coordinates in x and y direction, give a vector containing x and y coordinate |
stretch |
Stretch or shrink coordinates around the center by a given factor (i.e. 1.5 stretch 50 procent, 0.5 shrink 50 |
flip |
Flip coordinates around the x axis at the center |
Returns rotated coordinates
Optical Imaging Centre ErasmusMC Rotterdam
1 | rotate_coord(c(25,50,100,150),c(150,125,50,25),angle=1.2,type="radial",method="polar_extended")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.