# Thread:

1. ## XYZ Coordinate on Sphere. Known Info: Radius, latitude, longitude

Title says it all. I need to find the x,y,z coordinate on the surface of a sphere where the origin is 0,0,0 at the center of the sphere. The known information is the radius, latitude, and longitude.

2. ## Re: XYZ Coordinate on Sphere. Known Info: Radius, latitude, longitude

If $\theta$ is the longitude and $\phi$ is the latitude, the coordinate transformations are similar to if you were using spherical polar coordinate convention.

$x = R \cos{\theta} \cos{\phi}$

$y = R \cos{\theta} \sin{\phi}$

$z = R \sin{\theta}$

The difference between geographic convention (G) and spherical polar convention (SP) is in the definition of $\theta$. In G, this angle takes on the value 0 at the equator, 90 at the north pole and -90 at the south pole. In SP theta has 0 at the north pole and increases to 180 at the south pole. The difference in the transformations is that $\sin{\theta}$ and $\cos{\theta}$ are switched between conventions.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 8, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8905166387557983, "perplexity_flag": "middle"}