rem Slinky
rem having fun
randomize
setup:
graphics
sw=screen_width()
sh=screen_height()
s=5
springs=70
timer=150
delay = .04
loop:
'refresh off
graphics clear 0,0,0
gosub spring
'refresh on
goto loop
spring:
if s>15 then s=5
mm=mm+0.5
r=100*sin(mm)
g=100*sin(mm/2)
b=100*sin(mm/3)
if r<20 and g<20 and b<20 then r=100
timer=timer-1
if timer=0 then
s=s+5
timer=150
end if
l=200*sin(b/8)
m=200*cos(b/7)
for a=1 to springs
x=sw/2+l*sin((b+a)/s)
y=sh/2+m*sin((b+a)/20)
draw color r/255,g/255,b/255
draw circle x,y size 50
pause delay
next a
b=b+.05
return
Slinky
-
- Posts: 167
- Joined: Wed Oct 22, 2014 3:26 pm
- My devices: iPhone 4 to 6+,iPad mini to iPad air 2
Slinky
- Attachments
-
- image.jpg (87.59 KiB) Viewed 2110 times
-
- image.jpg (212.87 KiB) Viewed 2110 times
-
- image.jpg (140.97 KiB) Viewed 2110 times
-
- image.jpg (276.49 KiB) Viewed 2110 times
-
- image.jpg (318.28 KiB) Viewed 2110 times
-
- image.jpg (152.21 KiB) Viewed 2110 times