回転アニメーション2

 投稿者:しばっち  投稿日:2012年 5月29日(火)20時42分18秒
  CALL GINIT(400,400)
LET X=200
LET Y=200
LET R=200
SET AREA COLOR 2
FOR N=5 TO 13 STEP 2
   LET THETA=360/N
   FOR ST=25 TO 360 STEP 20
      FOR K=0 TO 360*5 STEP ST
         LET KK=K*PI/180
         SET DRAW MODE HIDDEN
         CLEAR
         FOR TT=0 TO 360 STEP 360/N
            LET T=TT*PI/180
            LET TH=THETA/4*PI/180
            LET X1=X+R*COS(PI/2+T+KK)
            LET Y1=Y-R*SIN(PI/2+T+KK)
            LET L=TAN(TH)*R
            LET X2=X+L*COS(PI+T+KK)
            LET Y2=Y-L*SIN(PI+T+KK)
            LET X3=X+L*COS(T+KK)
            LET Y3=Y-L*SIN(T+KK)
            PLOT AREA:X1,Y1;X2,Y2;X3,Y3;X1,Y1
         NEXT TT
         SET DRAW MODE EXPLICIT
         WAIT DELAY .1
      NEXT K
   NEXT ST
NEXT N
END

EXTERNAL  SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW  0 , XSIZE-1 , YSIZE-1, 0
SET POINT STYLE  1
SET COLOR MODE "REGULAR"
SET COLOR MIX(0) 0,0,0
SET COLOR MIX(1) 0,0,1
SET COLOR MIX(2) 1,0,0
SET COLOR MIX(3) 1,0,1
SET COLOR MIX(4) 0,1,0
SET COLOR MIX(5) 0,1,1
SET COLOR MIX(6) 1,1,0
SET COLOR MIX(7) 1,1,1
CLEAR
END SUB

 

戻る