My uncle and I tried to produce a sin graph in basic a couple of years ago but we never figured it out. This one is for you Uncle Paul!
#define white RGB(255,255,255)
#define red RGB(255,0,0)
void autoexec()
{
int current_color=red;
int x=20;
int y=130;
int i=0;
int test=1;
int amplitude=50;//height
int frequency=720;//width or range
int accuracy=24;//amount of circles
while (!key[SCAN_ESC])
{
if (mouse.l)
{
for(i=0; i<=frequency; i+=accuracy)
{
x=x+5;
test=(sin(i)*amplitude)>>16;
CircleFill(x, y-test, 2, 1, current_color, screen);
}
mouse.l=0;
}
Line(20,130,x,130,white,screen);
ShowPage();
}
Exit('');
}