| New Reply |
Going from polar coor. to cartesian coor. |
Share Thread | Thread Tools |
| Aug2-12, 12:49 PM | #1 |
|
|
Going from polar coor. to cartesian coor.
Hello, I recently run into a problem. Lets say I have the point (a,b) and (-a,-b). The, I know that θ_1 = atan(b/a) and θ_2 = atan((-b)/(-a)) = θ_1.
But, what if I want to go back to Cartesian coordinates? If I assume r = 1, a = cos(θ_1) and b = sin(θ_1) while -a = cos(θ_2) and b = sin(θ_2). I am sure this is very simple and it has to do with the fact that the range of atan is (-π/2,π/2). But is there a way of getting back the -a? Could I just add π to the angle whenever a and b are negatives? |
| Aug2-12, 04:14 PM | #2 |
|
Recognitions:
|
Atan is multivalued, so you need to use more information to get the angle.
|
| Aug2-12, 04:35 PM | #3 |
|
|
And yes, ignoring your sign omission, -a = cos(θ_2) and -b = sin(θ_2). Some math libraries have a two-argument "atan2" function that figures the quadrants out for you so that the range of the atan2 is the full -∏ (exclusive) to +∏ (inclusive). This function also avoids the divide by zero problem for points on the y axis. http://en.wikipedia.org/wiki/Atan2 |
| Aug3-12, 10:38 AM | #4 |
|
|
Going from polar coor. to cartesian coor.
I can certainly use atan2. Thank you.
|
| Aug4-12, 08:41 PM | #5 |
|
Blog Entries: 1
|
atan2 is multivalued... (wikipedia link to definition of atan2 in terms of extension of atan function) |
| Aug5-12, 03:47 PM | #6 |
|
Recognitions:
|
|
| New Reply |
| Thread Tools | |
Similar Threads for: Going from polar coor. to cartesian coor.
|
||||
| Thread | Forum | Replies | ||
| Laplace Equation in Cartesian Coor. | Calculus | 4 | ||
| Polar coor | Calculus & Beyond Homework | 10 | ||
| Cross Product Polar Coor | Linear & Abstract Algebra | 7 | ||
| Polar to Cartesian | Calculus & Beyond Homework | 1 | ||
| Polar To Cartesian | General Math | 4 | ||