The sinus and the cosinus brotherhood

This is the story about the sinus and cosinus brotherhood. Sinus and Cosinus (Sin() and Cos() for friends) are bro's. They live in a neighbourhood called Unity Circle.

Cos and Sin are both Values. While Cos represents the 'projected length' of the Unity Radius on the horizontal axis, Sin represents the 'projected length' of that very same Radius on the vertical axis. This is not always the case, but basically you can say Cos is the projected length on the adjacent side (adjacent to the angle) and Sin is the projected length on the side across from the angle.

When that angle (alpha, i.e. the Greek 'a') is zero, Cos is consequently 1 and Sin is 0. When the angle is 90 degrees, Cos is 0 and Sin is 1. And you can see what the values of Cos and Sin are for other angle values above. You've probably seen already that at 180 degrees, Cos is -1 and Sin is 0, while Cos is 0 and Sin is -1 at 270 degrees. And l'histoire ce repÍte after 360 degrees. All right, so Cos and Sin, they're both borderline weirdo's as only those scientific Math types can handle negative lengths. Totally ridiculous in 'real life out there', yet negative length does exist in their neighbourhood. And it is thriving.

The Unity Circle is a circle. But it is a bit of a special circle, and feeling blue today. It has a radius of 1 (and thus a diameter of 2). Again, the Math propellerheads have trouble with units as it ain't 1 inch nor 1 millimetre let alone 1 mile. It's just 'one'. Just 'one'. 1. Now we see our Radius (which has length '1' ) rotating. If a line, called 'radius', rotates around a point, it's other 'end point' (the blue head) draws a circle. The Unity Circle in this case.

The length of the radius is always 1. At all times. But sometimes the other geeks like to know what the 'projected length' is: the part of the length across x or y or other axis. For that they have a collection of smart folks doing all sort of goniometric stuff. And these people use Cos and Sin a lot. Look at the demo above and see the red Cos line and Green Sin line grow and shrink in length while Radius rotates.

Meanwhile there's the red dotted Cos() and green dotted Sin() curve being built next to the Unity Circle. The horizontal axis of this graph depicts alpha (the angle of rotation, going from 0 to 720 degrees in this demo), while the 'projected lengths', i.e. Cos() and Sin() values for each rotation value are displayed vertically, going from +1 to -1. Old values fade away ('Trail distance' and 'Trail size' allow you to change this), while the scene repeats itself every 720 degrees: see the blue dotted angle of rotation grow to 720 degrees (i.e. going around twice) and restart at 0 degrees.

This Flash demo was created as part of a basic basic math course, using Math and Flash. See the downloadable FLA for the code, comments and 'special activity' you need to perform when converting goniometric math formulas to Flash. For one, the most important difference between computers and math is that math often uses a orthogonal coordinate system (x axis and y axis are perpendicular to each other; both have the same size of a length '1' while increasing positive values on the x axis progress in the right (positive horizontal) direction and increasing positive values on the y axis progress to the top (positive vertical) direction.

With computers, on the other hand, increasing positive values on the y axis progress to the bottom (negative vertical) direction. This requires some additional +/- sign swapping before formulas work with computer displays (and Flash). Sigh.

Note the multiple application of the 'Circular Preloader' mechanism for showing the growing (blue dotted) angle of rotation.

[Hm, this needs some more graphics and a better explanation if this is going to be a stand-alone gonio 'lesson' for Flash. :-( ]

You might want to have a look at:, and And maybe some other stuff at (Try plotting 'y=sin(x)' for x = 0 to 7 at, for instance. ;-)