1479743801



データ文によって複数の文字を書く


10 SET WINDOW 0,300,300,0 

    

   DATA 12,12.0,0.05,.1,17,22.0,0.05,-.1,22,12.0,0.05,.1,27,22,0.05,-.1

    

   DATA 39,12,0,.1 

    

   DATA 48,22,0,-0.1,51,12,0.05,0.1,59,22,0,-0.1,59,12,0,0

    

50 READ IF MISSING THEN 2000 : m,n,p,q

    

    

   FOR a=0 TO 5.1*PI

    

      LET xs=1.5*(SIN (a))

      LET ys=1.5*(COS (a))     

       

      DRAW disk WITH SCALE(0.2)*SHIFT(m+xs,n+ys)

       

      FOR ti=0 TO 500000

      NEXT ti

       

   NEXT a

    

110 LET x=x+p

    LET y=y+q

          

150 DRAW disk WITH SCALE(2)*SHIFT(m+x,n+y)

     

200 IF x>5 THEN GOTO 1000

220 IF y>10 THEN GOTO 1000

240 IF y<-10 THEN GOTO 1000

260 IF x=0 THEN GOTO 280

280 IF y=0 THEN GOTO 1000  

     

300 FOR ti=0 TO 10000

    NEXT ti

     

    GOTO 110

     

1000 LET x=0

     LET y=0

      

     GOTO 50

      

2000 END

1479661128


丸が動いて文字を書く


10 SET WINDOW 0,300,300,0     
20 FOR ti=0 TO 10000000
   NEXT ti 
      CLEAR
       LET m=20 
  LET n=125
       FOR a=0 TO 5.1*PI
          clear
             LET x=10*(SIN (a))
      LET y=10*(COS (a))
                  DRAW disk WITH SCALE(10)*SHIFT(m+x,n+y)
             FOR ti=0 TO 1000000
      NEXT ti
          NEXT a
100 LET x=0
    LET y=0
    LET m=20
    LET n=120     
110 LET x=x+1
    LET y=y+1
150 DRAW disk WITH SCALE(10)*SHIFT(m+x/2,n+y)     
200 IF x>100 THEN GOTO 400     
300 FOR ti=0 TO 100000
    NEXT ti 
        GOTO 110     
400 LET x=0
    LET y=0
    LET m=70
    LET n=220     
420 LET x=x+1
    LET y=y-1
         DRAW disk WITH SCALE(10)*SHIFT(m+x/2,n+y)
         IF x>100 THEN GOTO 500
         FOR ti=0 TO 100000
    NEXT ti         
GOTO 420          
500 LET x=0
    LET y=0
    LET m=120
    LET n=120     
520 LET x=x+1
    LET y=y+1 
        DRAW disk WITH SCALE(10)*SHIFT(m+x/2,n+y)
         IF x>100 THEN GOTO 600
         FOR ti=0 TO 100000
    NEXT ti
         GOTO 520     
600 LET x=0
    LET y=0
    LET m=170
    LET n=220     
620 LET x=x+1
    LET y=y-1
         DRAW disk WITH SCALE(10)*SHIFT(m+x/2,n+y)
         IF x>100 THEN GOTO 20
         FOR ti=0 TO 100000
    NEXT ti
         GOTO 620

          1000 END

1476354867


らせん正多角形


40行の2.5を変えると多角形が変化する


10 DEF g(t)=SIN(t)

20 SET WINDOW -8,8,-8,8

30 DRAW axes

40 FOR t=0 TO 40*PI STEP PI/2.5

50 PLOT LINES: f(t)*t/20,g(t)*t/20;

60FOR TI=0 TO 10000

NEXT TI

80 NEXT t

90 END

1474489428


テトリスのようなゲーム→球をきれいに並べて積み重ねる


CLEAR

OPTION BASE 1

SET WINDOW  0 , 300 , 0 ,300

20 DIM a(6),b(6)

FOR n=1 TO 6

LET b(n)=400

NEXT n

LET j=-1

LET h=h+40

FOR m=1 TO 6

LET a(m)=150

LET b(m)=300

60 CLEAR

CHARACTER INPUT NOWAIT: a$

IF a$ = "j" THEN LET a(m) = a(m)-1

IF a$ = "k" THEN LET a(m) = a(m)

IF a$ = "l" THEN LET a(m) = a(m)+1

70 LET b(m)=b(m)+j

85 SET AREA COLOR 1

DRAW disk WITH SCALE(20)*SHIFT(a(1),b(1))

SET AREA COLOR 2

DRAW disk WITH SCALE(20)*SHIFT(a(2),b(2))

SET AREA COLOR 3

DRAW disk WITH SCALE(20)*SHIFT(a(3),b(3))

SET AREA COLOR 4

DRAW disk WITH SCALE(20)*SHIFT(a(4),b(4))

SET AREA COLOR 5

DRAW disk WITH SCALE(20)*SHIFT(a(5),b(5))

SET AREA COLOR 7

DRAW disk WITH SCALE(20)*SHIFT(a(6),b(6))

86 FOR k=1 TO 150000

87 NEXT k

140 IF b(m)<h THEN GOTO 330

270 GOTO 60

330 LET b(m)=h

RANDOMIZE

LET j=INT(-3*RND)

500 NEXT m

600 LET sum=a(1)+a(2)+a(3)+a(4)+a(5)+a(6)-720

IF sum>=-10 AND sum<=60 THEN GOTO 20

1000 END


1473973197


標的ゲーム → 当たると球が消える


5 SET WINDOW 0,300,300,0

10 LET a=30

LET b=300

LET i=1

LET j=-1

LET c=80

LET d=300

LET m=1

LET n=-1

LET e=130

LET f=300

LET k=1

LET l=-1

LET c0=3

LET c1=1

LET c2=1

LET c3=1

50 LET y1 = 300

LET a$=""

60 CLEAR

CHARACTER INPUT NOWAIT: a$

IF a$ = "m" THEN LET y1 = y1-1

SET AREA COLOR c0

DRAW disk WITH SCALE(5)*SHIFT(150,y1)

IF y1<10 THEN GOTO 50

70 LET a=a

LET b=b+j

LET c=c

LET d=d+n

LET e=e

LET f=f+l


REM 以下の不等号の範囲を広げると当たりやすくなる。


IF b<152 AND b>148 THEN GOTO 75 ELSE GOTO 76

75 IF y1<32 AND y1>28 THEN GOTO 2500

76 SET AREA COLOR c1

DRAW disk WITH SCALE(3)*SHIFT(b,a)

IF d<153 AND d>147 THEN GOTO 77 ELSE GOTO 78

77 IF y1<85 AND y1>75 THEN GOTO 2510

78 SET AREA COLOR c2

DRAW disk WITH SCALE(6)*SHIFT(d,c)

IF f<155 AND f>145 THEN GOTO 79 ELSE GOTO 80

79 IF y1>120 AND y1<140 THEN GOTO 2520

80 SET AREA COLOR c3

DRAW disk WITH SCALE(10)*SHIFT(f,e)


86 FOR k=1 TO 200000

87 NEXT k

130 IF a<30 THEN GOTO 300

140 IF b<30 THEN GOTO 300

150 IF a>280 THEN GOTO 330

160 IF b>280 THEN GOTO 330

IF c<30 THEN GOTO 1300

IF d<30 THEN GOTO 1300

IF c>280 THEN GOTO 1330

IF d>280 THEN GOTO 1330

IF e<30 THEN GOTO 1340

IF f<30 THEN GOTO 1340

IF e>280 THEN GOTO 1370

IF f>280 THEN GOTO 1370

210 IF a=c THEN 220

220 IF c=d THEN 330

270 GOTO 60

300 LET i=INT(4*RND)

RANDOMIZE

LET j=INT(4*RND)

GOTO 1650

310 LET i=INT(-4*RND)

RANDOMIZE

LET j=INT(4*RND)

GOTO 60

320 LET i=INT(4*RND)

RANDOMIZE

LET j=INT(-4*RND)

GOTO 60

330 LET i=INT(-4*RND)

RANDOMIZE

LET j=INT(-4*RND)

GOTO 60

1300 LET m=INT(4*RND)

RANDOMIZE

LET n=INT(4*RND)

GOTO 1650

1310 LET m=INT(-4*RND)

RANDOMIZE

LET n=INT(4*RND)

GOTO 60

1320 LET m=INT(4*RND)

RANDOMIZE

LET n=INT(-4*RND)

GOTO 60

1330 LET m=INT(-4*RND)

RANDOMIZE

LET n=INT(-4*RND)

GOTO 60

1340 LET k=INT(4*RND)

RANDOMIZE

LET l=INT(4*RND)

GOTO 1650

1350 LET k=INT(-4*RND)

RANDOMIZE

LET l=INT(4*RND)

GOTO 60

1360 LET k=INT(4*RND)

RANDOMIZE

LET l=INT(-4*RND)

GOTO 60

1370 LET k=INT(-4*RND)

RANDOMIZE

LET l=INT(-4*RND)

GOTO 60

1650 LET x1=INT(10*RND)

LET p1=INT(300*RND)

LET q1=INT(300*RND)

SET AREA COLOR x1

REM DRAW disk WITH SCALE(x1)*SHIFT(p1,q1)

1660 LET x2=INT(10*RND)

LET p2=INT(300*RND)

LET q2=INT(300*RND)

SET AREA COLOR x2

REM DRAW disk WITH SCALE(x2)*SHIFT(p2,q2)

1670 LET x3=INT(10*RND)

LET p3=INT(300*RND)

LET q3=INT(300*RND)

SET AREA COLOR x3

REM DRAW disk WITH SCALE(x3)*SHIFT(p3,q3)

1680 REM FOR k=1 TO 300000

REM NEXT k

1700 GOTO 60

2500 LET c1=0

GOTO 76

2510 LET c2=0

GOTO 78

2520 LET c3=0

GOTO 80

END

1473350452

しっぽが動く


SET WINDOW  0 , 300 , 300 , 0
10 FOR n=0 TO 360
15    CLEAR
18    LET  h=SIN(10*n)*10
19    LET  h2=SIN(10*n+10)*10
20    LET  h3=SIN(10*n+20)*10
21    LET  h4=SIN(10*n+30)*10
22    LET  h5=SIN(10*n+40)*10
23    LET  h6=SIN(10*n+50)*10
24    LET  h7=SIN(10*n+60)*10
             SET LINE WIDTH 100
             PLOT LINES: 30,150+h ;70,150+h2;110,150+h3;150,150+h4;190,150+ h5;230,150+h6;270,150+h7       

200    FOR t=1 TO 800000
210    NEXT t
300 NEXT n     
1200 GOTO 10
  END   



らせんを描く



DEF f(t)=COS(t)
DEF g(t)=SIN(t)
SET WINDOW -8,8,-8,8
DRAW axes
FOR t=0 TO 40*pi STEP pi/180
   PLOT LINES: f(t)*t/20,g(t)*t/20;
       FOR TI=0 TO 10000
   NEXT TI 
   NEXT t
END



文字の散開


5 SET WINDOW 0,300,300,0

50 LET a=150

LET b=150

LET i=1

LET j=1

LET c=150

LET d=150

LET m=-1

LET n=1

LET e=150

LET f=150

LET k=0

LET l=1

60 CLEAR

70 LET a=a+i

LET b=b+j

LET c=c+m

LET d=d+n

LET e=e+k

LET f=f-l

85 SET AREA COLOR 1

SET TEXT HEIGHT 20

DRAW disk WITH SCALE(20)*SHIFT(a,b)

SET TEXT COLOR 6

PLOT TEXT ,AT a-10,b+10:"美"

DRAW disk WITH SCALE(20)*SHIFT(c,d)

PLOT TEXT ,AT c-10,d+10:"真"

DRAW disk WITH SCALE(20)*SHIFT(e,f)

PLOT TEXT ,AT e-15,f+10:"善"

86 FOR ti=1 TO 200000

87 NEXT ti

100 IF a>320 THEN GOTO 50

150 GOTO 60

END

1473349481


二つ以上のものを別々にコントロールする。


20 CLEAR
   SET WINDOW  0,300,300,0
25 CHARACTER INPUT NOWAIT: a$
30 IF a$ = "i" THEN LET  y1 = y1-10
40 IF a$ = "j" THEN LET  x1 = x1-10
50 IF a$ = "k" THEN LET  i3 = i3
60 IF a$ = "l" THEN LET  x1 = x1+10
70 IF a$ = "m" THEN LET  y1 = y1+10
130 IF a$ = "w" THEN LET  y2 = y2-10
140 IF a$ = "a" THEN LET  x2 = x2-10
150 IF a$ = "s" THEN LET  i3 = i3
160 IF a$ = "d" THEN LET  x2 = x2+10
170 IF a$ = "z" THEN LET  y2 = y2+10
    
    SET AREA COLOR 3  
200 DRAW disk WITH SCALE(20)*SHIFT(200+x1,150+y1)
    
    SET AREA COLOR 7
250 DRAW disk WITH SCALE(20)*SHIFT(100+x2,150+y2)
    
1000 WAIT DELAY 0.1
1100 GOTO 20
     
     
     END
     

1473348214


キーボードで好きな位置に移動させる




20 CLEAR
   SET WINDOW  0,300,300,0
25 CHARACTER INPUT NOWAIT: a$
30 IF a$ = "i" THEN LET  y = y-10
40 IF a$ = "j" THEN LET  x = x-10
50 IF a$ = "k" THEN LET  i3 = i3
60 IF a$ = "l" THEN LET  x = x+10
70 IF a$ = "m" THEN LET  y = y+10
  
200 DRAW disk WITH SCALE(20)*SHIFT(150+x,150+y)
1000 WAIT DELAY 0.1
1100 GOTO 20
     
     
     END
     



- 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 -