Another variation:
multiplier# = 70
frequency# = 1
for a = 100 to 540
make object box a,2,2,200
color object a,RGB(rnd(255),rnd(255),rnd(255))
ghost object on a,2
next a
position camera 0, 0, -250
sync on
Repeat
text 0, 0, "control camera using arrow keys"
text 0, 16, "control sinewave with WASD keys"
If scancode()=17 then multiplier#=multiplier#-1
If scancode()=31 then multiplier#=multiplier#+1
If scancode()=30 then frequency#=frequency#-0.1
If scancode()=32 then frequency#=frequency#+0.1
i#=angle#
For x=100 To 540
position object x, x-300, (Sin(i#)*multiplier#), 0
`dot x,200+(Sin(i#)*multiplier#)
i#=i#+frequency#
Next
angle#=wrapvalue(angle#+2)
control camera using arrowkeys 0, 1, 1
sync
until escapekey()
-JerBil
Ad Astra Per Asper