1. Review
Fill in the table of coordinate transforms between spherical, rectangular, and cylindrical systems. Do this by extracting the relevant equations from the book and putting onto a single (nice) reference page either in the template below or your own reference system.
| This will be handy for quick reference later. |
| To→ ↓From |
cartesian | cylindrical | spherical |
|---|---|---|---|
|
|||
|
|||
|
2. Notes
What is b when θ=+90°?
Inverse tangent has several issues to be aware of:
-
The denominator can be zero.
-
It can’t distinguish between e.g. \(\frac{+1}{+1}\) and \(\frac{-1}{-1}\).
-
It can’t distinguish betteen e.g. \(\frac{+1}{-1}\) and \(\frac{-1}{+1}\).
Python, Matlab, and other languages provide a 2-argument version that allows the function to detect the difference between opposite quadrants like I and III:
atan2(y, x) or atan2d(y, x)
This yields the 4-quadrant result with a 2π or 360° range.