呼吸してる?

 投稿者:しばっち  投稿日:2013年12月15日(日)18時55分49秒
  CALL GINIT(600,600)
DIM X(4),Y(4)
DO
   FOR TH=0 TO 360 STEP 5
      FOR I=1 TO 4
         LET X(I)=300+170*COS((I*90+TH)*PI/180)
         LET Y(I)=300+170*SIN((I*90+TH)*PI/180)
      NEXT I
      SET DRAW MODE HIDDEN
      CLEAR
      SET COLOR 2
      MAT PLOT AREA:X,Y
      MOUSE POLL XX,YY,LEFT,RIGHT
      IF RIGHT=1 THEN STOP
      IF LEFT=0 THEN  !'左クリック中、描画なし
         CALL CIRCLEFULL(140,300,80,7)
         CALL CIRCLEFULL(460,300,80,7)
         CALL CIRCLEFULL(300,140,80,7)
         CALL CIRCLEFULL(300,460,80,7)
      END IF
      SET DRAW MODE EXPLICIT
      WAIT DELAY 1/16
   NEXT TH
LOOP
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

EXTERNAL SUB CIRCLEFULL(X,Y,RR,C)
SET COLOR C
DRAW DISK WITH SCALE(RR)*SHIFT(X,Y)
END SUB
 

戻る