I'm horrible at math as well, but sin and cos map out the vertical and horizontal placement, respectively, of an angle(θ), as the picture demonstrates(ignore all the extra stuff, as just the blue and red lines are important).
Now you just wait until someone good at math comes and rips my post apart.
Just remember, gscript uses radians(0-pi*2) instead of degrees(0-360):
PHP Code:
function onCreated() {
temp.ang = 0;
for (temp.i=0;i<500;i++) {
temp.px = i;
temp.py = sin(ang)*50; // this is the wave, the 50 would be the amplitude, I guess
ang += pi/10; // increases the angle, change this to change the frequency, I think
}
}
Should show a wave at px/py if you display it somehow with showimg or something.