Today, sine waves, the cool wiggly mathematical lines that are used to represent water and the paths of alien space craft.
Here's a small code snippet to show how to draw them. If, like me, you willfully ignored most of your secondary school math classes - if only they'd told my 13 year old self it was useful for making computer games!
C#:
-
for (int i = 0; i <100; i++)
-
{
-
int x = i;
-
int y = (int) (Math.Sin((double)i * 2.0 * Math.PI / (double)(99)) * 100);
-
graphics.Shapes.DrawPoint(x, y);
-
}



