ScratchData LogoScratchData
Back to Paddle2SeeFixIt's profile

Cosine Calculation

PAPaddle2SeeFixIt•Created March 23, 2008
Cosine Calculation
7
3
399 views
View on Scratch

Description

This project shows how the Cosine function can be calculated using the Taylor Series formula. In this example, I am using only the first 5 terms of the series and getting results accurate to 5 places over most of the range of angles. I've intentionally slowed the calculation down so you can watch the values change as the terms are added on. The values of Cosine are multipled by 100000 so as to work around the limited Scratch variable display which only displays one place to the right of the decimal point. Note that the denominator of the fractions are using Factorial notation with the exclamation mark (!). The factorial of a number is that number times all the integers less than it. For example 8! = 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 Once you have the Cosine, the Sine can easily be derived using the Pythogorian equation: Sin^2 + Cos^2 = 1 Where ^2 means raised to the second power (squared).

Project Details

Project ID125979
CreatedMarch 23, 2008
Last ModifiedMarch 23, 2008
SharedMarch 23, 2008
Visibilityvisible
CommentsAllowed