what sin (sine) does is to return a value between 0 and 1. for example, sin(90) returns one, and sin(0) returns 0. However, cos (cosine) is the opposite of sin, so cos(90) returns 0 and cos(0) returns 1. No matter how high the number is, sin and cos will always return a value between 0 and 1. If you drew graphs of them, they would look a bit like this:
sine
sync on:sync rate 60
set text size 16
global x#=0
global y#=0
x#=screen width()/2
y#=screen height()/2
do
line x#-270,y#,x#+270,y#
line x#,y#+100,x#,y#-100
text x#-6,y#-6,"0"
text x#-10,y#-100,"1"
text x#-20,y#+84,"-1"
for i=-270 to 270
dot i+x#,sin(i)*100+y#
next i
sync
loop
cosine
sync on:sync rate 60
set text size 16
global x#=0
global y#=0
x#=screen width()/2
y#=screen height()/2
do
line x#-270,y#,x#+270,y#
line x#,y#+100,x#,y#-100
text x#-6,y#-6,"0"
text x#-10,y#-100,"1"
text x#-20,y#+84,"-1"
for i=-270 to 270
dot i+x#,cos(i)*100+y#
next i
sync
loop
However, Tan (tangent) is different. It too returns a curve, but at 180 it shoots down to minus infinity, and at -180 it shoots up to infinity, then repeating for ever, just like cos or sin.
if you wanted to work out a curve, you would probably use sin and cos together, like Benjamin has done.
Part of solving the problem is actually noticing that the problem is there in the first place