View Single Post
  #7  
Old 05-18-2012, 12:32 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by greggiles View Post
@Tigairius, do you mind explaining a little.
1. What does "i" mean in the this.i?
2. also, what is sin and pi?
this.i is just a random variable name, you could've used this.kljglkjdlgka if you wanted. I am using this.i just to increase the X value of the sine function (explained below).

First, pi is a number- it's a constant that is the ratio of a circle's circumference to its diameter. It is equal to approximately 3.14159 (although it's irrational so it actually goes on "forever").

Pi is used closely in the sine function ( aka: sin(x) ). Sine is a repeating wave across the x axis. So, as X increases, it will yield a number between -1 and 1 (as seen on the graph below).

Its wave-like behavior means that as you increase X, it will fluctuate between positive and negative, allowing for us to use it in that fashion to achieve the desired affect of "rotating forward, then back again".



For more information on sine, pi, cosine, or other trigonometric functions, check wikipedia.

http://en.wikipedia.org/wiki/Sine
http://en.wikipedia.org/wiki/Pi
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote