Hallo Melody,
my english is not so good, but i start.
We have a Point P, the coordinate is ( x,y ). So we have P(x,y).
The question is, what is the angle from the x-axis to that Point (we call the angle also polar angle ). See: https://en.wikipedia.org/wiki/Polar_coordinate_system
The formula for the angular coordinate is : $$\alpha = \arctan{( \frac{y_p}{x_p} )}\\
\text{ or } \alpha = \mathrm{atan( \frac{y_p}{x_p} ) }$$
But this formula does not calculate the angle correctly. We have the same angle in the Quadrant ( I and III ) and in the Quadrant ( II and IV ).
Why?
Because $$\frac {+y_p}{+x_p} = \frac{-y_p}{-x_p} = +\frac {y_p}{x_p}$$ and $$\frac {+y_p}{-x_p} = \frac{-y_p}{x_p} = - \frac {y_p}{x_p}$$
If we divide y by x, the information about the quadrant has disappeared.
But we can see:
$$\\\small{\text{Point in the I. Quadrant $y_p > 0 $ and $ x_p > 0 $}}\\
\small{\text{Point in the II. Quadrant $y_p > 0 $ and $ x_p < 0 $}}\\
\small{\text{Point in the III. Quadrant $y_p < 0 $ and $ x_p < 0 $}}\\
\small{\text{Point in the IV. Quadrant $y_p < 0 $ and $ x_p > 0 $}}\\$$
We must correct the angular coordinate afterwards.
and if y or x is zero, we must put constants:
$$\\\small{\text{$ y_p = 0 $ and $ x_p > 0 \qquad \alpha = 0 $ }}\\
\small{\text{$ y_p > 0 $ and $ x_p = 0 \qquad \alpha = \frac{\pi}{2}$ }}\\
\small{\text{$ y_p = 0 $ and $ x_p < 0 \qquad \alpha = \pi$ }}\\
\small{\text{$ y_p < 0 $ and $ x_p = 0 \qquad \alpha = \frac{3}{2}\pi$ }}\\$$
We have succeed, there is a function which takes this work from us!
The funktion is atan2
and needs two parametres $$\small{\text{ $y_p$ and $x_p$}}$$
The new formula for the angular coordinate is : $$\boxed{\ \alpha = \mathrm{atan} 2{( y_p, x_p )}\ }$$
@@ End of Day Wrap Sun 29/3/15 Sydney, Australia Time 10:27 pm ♪ ♫
Good evening everyone,
Today our wonderful answerers were Alan, Geno3141, CPhill, Gibsonj338, Bertie, Heureka, Nauseated and Civonamzuk. A very big thank you to each of you. :)
Interest Posts:
FTJ means "for the juniors"
1) Probability of choosing red and blue cards Thanks Melody and Alan
2) Simultaneous Equations (middle high) Thanks CPhill
3) Entering roots on the Web2 calc (everyone) Melody
4) Subtracting mixed numerals FTJ Melody
5) Simplifying algebraic fractions (introduction) FTJ Melody
6) Physics, force Melody and Nauseated
7) A new calculator function. I have not seen this before. Thanks Heureka.
8) Cross-partial derivative Thanks Melody, Heureka, Alan and Bertie.
♫♪ ♪ ♫ ♬ ♬ MELODY ♬ ♬ ♫♪ ♪ ♫
Mon 30/3/15
FTJ means "For the Juniors"
1) Counting arrangements of beads on a bracelet Melody
2) Counting Lattice points Thanks Alan and CPhill
3) More lattice counting Different answers. Thanks CPhill and Melody
4) Counting letter combinations More input needed. lol Thanks CPhill and Melody
They should hire us to make multiple choice answers for these scenarios. lol
5) Force required - lever used Not answered
6) Probability - different from usual Thanks Gino
7) Counting - b***s into boxes Thanks Alan and Nauseated
8) Counting question Everyone could try this one. FTJ Thanks CPhill
9) Counting chords Another one that everyone can try FTJ Thanks Alan
10) 3D coordinate geometry, circles ans spheres Thanks CPhill and Alan
11) Triangle dilations Thanks CPhill
12) Subtracting fractions - you should try it MG FTJ Thanks Heureka
13) Simplifying trig identities Thanks CPhill
♫♪ ♪ ♫ ♬ ♬ MELODY ♬ ♬ ♫♪ ♪ ♫
You can also use atan2, see examples below, to get the angle in the quadrant (I, II, III, and IV):
$$\\\text{Formula:}\\
\alpha = \mathrm{atan2}\ {(\Delta y, \Delta x)}$$
Examples:
http://web2.0rechner.de/#atan2(1,1) $$\alpha = 45\ \mathrm{degrees} \qquad \text{Quadrant I}$$
http://web2.0rechner.de/#atan2(1,-1) $$\alpha = 135\ \mathrm{degrees} \qquad \text{Quadrant II}$$
http://web2.0calc.com/#atan2(-1,-1) $$\alpha = -135\ \mathrm{degrees} \qquad \text{Quadrant III}$$
http://web2.0rechner.de/#atan2(-1,1) $$\alpha = -45\ \mathrm{degrees} \qquad \text{Quadrant IV}$$
Click the "=" Button in the link