Sync on : Sync rate 60
Set display mode 1024,768,16 : Hide Mouse
#CONSTANT mx screen width()/2
#CONSTANT my screen height()/2
createplain(1,500,700)
DO
CLS
ax#=wrapvalue(ax#+2)
showplain(1,mx,my,int(ax#),0)
ellipse mx,my,20,20*cos(ax#)
SYNC
LOOP
function createplain(obj,wd,ht)
dim px(obj,4) : dim py(obj,4)
dim wd(obj) : dim ht(obj)
wd(obj)=wd : ht(obj)=ht
endfunction
function showplain(obj,x,y,ax,ay)
px(obj,1)=(x-(sin(ay+90)*(wd(obj)/2)))+(sin(ax)*(ht(obj)/5)) : py(obj,1)=y-(cos(ax)*(ht(obj)/2))+(cos(ay+90)*(wd(obj)/5))
px(obj,2)=(x+(sin(ay+90)*(wd(obj)/2)))-(sin(ax)*(ht(obj)/5)) : py(obj,2)=y-(cos(ax)*(ht(obj)/2))-(cos(ay+90)*(wd(obj)/5))
px(obj,3)=(x-(sin(ay+90)*(wd(obj)/2)))-(sin(ax)*(ht(obj)/5)) : py(obj,3)=y+(cos(ax)*(ht(obj)/2))-(cos(ay+90)*(wd(obj)/5))
px(obj,4)=(x+(sin(ay+90)*(wd(obj)/2)))+(sin(ax)*(ht(obj)/5)) : py(obj,4)=y+(cos(ax)*(ht(obj)/2))+(cos(ay+90)*(wd(obj)/5))
line px(obj,1),py(obj,1),px(obj,2),py(obj,2)
line px(obj,3),py(obj,3),px(obj,4),py(obj,4)
line px(obj,1),py(obj,1),px(obj,3),py(obj,3)
line px(obj,2),py(obj,2),px(obj,4),py(obj,4)
endfunction
Cool uh?