|
!-----------------------
OPTION ARITHMETIC NATIVE
RANDOMIZE
ASK PIXEL SIZE(0,0;1,1) i,j
LET xmax=i-1
LET ymax=j-1
SET WINDOW 0,xmax, 0,ymax
SET TEXT font "",24
PLOT TEXT,AT .28*xmax,.7*ymax:"右クリック停止"
FOR i=0 TO xmax+4 STEP 5
PLOT LINES: i,5+RND*6;
NEXT i
paint 1,1
SET AREA COLOR 0
PLOT AREA: 0,0;xmax,0;xmax,5;0,5
SET DRAW mode notxor
LET del=30 !2重書き 遅延段数
LET stp=2 !y軸 描点間隔
DIM x(del, 5 TO ymax-5)
LET dd=del
LET i9=xmax/2
LET t0=TIME
DO
LET i8=xmax*RND
FOR i9=i9 TO i8 STEP (i8-i9)/400
LET i=i9
FOR j=5 TO ymax-5 STEP stp
IF 5< j THEN
PLOT LINES: x(del,j-stp),j-stp; i,j
IF dd=0 THEN PLOT LINES: xb,j-stp; x(1,j),j
END IF
LET xb=x(1,j)
FOR n=2 TO del
LET x(n-1,j)=x(n,j)
NEXT n
LET x(del,j)=i
LET i=i+(RND-.5)*xmax/16
NEXT j
LET dd=dd-SGN(dd)
mouse poll mx,my,ml,mr
IF mr=1 THEN STOP
LET t1=TIME
LET tw=tw+.03-MOD(t1-t0, 86400) !tw=value to keep period .03sec
LET t0=t1
IF .01<=tw THEN WAIT DELAY tw
NEXT i9
! PRINT TRUNCATE(tw,3);
LOOP
END
|
|