How convert a point on an X and Y grid to a angle degree?

In summary, the conversation is about finding the angle of a line on a grid that intersects with a circle. The moderator suggests using the tangent function to find the angle, and provides an example using a line with a slope of 2. The original poster thanks the moderator and says they will apply the solution.
  • #1
Xarzu
<Moderator's note: Moved from a technical forum and thus no template.>

Hello Forum,

This post is a spin-off from this post:

https://www.physicsforums.com/threa...een-watching-the-sun-set.925257/#post-5840279

If I have an X and Y point on a grid that represents the intersection of two formulas: A straight line (aX = Y) where "a" represents a constant number with a circle (X 2 + Y 2 = radius 2, how would I convert that point into a degree of an angle? The angle would represent the line function albeit only go one direction on the grid. It would be some degree.

If I were to guess, this might be very simple and have something to do with cosine rules.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Yes. Have you drawn the situation? And what do you know about how cosine and sine are defined?
 
  • #3
fresh_42 said:
Yes. Have you drawn the situation? And what do you know about how cosine and sine are defined?
I have an X and Y point of intersection. Yes, I have drawn the situation thanks to a C++ program (if you are following the other thread). Anyway, it is just a line going out from the middle of the grid now. I want to convert this line to an angle somehow. How do I do that? If it were an angle, then this would help me to convert into time since the circle represents a 24 hour period. Any ideas?

I am not really sure what you mean.
 
  • #4
Xarzu said:
If I have an X and Y point on a grid that represents the intersection of two formulas: A straight line (aX = Y) where "a" represents a constant number with a circle (X2 + Y2 = radius2, how would I convert that point into a degree of an angle? The angle would represent the line function albeit only go one direction on the grid. It would be some degree.
It sounds like you're trying to find the angle that the line y = ax makes with the horizontal, so the circle isn't needed at all.
The coefficient a represents the slope of the line, where slope = tangent(angle).

For example, the line y = 2x has a slope of 2, so ##2 = tan(\theta)##, with ##\theta## being often used to represent an angle.
Take the inverse tangent (##\tan^{-1}## or ##\arctan##) of both sides to get
##\tan^{-1}(2) = \theta##. In degrees, ##\theta## is about 63.4°.
 
  • Like
Likes Xarzu
  • #5
Thank you for the answer. I will apply it now.
:smile:
 

1. What is the formula for converting a point on an X and Y grid to an angle degree?

The formula for converting a point on an X and Y grid to an angle degree is arctan(y/x), where y is the vertical distance from the origin and x is the horizontal distance from the origin.

2. How do I determine the quadrant of the angle when converting from a grid point to an angle degree?

To determine the quadrant of the angle, you can use the signs of the x and y coordinates. If both x and y are positive, the angle is in the first quadrant. If x is negative and y is positive, the angle is in the second quadrant. If both x and y are negative, the angle is in the third quadrant. And if x is positive and y is negative, the angle is in the fourth quadrant.

3. Is there a difference between converting a point on a Cartesian grid and a polar grid to an angle degree?

Yes, there is a difference in the conversion formula for a Cartesian grid and a polar grid. For a Cartesian grid, the formula is arctan(y/x), while for a polar grid, the formula is simply the value of the angle in degrees.

4. Can a point on a grid have multiple angle degrees?

No, a point on a grid can only have one angle degree. The angle degree represents the direction from the origin to the point, and since the point has a fixed location, the angle degree will also be fixed.

5. How can I use the angle degree to determine the distance between two points on a grid?

The angle degree alone cannot determine the distance between two points on a grid. You will also need to know the distance from each point to the origin. Using trigonometry, you can then calculate the distance between the two points using the angle and the two distances from the origin.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
7
Views
881
  • Precalculus Mathematics Homework Help
Replies
20
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
529
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • General Math
Replies
25
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
2K
  • Precalculus Mathematics Homework Help
Replies
24
Views
2K
Back
Top