I was bored, what else does one do when one is bored?
`Setup
Sync on : Sync rate 60
Hide mouse
`Variables
spd=3
sze=50
px=420
py=240
wx=200
wy=240
jx=wx
jy=350
sx=jx
sy=400
ssx=300
ssy=400
nwx=ssx
nwy=300
alx=400
aly=nwy
`*Main Loop*
Do
Cls
`Control piston
ink rgb(255,0,0),0
pa=wrapvalue(pa+spd)
pox=sin(pa)*sze
line (px+pox)-(sze),py,(px+pox)+(sze),py
`Wheel
ink rgb(0,255,0),0
circle wx,wy,sze
`Lines
ink rgb(0,128,255),0
wa=wrapvalue(wa+spd)
wox=sin(wa)*sze
woy=cos(wa)*sze
line wx+wox,wy+woy,(px+pox)-(sze),py
ink rgb(255,0,255),0
line wx+wox,wy+woy,wx,wy : line wx-wox,wy-woy,wx,wy
`From wheel to join
ink rgb(255,255,0),0
joy=cos(wrapvalue(wa+180))*sze
line wx-wox,wy-woy,jx,jy+joy
ink rgb(128,128,255),0
line jx,jy+joy,sx,sy+joy
`sea saw
ink rgb(255,0,0),0
line sx,sy+joy,ssx,ssy
line ssx,ssy,ssx+(ssx-sx),ssy+(ssy-(sy+joy))
`Next wheel
ink rgb(255,128,255),0
circle nwx+(ssx-sx),nwy,sze
ink rgb(128,128,255),0
line ssx+(ssx-sx),ssy+(ssy-(sy+joy)),nwx+((ssx-sx)+wox),nwy+(ssy-(sy+joy))
ink rgb(255,0,128),0
line nwx+((ssx-sx)+wox),nwy+(ssy-(sy+joy)),nwx+(ssx-sx),nwy
line nwx+(ssx-sx),nwy,nwx+((ssx-sx)-wox),nwy+(ssy-(sy-joy))
`Another line
ink rgb(255,255,0),0
line nwx+((ssx-sx)-wox),nwy+(ssy-(sy-joy)),alx+((ssx-sx)-wox),aly
`Finish
ink rgb(0,128,255),0
line alx+((ssx-sx)-wox),aly,(px+pox)+(sze),py
`Alter speed
ink rgb(255,255,255),0
text 10,10,"Use up and down arrow keys to change the speed"
if upkey()=1
inc spdchu
endif
if downkey()=1
inc spdchd
endif
if spdchu>3 then inc spd : spdchu=0
if spdchd>3 then dec spd : spdchd=0
if upkey()=0 then spdchu=0
if downkey()=0 then spdchd=0
text 10,30,"Speed: "+str$(spd)
`*End Loop*
Sync
Loop
Note: Check it out when the speed it at 178, it looks cool.