cart2polar | R Documentation |
This function takes Cartesian coordinates and turns them into polar/geographic coordinates. Finding these positions are necessary for creating ecfg configuration files for EMEGS such that the software knows its three dimensional location on a sphere. Assumes radius of one, X is right ear (negative) to left ear (positive), Y positive toward nose , and Z is 1 at Cz. Spherical coordinates are returned in radians and degrees. Theta is 0 at Cz pi at other pole. Phi is zero at right ear, pi/2 (90°) at nose, pi (180°) at left ear, 3/2*pi (270°) at Oz.
cart2polar(x_coor, y_coor, z_coor)
x_coor |
x coordinate between -1 and 1 |
y_coor |
y coordinate between -1 and 1 |
z_coor |
z coordinate between -1 and 1 |
Returns a named vector with theta and phi in degrees and radians
Andrew H Farkas, andrewhfarkas at g mail dot com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.