see if this example can help you is not well documented, but it might help you get the idea when you run it.
Graphics 800,600 Local x# = 0 Local y# = 0 Local angle% = 0 Local radius# =200.0 Local offsetx% = GraphicsWidth() / 2 Local offsety% = GraphicsHeight() / 2 Repeat Cls SetColor 255,255,255 DrawText "Angle: "+ angle,10,10 DrawText "use left & right to change radius",10,45 DrawText "use up & down to change angle",10,60 If KeyDown(key_up) angle = (angle+1)Mod 360 If KeyDown(key_down) angle = (angle-1) Mod 360 If KeyDown(key_left) And radius >1.0 radius :-1.0 If KeyDown(key_right) And radius < 280.0 radius :+ 1.0 x = Cos(angle) y = Sin(angle) SetColor 255,0,0 DrawLine(offsetx,offsety,offsetx+x*radius,offsety+y*radius) SetRotation(angle) DrawText "radius ="+radius,offsetx,offsety SetRotation(0) SetColor 0,255,0 DrawText "x=cos("+angle+")*radius="+x*radius,offsetx,offsety+(y*radius) DrawLine(offsetx+x*radius,offsety+y*radius,offsetx,offsety+y*radius) DrawText "x/r = cos(Angle) ="+x,10,20 SetColor 0,0,255 DrawLine(offsetx+x*radius,offsety+y*radius,offsetx+x*radius,offsety) DrawText "y=sin("+angle+")*radius="+y*radius,offsetx+(x*radius)+5,offsety'+(y*radius)+10 DrawText "y/r = sin(Angle) = "+y, 10,32 Flip() Until KeyDown(key_escape)