REM width;height;charwidth,charheight,number of colors,character set VDU 23,22,1024;600;8,15,16,1 :REM max width is 1920 and 1440 height OFF VDU 5 c=0 REM A mechanical eye. REM doing it right is not simple. So this is why it is open source. REM If you modify this or add to it, the end game is to provide it for humanity REM to freely use for commercial or personal use.. Thankyou for considering this project. REPEAT c=c+1 CLG PROClefteye(500,500,"center",1) UNTIL c=100 d=0 REPEAT d=d+1 CLG PROClefteye(500,500,"right",1) UNTIL d=100 d=0 REPEAT d=d+1 CLG PROClefteye(500,500,"up",1) UNTIL d=100 d=0 REPEAT d=d+1 CLG PROClefteye(500,500,"left",1) UNTIL d=100 d=0 REPEAT d=d+1 CLG PROClefteye(500,500,"down",1) UNTIL d=100 d=0 REPEAT d=d+1 CLG PROClefteye(500,500,"right",1) UNTIL d=100 END DEFPROClefteye(x,y,location$,speed) PRIVATE dx,dy,counx,couny,eyeh,eyev,seyeh,seyev IF counx<x-80 THEN counx=x-80:REM this ensures the pupil stays within eye IF counx>x+80 THEN counx=x+80 IF couny<y-80 THEN couny=y-80 IF couny>y+80 THEN couny=y+80 CASE location$ OF WHEN "center":dx=x:dy=y:eyeh=40:eyev=40 WHEN "right":dx=x+80:dy=y:eyeh=20:eyev=40 WHEN "down":dx=x:dy=y-80:eyev=20:eyeh=40 WHEN "up":dx=x:dy=y+80:eyev=20:eyeh=40 WHEN "left":dx=x-80:dy=y:eyeh=20:eyev=40 ENDCASE IF counx<dx THEN counx=counx+1 IF counx>dx THEN counx=counx-1 IF couny<dy THEN couny=couny+1 IF couny>dy THEN couny=couny-1 IF seyeh<eyeh THEN seyeh+=.4 IF seyeh>eyeh THEN seyeh-=.4 IF seyev<eyev THEN seyev+=.4 IF seyev>eyev THEN seyev-=.4 REM dx, dy is meant to hold the destination of the pupil REM counx,couny is meant to hold the current pupil location REM eyeh,eyev is meant to hold the shape of the pupil as it moves REM speed is the rate that the pupil moves. I am not sure how fast it should move but it will be in decimal value GCOL 15 CIRCLE FILL x,y,100 GCOL 4 ELLIPSE FILL counx,couny,seyeh,seyev GCOL 0 ELLIPSE FILL counx,couny,seyeh/2,seyev/2 WAIT speed ENDPROC