![]() |
Trig
Posted by Nick at 1/19/2001 6:07 AM EST
Student on team #240, Mach V, from Jefferson Monroe High School and Visteon. For all you Pre Calc and above students- Is there any way to go from arctangent (X/Y) to Sine and Cosine? I need to use it in programming and the chip doesn't use arctangent, tangent, arcsine, or arccosine! |
Re: Trig
Posted by Jason Rukes at 1/19/2001 10:51 AM EST
Engineer on team #109, Arial Systems & Libertyville HS, from Libertyville High School and Arial Systems Corp & SEC Design. In Reply to: Trig Posted by Nick on 1/19/2001 6:07 AM EST: I found this in the CRC Standard Math Tables Book. Let A = Arctan(x), then sin(A) = x/(sqrt(1+x^2)) cos(A) = 1/(sqrt(1+x^2)) sqrt is the square root function. -Jason |
Problem is...
Posted by Nick at 1/20/2001 6:33 AM EST
Student on team #240, Mach V, from Jefferson Monroe High School and Visteon. In Reply to: Re: Trig Posted by Jason Rukes on 1/19/2001 10:51 AM EST: The problem is I CAN'T Let A = Arctan(x). I cannot use arctan what so ever. The function is not recognized by the BS2 chip. |
Re: Problem is...
Posted by Dan at 1/20/2001 1:07 PM EST
Other on team #247, da Bears, from Berkley High and PICO/Wisne Design. In Reply to: Problem is... Posted by Nick on 1/20/2001 6:33 AM EST: You don't need to have the arctan function. It was mentioned just to help understand how the final answer was derived. It wasn't meant to be a line in your program. I assume you want the sine and cosine of the angle whose tan is x/y. If you know x and y, the sine and cosine of that angle (which you'll never calculate) are: sine = x/sqrt(x^2+y^2) and cosine = y/sqrt(x^2+y^2). These are functions of x and y only, no angle. Hope that helped. -Dan #247 |
Re: Trig
Posted by Dan at 1/19/2001 2:32 PM EST
Other on team #247, da Bears, from Berkley High and PICO/Wisne Design. In Reply to: Trig Posted by Nick on 1/19/2001 6:07 AM EST: Pretty much the same as the last reply: A (angle) = arctan(x/y) tan A = x/y Setting up a right triangle with x opposite A and y adjacent to A, hypotenuse becomes sqrt(x^2+y^2) and the rest follows: sin A = x/sqrt(x^2+y^2) and cos A = y/sqrt(x^2+y^2) This works fine if the angles you're dealing with are between 0 and 90. Is this true? -Dan #247 |
| All times are GMT -5. The time now is 07:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi