Skip to content

Instantly share code, notes, and snippets.

@ashwinreddy
Created September 13, 2017 01:43
Show Gist options
  • Save ashwinreddy/1bde175518f4f601a7deda0c18c7beba to your computer and use it in GitHub Desktop.
Save ashwinreddy/1bde175518f4f601a7deda0c18c7beba to your computer and use it in GitHub Desktop.
Coordinate Systems
## Cylindrical
![Imgur](https://i.imgur.com/hMRNeAw.png)
Essentially extends polar to include a $z$-component.
$(r,\theta,z)$
$$
r = x\cos\theta \\\
r = y\sin\theta \\\
z = z
$$
$$
r^2 = x^2 + y^2 \\\
\theta = \tan^{-1}\left(\frac{y}{x}\right)
$$
## Spherical
Uses a radius $\rho$ and two angles $\theta$ and $\phi$.
$$
\rho = \sqrt{x^2 + y^2 + z^2} \\\
x = \rho\sin\phi\cos\theta \\\
y = \rho\sin\phi\sin\theta
$$
$$
\sin\phi = \frac{r}{\rho} \implies r = \rho\sin\phi \\\
\cos\phi = \frac{z}{\rho} \\\
\tan\phi = \frac{r}{z} \\\
r^2 = x^2 + y^2
$$
![Imgur](https://i.imgur.com/1wJafWq.png)
![Imgur](https://i.imgur.com/6jCV3XL.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment