|
! 万華 三角 ( ver.7.5.0 以降で動きます)
!-----------------------------------------
OPTION ARITHMETIC COMPLEX
SET WINDOW -1.1,1.1,-1.1,1.1
LET nn=50
DIM S(nn), R(nn), col(nn), A(nn), B(nn), C(nn), G(nn)
PICTURE tri(A,B,C)
PLOT AREA: A;B;C
END PICTURE
SET DRAW mode notxor
RANDOMIZE
DO
FOR i=1 TO nn
LET S(i)=COMPLEX(RND-.5,RND-.5)
LET R(i)=RND-.5
LET col(i)=RND*9+1.5 !=ROUND( RND*9+1.5 )
LET A(i)=COMPLEX(RND,RND)
LET B(i)=COMPLEX(RND,RND)
LET C(i)=COMPLEX(RND,RND)
LET G(i)=(A(i)+B(i)+C(i))/3
NEXT i
LET t1=TIME
IF 1< t1-t0 THEN LET t0=t1
FOR θ=θ TO θ+3.4*PI STEP PI/32
SET DRAW mode hidden
CLEAR
FOR i=1 TO nn
SET AREA COLOR col(i)
DRAW tri(A(i),B(i),C(i)) WITH SHIFT(-G(i))*ROTATE(θ*R(i))*SHIFT(re(S(i))+.1*SIN(.4*θ), MAX(-.5,im(S(i))+.5*SIN(θ)-.3))*SCALE((SIN(θ)+1)/3+1)
NEXT i
SET DRAW mode explicit
LET t2=t1
LET t1=TIME
IF t1< t2 THEN LET t0=t0-86400
LET t0=t0+.075
WAIT DELAY t0-t1
mouse poll x,y,mlb,mrb
IF mrb=1 THEN STOP !右クリック終了
NEXT θ
LOOP
END
|
|