Thread: trig
View Single Post
  #2   Spotlight this post!  
Unread 07-05-2007, 16:39
lukevanoort lukevanoort is offline
in between teams
AKA: Luke Van Oort
no team
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 1,873
lukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond repute
Send a message via AIM to lukevanoort
Re: trig

Quote:
Originally Posted by newton418 View Post
You can also approximation trig functions using a finite number of terms from the Taylor series.

For instance, arctan(x) is approximately equal to X - X^3/3 + X^5/5 - X^7/7
When -1<X<1

I'm not a coder, so I don't know what you’re trying to do, but from what I do understand about code, a Taylor series approximation should be fairly easy to implement.
Just to elaborate for those who haven't had second semester Calculus (BC Calc), a Taylor series is a mathematical construct that consists of a sequence of terms (often infinitely long), the sum of which approaches, know as converging at, a value equal to the value of the function used to generate the series. Taylor series are "centered" at a value and the points for which they converge to the correct number surround this value, in the above example, the series is centered at x=0 and the Taylor series converges from -1<x<1. Anyway, Taylor series allow you to use relatively simple polynomials to calculate rather difficult problems, like sin(.3245212432) to almost degree of accuracy that you desire, simply by varying the number of terms. This is actually how your calculator calculates trig functions, as it is rather hard to do straight up.
__________________
Team 1219: 2009 - Mentor
Team 587: 2005 - Animator, 2006-2008 - Team Captain