View Full Version : OT: Maths question
Sorry if it's a noob question. :) (been a while)
Lets say you know the center of a circle Cx/Cy and the radius R and the X/Y point of a point on the cirle. How do you determine the angle of the line from Cx/Cy to X/Y?
Maloch Octavia
10-07-04, 10:22
Go do your own homework ya nib. :P
Trig is your friend ... but Dominion has been on summer vacation and doesn't remember his trig.
Go do your own homework ya nib. :P
Its not homework, writing a program to do something but requires some things I can't remember the formulas for.
I know X/Y = Cos(angle)/Sin(angle) . Just not sure the reverse.
Richard Slade
10-07-04, 12:50
Whenever you find something that you don't know the answer of,
be aware of the fact that 42 might be the solution
sin(x) = Y/R
x = arcsin(Y/R)
tadaaam :) This is asuming the center of your circle is also the origin of your 'cross with numbers on it'
Sorry, but I'm not english so I don't know what you call the Cartesian cross over there, lol
Not sure exactly what you mean by your notation, but if (Cx,Cy) are the co-ords of the centre of the circle, and (X,Y) are the co-ords of your point, and you know the radius, then you can use any of the trig formulas.
Assuming you want the angle between the horizontal and your line, then
sin^-1 { (Y-Cy) / (X-Cx) }
will return the angle you're looking for, I think.
sin^-1 { (Y-Cy) / (X-Cx) }
that's how you do it when the center of your circle isn't in the origin of the 'cross with all the numbers on it'. But since you can choose where you put the cross, draw it in the center of your circle to make it easier (the angle will stay the same)
that's how you do it when the center of your circle isn't in the origin of the 'cross with all the numbers on it'. But since you can choose where you put the cross, draw it in the center of your circle to make it easier (the angle will stay the same)
Yeah. I wasn't sure if he could do that though for whatever reason so I gave a more general forumula.
Whenever you find something that you don't know the answer of,
be aware of the fact that 42 might be the solution
:lol: :lol: :lol: :lol: :lol: :lol: :lol:
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.