Hi,
Stone age programming.
'--Rotating PLANETS
'--Davey W Taylor
'--audio.squad@mailbox.swipnet.se
'-- ported to Lua by Cybermonkey
'-- ported to OxygenBasic by P. Wirbelauer
'--- setup ---
include "ss.inc"
OpenWindow 640,480,1
int moonspin = 16
int earthspin = 4
int yflip
'cls 0,0,0
a = 1
yflip = earthspin + yflip
single d, di, r, ri, s, x, y, d2, r2, s2, t, x2, y2
while Key(27)=0
cls 0,0,0
d = (d + earthspin) % 360
r = d * (pi / 180)
di = (di + yflip) % 360
ri = di * (pi / 180)
s = 10 + (cos(r) * 10)
x = 320 + (200 * sin(r))
y = 175 + (50 * sin(ri))
d2 = (d2 + moonspin) % 360
r2 = d2 * (pi / 180)
s2 = 4 + (cos(r2) * 2) + (cos(r) * 2)
t = 50 + (25 * cos(r))
x2 = x + (t * sin(r2))
y2 = y + (4 * cos(r2))
iF (10 *cos(r)) >= 0 then
color 255,255,0,255
fillcircle 320, 175, 100
End iF
iF (10 * cos(r2)) <= 0 then
color 100,100,100,255
fillcircle x2, y2, s2
End iF
color 0,0,255,255
fillcircle x, y, s
iF (10 * cos(r2)) > 0 then
Color 100,100,100,255
fillcircle x2, y2, s2
End iF
iF (10 * cos(r)) < 0 then
color 255,255,0,255
fillcircle (320, 175, 100)
End iF
Sync
Wait 10
wend
CloseWindow