螺旋?

 投稿者:しばっち  投稿日:2013年12月15日(日)18時53分55秒
  CALL GINIT(600,600)
CALL BOXFULL(0,0,599,599,4)
LET K=-50
FOR L=1 TO 4
   READ R,K
   DATA 62,-50
   DATA 115,20
   DATA 161,-30
   DATA 231,10
   LET TH=-90
   LET C=0
   DO
      LET XX=300+R*COS(TH*PI/180)
      LET YY=300+R*SIN(TH*PI/180)
      DO
         LET TH=TH+.5
         LET X0=300+R*COS(TH*PI/180)
         LET Y0=300+R*SIN(TH*PI/180)
      LOOP UNTIL SQR((XX-X0)^2+(YY-Y0)^2)>24
      PLOT LINES
      SET COLOR C
      FOR I=0 TO 4
         LET X=XX+12*COS((I*90+TH+K)*PI/180)
         LET Y=YY+12*SIN((I*90+TH+K)*PI/180)
         PLOT LINES:X,Y;
      NEXT I
      LET C=7-C
   LOOP WHILE TH<270
NEXT L
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) .5,.5,.5
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 BOXFULL(X1,Y1,X2,Y2,C)
SET COLOR C
PLOT AREA:X1,Y1;X2,Y1;X2,Y2;X1,Y2;X1,Y1
END SUB
 

戻る