teacup. [ 掲示板 ] [ 掲示板作成 ] [ 有料掲示板 ] [ ブログ ]

 投稿者
  題名
  内容 入力補助画像・ファイル<IMG>タグが利用可能です。(詳細)
    
 URL
[ ケータイで使う ] [ BBSティッカー ] [ 書込み通知 ] [ 検索 ]

スレッド一覧

  1. スレッドが使えます(2)
  2. Paract BASIC(22)
  3. Amusement_Program(10)
  4. 改修予定のJIS非互換(3)
  5. 複数ページ長編プログラム(新規投稿)(16)
  6. 「十進BASIC第2掲示板」投稿記事リスト(17)
  7. Full BASIC互換ライブラリ(8)
  8. 「十進BASIC掲示板過去ログ」インデックス(トピック)(17)
  9. 人の色覚の数理(14)
  10. 「十進BASIC掲示板過去ログ」インデックス(ツリー)(91)
スレッド一覧(全10)  他のスレッドを探す  スレッド作成

*掲示板をお持ちでない方へ、まずは掲示板を作成しましょう。無料掲示板作成


PS(EPS)ファイルを作る

 投稿者:しばっち  投稿日:2019年 2月16日(土)19時35分42秒
返信・引用
  https://hp.vector.co.jp/authors/VA008683/QA9.htm


下記のようにすれば直接 PS(EPS)ファイルを書き出せる。

http://denki.nara-edu.ac.jp/~yabu/soft/ps.html
http://ruby.kyoto-wu.ac.jp/~konami/Documents/ps/psmemo.html
https://oku.edu.mie-u.ac.jp/~okumura/ps/


PUBLIC NUMERIC L1,L2,LTH,RTH,XSIZE,YSIZE
LET XSIZE=600
LET YSIZE=600
FILE GETSAVENAME F$,"PSファイル|*.ps"
IF F$="" THEN STOP
IF POS(UCASE$(F$),".PS")=0 THEN LET F$=F$ & ".ps"
CALL GINIT(F$,XSIZE,YSIZE)
INPUT PROMPT "LEVEL=":N
LET L1=1/SQR(3)
LET L2=2/3
LET LTH=22.5
LET RTH=0
CALL RECURSIVE(N,0,300,600,300,1,#1)
CALL GCLOSE

SUB GINIT(F$,XSIZE,YSIZE)
   OPEN #1:NAME F$
   ERASE #1
   PRINT #1:"%!"
   PRINT #1:"%%BoundingBox: 0 0";XSIZE;YSIZE
   PRINT #1:"newpath"
   SET BITMAP SIZE XSIZE,YSIZE
   SET WINDOW 0,XSIZE-1,0,YSIZE-1
   CLEAR
END SUB

SUB GCLOSE
   PRINT #1:"showpage"
   CLOSE #1
END SUB
END

EXTERNAL  SUB RECURSIVE(N,X1,Y1,X2,Y2,SIGN,#1) !'葉脈
IF N=0 THEN
   CALL LINE(X1,Y1,X2,Y2,#1)
ELSE
   LET AX=L1*(X2-X1)*COS(SIGN*LTH*PI/180)-L1*(Y2-Y1)*SIN(SIGN*LTH*PI/180)+X1
   LET AY=L1*(X2-X1)*SIN(SIGN*LTH*PI/180)+L1*(Y2-Y1)*COS(SIGN*LTH*PI/180)+Y1
   CALL RECURSIVE(N-1,X1,Y1,AX,AY,-SIGN,#1)
   LET AX=L2*(X1-X2)*COS(-SIGN*RTH*PI/180)-L2*(Y1-Y2)*SIN(-SIGN*RTH*PI/180)+X2
   LET AY=L2*(X1-X2)*SIN(-SIGN*RTH*PI/180)+L2*(Y1-Y2)*COS(-SIGN*RTH*PI/180)+Y2
   CALL RECURSIVE(N-1,AX,AY,X2,Y2,-SIGN,#1)
END IF
END SUB

EXTERNAL  SUB LINE(XS,YS,XE,YE,#1)
PLOT LINES:XS,YS;XE,YE
PRINT #1:PIXELX(XS);PIXELY(YS);"moveto"
PRINT #1:PIXELX(XE);PIXELY(YE);"lineto"
PRINT #1:"stroke"
END SUB
 
 

Re: 仕様でしょうか?

 投稿者:SHIRAISHI kazuo  投稿日:2019年 2月12日(火)20時12分39秒
返信・引用
  > No.4631[元記事へ]

範囲外の数値を指定すると-1になります。

SET COLOR MODE "NATIVE"
PRINT COLORINDEX(-1,-1,1)
END

 

仕様でしょうか?

 投稿者:しばっち  投稿日:2019年 2月 9日(土)19時47分17秒
返信・引用
  COLORINDEX文について0以上1以下の数値でとなっていますが、エラーにはなりません。
仕様でしょうか?

SET COLOR MODE "NATIVE"
SET COLOR COLORINDEX(-1,-1,1)
PLOT AREA:0,0;.5,.5;1,0
END
 

ハッチ

 投稿者:しばっち  投稿日:2019年 2月 9日(土)19時16分5秒
返信・引用
  PLOT AREAのSET AREA STYLE文ではHATCHパターンを
6通りの指定ができますが、下記のように色番号を置き換えることで
自由に定義することができます。
リアルタイム描画(アニメーション)はできませんが、印刷目的(プリンターがモノクロ等)なら利用できると
思います。


RANDOMIZE
SET POINT STYLE 1
FOR I=1 TO 100
   LET X=RND
   LET Y=RND
   LET R=RND*.1
   LET C=INT(RND*12)+1
   CALL CIRCLEFULL(X,Y,R,C)
NEXT I
!'SET DRAW MODE HIDDEN
CALL TILEPAINT
!'SET DRAW MODE EXPLICIT
END

EXTERNAL SUB TILEPAINT
OPTION BASE 0
DIM C(255,30,30),XC(255),YC(255)
MAT XC=(1)*CON
MAT YC=(1)*CON
FOR I=0 TO 255
   LET C(I,0,0)=I
NEXT I
DO
   READ IF MISSING THEN EXIT DO:CC
   READ XC(CC),YC(CC)
   FOR J=0 TO YC(CC)-1
      FOR I=0 TO XC(CC)-1
         READ C(CC,I,J)
      NEXT I
   NEXT J
LOOP
DATA 0 !'置き換える色
DATA 12,5 !'サイズ
DATA 0,0,0,0,0,0,0,0,0,0,3,3 !'パターン定義(色番号)
DATA 0,0,0,0,0,0,0,0,3,3,0,0
DATA 0,0,0,0,0,3,3,3,0,0,0,0
DATA 0,0,3,3,3,0,0,0,0,0,0,0
DATA 3,3,0,0,0,0,0,0,0,0,0,0

DATA 1
DATA 5,1
DATA 1,0,0,0,0

DATA 2
DATA 5,5
DATA 1,0,0,0,0
DATA 0,1,0,0,0
DATA 0,0,1,0,0
DATA 0,0,0,1,0
DATA 0,0,0,0,1

DATA 3
DATA 7,7
DATA 0,0,0,0,0,0,0
DATA 0,0,0,1,0,0,0
DATA 0,0,0,1,0,0,0
DATA 0,1,1,1,1,1,0
DATA 0,0,0,1,0,0,0
DATA 0,0,0,1,0,0,0
DATA 0,0,0,0,0,0,0

DATA 4
DATA 8,8
DATA 1,1,1,1,0,0,0,0
DATA 1,1,1,1,0,0,0,0
DATA 1,1,1,1,0,0,0,0
DATA 1,1,1,1,0,0,0,0
DATA 0,0,0,0,1,1,1,1
DATA 0,0,0,0,1,1,1,1
DATA 0,0,0,0,1,1,1,1
DATA 0,0,0,0,1,1,1,1

DATA 5
DATA 8,8
DATA 1,1,1,1,1,1,1,1
DATA 0,0,1,0,0,0,1,0
DATA 0,0,1,0,0,0,1,0
DATA 0,0,1,0,0,0,1,0
DATA 1,1,1,1,1,1,1,1
DATA 1,0,0,0,1,0,0,0
DATA 1,0,0,0,1,0,0,0
DATA 1,0,0,0,1,0,0,0

DATA 6
DATA 17,16
DATA 0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0
DATA 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0
DATA 0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
DATA 0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
DATA 1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
DATA 0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
DATA 0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
DATA 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0
DATA 0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0
DATA 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0
DATA 0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
DATA 0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
DATA 1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
DATA 0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
DATA 0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
DATA 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0

DATA 7
DATA 6,6
DATA 0,0,0,1,0,0
DATA 0,0,1,0,1,0
DATA 0,1,0,0,0,1
DATA 1,0,0,0,0,0
DATA 0,1,0,0,0,1
DATA 0,0,1,0,1,0

DATA 8
DATA 2,2
DATA 7,6
DATA 6,7

DATA 9
DATA 6,5
DATA 4,0,0,0,0,0
DATA 0,4,0,0,0,4
DATA 0,0,4,0,4,0
DATA 0,0,0,4,0,0
DATA 0,0,0,0,0,0

DATA 10
DATA 5,5
DATA 0,0,2,0,0
DATA 0,0,2,0,0
DATA 2,2,2,2,2
DATA 0,0,2,0,0
DATA 0,0,2,0,0
ASK BITMAP SIZE XSIZE,YSIZE
FOR Y=0 TO YSIZE
   FOR X=0 TO XSIZE
      LET XX=WORLDX(X)
      LET YY=WORLDY(YSIZE-Y)
      LET CC=GETPOINT(XX,YY)
      IF CC<>-1 THEN CALL PSET(XX,YY,C(CC,MOD(X,XC(CC)),MOD(Y,YC(CC))))
   NEXT   X
NEXT  Y
END SUB

EXTERNAL SUB PSET(X,Y,C)
SET POINT COLOR C
PLOT POINTS:X,Y
END SUB

EXTERNAL FUNCTION GETPOINT(X,Y)
ASK PIXEL VALUE(X,Y) C
LET GETPOINT=C
END FUNCTION

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

キャラクターの表示

 投稿者:しばっち  投稿日:2019年 2月 9日(土)19時14分36秒
返信・引用
  キャラクターの表示と移動を行います。(動作テスト、試作版)

キャラクターの描画を行い、更にそこからマスクデータを作成します。
画像を一旦消して仮の背景を描画し、背景を乱さずにテンキー矢印キーによる
キャラクターの表示移動をします。2倍に拡大表示しています。
これでRPGも作れるかも!?

キャラクターデータはネット上の画像ファイル(png)を適当に
縮小してから作成しました。

データ文へと変換しましたが画像ファイルから読み込むように
してもいいと思います。


DECLARE EXTERNAL FUNCTION GETKEY
OPTION BASE 0
LET XSIZE=600
LET YSIZE=600
DIM BACK(XSIZE,YSIZE)
CALL GINIT(XSIZE,YSIZE)
!'''SET DRAW MODE HIDDEN
DO !'キャラクター描画
   READ IF MISSING THEN EXIT DO: A$
   READ B$
   LET A$=A$ & B$
   LET X=0
   FOR J=1 TO LEN(A$) STEP 6
      LET R=BVAL(A$(J:J+1),16)
      LET G=BVAL(A$(J+2:J+3),16)
      LET B=BVAL(A$(J+4:J+5),16)
      CALL PSET(X,Y,R,G,B)
      LET X=X+1
   NEXT J
   LET Y=Y+1
LOOP
LET XX=X-1 !'キャラクターサイズ
LET YY=Y-1
DIM MASK(XX,YY),CHARA(XX,YY)
ASK PIXEL ARRAY (0,0) CHARA !'キャラクタービットマップデータ
FOR Y=0 TO YY-1 !'マスクデータ作成
   FOR X=0 TO XX-1
      CALL GETPOINT(X,Y,R,G,B)
      IF R=0 AND G=0 AND B=0 THEN !'キャラクターの背景部分を白へ。それ以外は黒へ
         LET R=255
         LET G=255
         LET B=255
      ELSE
         LET R=0
         LET G=0
         LET B=0
      END IF
      CALL PSET(X,Y,R,G,B)
   NEXT X
NEXT Y
ASK PIXEL ARRAY (0,0) MASK !'マスクビットマップデータ
CLEAR
RANDOMIZE
FOR I=1 TO 150 !'背景描画(仮)
   CALL CIRCLE(RND*800,RND*800,RND*200,RND*255,RND*255,RND*255)
NEXT I
ASK PIXEL ARRAY (0,0) BACK !'背景データ
LET X=0
LET Y=0
LET X0=-1
LET Y0=-1
LET SC=2 !'描画倍率
DO
   LET DX=0
   LET DY=0
   LET S=GETKEY !'キー入力(矢印、テンキー)
   IF GETKEYSTATE(32)<0 OR GETKEYSTATE(27)<0 THEN STOP
   IF S<>-1 THEN !' X,Y 移動量
      IF S=1 OR S=2 OR S=3 THEN LET DY=YY/2
      IF S=7 OR S=8 OR S=9 THEN LET DY=-YY/2
      IF S=1 OR S=4 OR S=7 THEN LET DX=-XX/2
      IF S=3 OR S=6 OR S=9 THEN LET DX=XX/2
      LET T=TIME
      DO
      LOOP WHILE GETKEY=S AND TIME-T<.1
   END IF
   LET X=X+DX
   LET Y=Y+DY
   IF X<0 THEN LET X=0 !'壁の処理
   IF Y<0 THEN LET Y=0
   IF X>XSIZE-XX*SC THEN LET X=XSIZE-XX*SC
   IF Y>YSIZE-YY*SC THEN LET Y=YSIZE-YY*SC
   IF X<>X0 OR Y<>Y0 THEN !'画面描画
      SET DRAW MODE HIDDEN
      SET DRAW MODE OVERWRITE
      MAT PLOT CELLS,IN 0,0; XSIZE-1,YSIZE-1:BACK
      DRAW DISP(XX,YY,CHARA,MASK) WITH SCALE(SC)*SHIFT(X,Y)
      SET DRAW MODE EXPLICIT
      LET X0=X
      LET Y0=Y
   END IF
LOOP
DATA "000000000000000000000000000000161019020202000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000010101885C8E4A334C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000080705000000262121B783C4B064B4352C2900000027231B19130F000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101010101000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000051412F13100C4D464FB88DD9BC6FD38766751714106659461A140F0000000000000000000000000000000000000000000000000000000000000000000404030908082723283F3842433A463731391C1A1C"
DATA "010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "0000000000004C3D2F8C795D82868E7A7ACD7A6DD56E619A886D597C644C0605030000000000000000000000000000000000000000000000000000000000000000003A352D3E3B363734352A262B2C262E2F2A313B373E"
DATA "302D32000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000241D16887261706D7C6B9FD05596D6516B80847888806E6A6659473B31250201010000000000000000000000000000000000000000000101012323238E7F747B67505047443430373B363E3A363E413C45"
DATA "4E4A541F1D20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000040392D7D62527E67518B78656493A83698C772766681644B5F4B3A88747F92776017120E000000000000000000000000000000000000000000030303696464A2978F675D5929272A373339403C4438343A302D32"
DATA "2C292D323033090909000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "02020182705A6255550A0706453426243A3E3D7B8915151134271C2B201894837B8C71663A2C210000000000000000000000000000000000000000000E0D0D403C3C9894922C2B2C2B282A433D3E594D4B2E2C2E302E31"
DATA "2625261E1C1D2F2D2F151414050505000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "0000007E654C41332625221B00000016130F6C5A4609070513110F594B3E4C3B2CAA906D15100C0000000000000000000000000000000000000000000101012624243E3C3C343032554A49AEA2978C8179433D3E423A3A"
DATA "2E2B2B1A18191E1D1D2B292B201E1F141314131214181518151316100F11020101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "06060589715635281D6B5B471715121D221F80887B1A1F1B5146375747370C090684684E201A130000000000000000000000000000000000000000000303031F1C1E2A2729413839684F577F666E82736E6A5A595F474B"
DATA "4E413F281C201C1A1C2120221E1D1E110F11151315100E11110F111E1B1E272327201D21232224232123282628292629282628181718060606000000000000000000000000000000000000000000000000000000000000"
DATA "13100D775D440906055747377C68525169693687C35F6061907357372B200403025947376855400101010000000000000000000000000000000000000A0A0A1E181C2A2427584846B9A8A1D7C7C0CBC3B4CEBFB6B598A6"
DATA "5F5251382127321F2428151A1F1C1E211F210605060101010504040605060303040C0B0C1B181B1412130B0A0A0F0D0E1C1A1B332F32322F32191819010101000000000000000000000000000000000000000000000000"
DATA "3B2E246957470100001D19136756454B493D6180916152455442301E18140505042C29237F736A0D0A070000000000000100001615154644434542403430302B1F232B20254B272CA79B90E2D9C9E2D9C8DFD7C7D6CBBB"
DATA "523B3F471F264321285F2A3441171E2B191D3E353D332D351F1B200D0B0D0807080404040403041714171B191C0908090000000101010B0A0A1F1D1E2C292B0E0D0E000000000000000000000000000000000000000000"
DATA "4C4133645A49040403241C150201011B140E89745954453702010114110E4841394A4538807159080504000000111011504F50BAB9B8DFDCD6E0DDD7D1CDC7A79F9C4F45475822298C6560DCD3C2DCD0C0DCD3C3956D6B"
DATA "59212865272F491F275A242D69232A581D24451A21481F264222292E1F251F1C20211E21262327312D31423D43302C30120F12010000000000000000050405141313110F11000000000000000000000000000000000000"
DATA "241B15765E47463C31110D0A010100392D2362443535261C020101000000231B15705E4B867155010000121212BAB8B6E1E0DDE1DFDDE1DFDAE1DFD9E2E2DCDDD9D3B6ADA9542C318B7574AA9089BEAEA188676463262D"
DATA "7431358147445B3C3A6F403D703C3473443A60212843171E451A1F64252D58212A391D2320181C1A181B242124413D43524C55363137181518050405000000000000050505090809000000000000000000000000000000"
DATA "2019139F917544362B000000271B155430256D28245A241F311A15000000060403715A42836D5001010166605CDBD4CDD9D4CED4CEC7D4CEC8D7D3CCDDDAD4E2E1DADCD5CF8B7E7A745E678B778A7F726D6B5B5D221013"
DATA "654E429A80648E776181604D703D308A3C35A3836E7D5D55542A2F3B161B63202B61212C541F28361B20201B1D221E212824282A262C262227241F240F0D0F000000000000040303030202000000000000000000000000"
DATA "15100C75735E251B140E0B0A4F382F391F1979352E5F252254464502020200000045473B6E634E3A3633C1B3AACCC3BACDC3BACBC0B5CABFB4CFC4BBD3CBC3DBD6D0E1E0D8D1C8C170635FAFA094917B648E7D6787796F"
DATA "513E3A79604AAD8F6C8E674E71585286664D67392B977E77CFCDCE886A6E67283064212A5C1F255C2028491C232E22262C21262F22282320242B262C29242A131114010101000000090707000000000000000000000000"
DATA "090705806E56281E163B2F2A251A172A1C167F3B356C413E7D6760424037000000745E46403429A39C95C7B8AEC6B5A8C9B8AAC7B4A5B9A192C1AD9FC6B5A9CEC2B9D7D0C8DEDAD193867F988F85D0C3B17D8D8ED2CEBF"
DATA "B6A6985E4D42AD906D9D8873D4D1CE8C736C6F3D2F987C66D1D0CEDCDBDBBAACAD81555968232B5F1E255E1F25511E254032384A363F3B252D433C442621271713161714170000000A0708000000000000000000000000"
DATA "0000004D41324E3F306149400605040C08064A18186A47466F4D3F815947462A227C6249322D28CEC2B8CCBBAFCDB8A9C3A996A186738656458953439D8377C1AA9CC8B7AAD1C4B9C8BCB3C2B8A9E0D8C6CBC1B3DACBB9"
DATA "E2D8C7C8C1B1A89886A6968CE1E1E1C8BFBB6F43388D7053988179E2E2E2E2E2E2DDDCDB81585B6A222A6820296321275A242A3B32383F2129331D232B262A2320250F0C0E0F0D0F0B080A000000000000000000000000"
DATA "0000000E0A07795E474939330000000000003513126533294F33246E463D8C5C4B85634D594E46A69184B39484B2907AA585707147388142338F5046792D258F7065B8A292C1AEA1B4857CA56C59B5A790D1CDBBD5C1AF"
DATA "DBD4C2BFB49F9B886FA85444C69F9CD6D0CD754842713C31A97864CEC6C2E2E2E1E2E2E2C7C0BF7F3E426B22296E242C69232A49242A2D252B461D24301C22201C21181518050404141113000000000000000000000000"
DATA "000000000000544436473F330000000000002D12114C1D1B140E0A654B3B7B5A4B744137954B418E4A3F9C6150865C4D7643347546347E3B2EA22C289D2C254E2A1E66514276362DBB2720B74B3B8A715A9C7C63967D6A"
DATA "AA9B88685162957C617D453CAB322EC2B0A98156526B39318E67509F655ED5CCC5E1DFDEE2E1E0AA8F8C78282D64202567212767262C261E223E262E48191F28191E19161A0F0D0F141114000000000000000000000000"
DATA "000000000000604F4366594B18181700000025171254342A010100362E24704F42602E2E574237893831A92A299A423B86322B984C3D7D38317B382E6A44365734287C664F733026971E1C9B28246E4D3E6F5A6472595A"
DATA "82675A4E3E6647344A3A29257E231EA8867D8756555D2F2D72473CA76755A98C7DCFC1B8E0DFDCCEC8C48234387524294C181B68212634232A251E254A1E24451C231815191F1B21100D0F030303000000000000000000"
DATA "0000000D0A095B473E0A07055E4E413E3933403529846D534A443A79675176644A6638356D3E3B5D43368039336C3730441A1B5E1A175D30316934335A322B644B4682654C6B3D318F2B2C8C29294627243C2B394A394B"
DATA "59595C3E29553D274E3826258A3B388A6D6278363E693432672D2D8E5747916350B19C8FDAD5D0E1DFDE945C5C601F227726293512133E262D1D171C3F242B4E1B2223191F19151A050405080608000000000000000000"
DATA "000000231A1932262338362C9F95758973587459428062487B66509C8463917B5C87725C704039642E2F6F4A405E44394A2D264B282344324B55415E5A40586F585F8A6D53694F3A6725259C3739482825483338483B42"
DATA "5B6E72503847432C3D351F2352373F453042631F2F7F373A75312F997B6094654EAC756AD6CDC6E2E2E2AD8F8D6E25286722243B15153322282D1B202F2128521D2426161A1D1A1E09080A080608000000000000000000"
DATA "0000004F3F35302822796C544C3A2A543E2D4F3C2C795A415A493731241A1F161074604C7B635266453F4C2A2855362F63302D563642473555564165634D736C575F856A507C6147774133892F2A44221C3928373B2957"
DATA "74525D503B6934243052282E3B2A4B372347311F335F3A3067292C5B2724603F3197564ECCBDB3E1DFDCC2B4B0782D2A411719672426251E25351B1F361D214A2329261115231F231210120B090A000000000000000000"
DATA "000000644E42261F192E241A01010022181135261B977C5D3F2F2217100C070707897C6FB4A2979D86806B48416C443B6A4F5250374A453153513A5E5E486D654F636F57497B655064372EA12F29782E26392A3242335E"
DATA "8062725A48684B3A4865343A3B284A3320422F1E3C341E2C6C2B2C911B29742A2A926256C6B2A7E0DCD7D8D4CE86463F240E0E7E3539221B213B1D204D2024371B20210D0F282327252125030303000000000000000000"
DATA "000000513D3740392B53463412100C0605040E0A078A6749211811151310332B229480659F866AA68F849E867BA58C825B495252363D422D4D483254583C64553D6159425E5D4B5B562A37973B2EB03B33604E4E5D4C77"
DATA "64516D5D4B74615262643F3F3B274A2F1E3D311E3D2A183525132A54232E932236966D5EC8B5A9E1E0DDDFDAD5945D554C19134E2D34301B1F412023642526311B2016090A2723260E0C0F000000000000000000000000"
DATA "000000523B3380654AB99B74917B5D1D1A150604037E6249110D0A29241D9D8667BAA485C1AFA1AA9185A2877BA68C84604C534E323E3F274A3E26464B30574D355A50385B4B375948304D86241FA95546634F47564669"
DATA "55457451407256495963453E34203E2F1E3C301E3C2B193621112D1F0F2B49313AB18F76CDBFB4E2E2E1E1DEDBA280786C261F211C21572A2E452225682729331C20161115252125030303000000000000000000000000"
DATA "00000058423719100E1B130E8E8266564F3F020201745A42110D0A473E31988E72958E81D6C5BAB8A194A99287AC9388654E55482E394025493A20423F284A442D4E472E51493054452F4B7C291EAA4C3C5D4B3F4D3D57"
DATA "4C3A6E49386B5242536444355434323320382D1B372C1B3820112B1E0F243B2934B3957ED5CBC2E2E2E2E2E2E2A796933A2729341E21703A3E48202465282B3F2125171316191619000000000000000000000000000000"
DATA "00000040312A291D190F0C094D3C2C584735372F246E56402D251D53433434281F8C8379D5C3B8C1AA9EB0988AAE9688745E5E422A324229493C23483F274B452E4B5D2D3B531C2C5E453F894935A160496D48394E3B4F"
DATA "462D65472D6645304E563E307947343F222626142D2A183322112B1D0F20453338BF9F8BD8D1CAE2E2E2DBDAD86A6367271F2269242453353B58262A56262A472328131013050405000000000000000000000000000000"
DATA "0000002017133B292300000000000000000041322568503B7058410F0A07000000615B55D6C3B7C5B0A4AE9789A99285866D67412B37462C49442A4D4A2E53663E467B1F1E88202076201B6D3C31966750947D64634E50"
DATA "50336C4E306A483058765A449781687B200E44111A21112B21112A1C0E203D2D33C1A592DCD5CED7D6D76E6A6E2E2629611B197221212D222760292E4E2226351C21090709000000000000000000000000000000000000"
DATA "0000000906055E42340000000000001E1D19322D25735A43584433564F441D1C1869625DDCCABECFBCB0B59C8FA68D81886C654C343F543947472C5050374F803F378C362F9B3A309F2A23812618795C4799866F7C614E"
DATA "543E5A5640614F3C4F654B396A523E78372387171249101B1E0F271E0F213E2E36C3AC9CC0BAB55B575C312B306637357B100F52282E2F1C20391A1D622C32180F11020102000000000000000000000000000000000000"
DATA "0000000000003C28200E09070000005046383E30256B503B5641304D3D2E4F443322211FD4C9BDD7C5BAC1AB9FAE9387987C745E465253384842294D52344684352EA05E4B954537A55242854B38524037755F483E2B3F"
DATA "48376856447744335F3A2A2C4B32264C39328C2A1E89191A350B191F0F224F3C41BBA6989B938FA19794AD9F9B7F38356C212326202653423751242C4A23290B080B000000000000000000000000000000000000000000"
DATA "0000000000002719131F110E000000221B146557475F4534522D255B4C3F18120D0101019A938BD6C2B6C6B4A7BDA59BA890887A6067573A4F4F344A50384EAA6C588B4736A26352A87C63503B367332294836304D3755"
DATA "5342736150824633635A484C5F2F27412D2A6E3B31931E1E5F0D13300A16584447C0A89ACBC0B9CCC4BFC7BCB878393A37282F3629297655446F4347170D100C080C000000000000000000000000000000000000000000"
DATA "0000000000000502025D43330B050500000002010122161240191800000000000000000069615CD2BEB2C5B5A6C3AFA4B19A959D85816549654D314A442B4C7A5D58945440A764575A49457E4E40AC342E503F3E563E65"
DATA "4A386A5C4A7D422C615C4F5973362E76372E463633812C277811144B03097B5C54C2AB9ED8D1CAE1E1DEBDB8B93F363C2521229E8B707C573E4F423C1D161E010101000000000000000000000000000000000000000000"
DATA "000000000000000000160D0B4D35290000000000001F1710493026000000000000060506605957D5C3B7C6B6A8C2AEA4B49F98A48D8A7B616E6140574C314E52354EA2765F8A675E4E3A35A63A30A641385547474F3763"
DATA "432F624B3A6D453065554A57753731871F2064453B4B3230851A1A4F0408977B70C5B0A6DCD6D1B9B6B94E494D2925276857489F775A7B261A6346380D0A0C000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000004C32241C110F00000016100B4C31260000000000001614165E5B5DDBCDC3C8B5AABFA9A1B19A95A087847F64695F3C61664554765965CB9F8C9B8B76855F4CB32D2984403969574E765E6A"
DATA "543E6E58446A6A546E6C5D556E3B34A2272785302C4C3C385A2D275A0C0AA18880BAA8A19089893E393E242023401818986E529B7F619D3C2C723727150F0C000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000805045A3C2C0B0605110C094C2A21000000000000191619454145CEC1B7C7B5A9C3AEA5B79E98A186829072736E5061553656624F4BD0B09DD2B09CB59981A967566D4A416C5343866D5F"
DATA "6C5360624B617D635A8068536136309F3E379C5F4F7358492218174F1E1B7061604B46483B3739766C6A7464636F15129367508B6E54976C5E873A2C21100D000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000F0A085333280F0A0859211F0000000000001C191C201C22B0A199C8B6A7C5B3A6BDA59EA789839674728160634E3941655447706660918579D9CAB7CFC1AEAE907A7759536B514F"
DATA "80645B8A6D6192715F836158A18978C1B19ED1BEAC67554B2D1F1F2C2022796A66908480BAAFABAEA19EB5A5A17719168C5541804A396F3C2D92352F3C201C000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000281812341D186A27250100000000001E1A1E1D161E917F7CD0BBB0C9B5A8C2ABA1A2867C7656478F6F5C7F67578D7158887D673D3132D0C4B29E8D81786357523934361E35"
DATA "3A203B432C2D6749427C5F57897D7590867BC8B5A55242373522232C1E1D998782C8BAB4CFC8C4D5D0CBBCABA67C2115863725926751982E2D903832492F26000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000003120175727230502020000001D191C1F171F7D6A6CD9C9BFCEB9B0C4AEA3AB8E84643029793B2EA582659A8368544438453639A994874639398B85764F3D32361F33"
DATA "4225451D141A1B14174A3A37756A62857D73A28A7D3E2C265A3C2B381812998B84CEC3BDDFDDD9E1E0DDC0AFA9832A178F241A81543F9C6F5A90363646161A000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000010000502A2123130F0000001D191E261D27513841D8D1C9D5C2B9C8B2A8BB9F958A5B556313116617148452407763513A2B2D45353634282B79624E5E46463D243F"
DATA "4C2D5439243243312A5B473A6E5C4A6354464D3C3B5F483954291F360B0E867370CABBB3E0DEDBE2E2E1C3B3AF892E1CA0291E882721825B438B453E77272E000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000005B24202A18130000001D191E2D252E2E1820AFA4A4D8C8BECCB6ACC2ABA1A6877E71221D70141186241E906A54443934251D20231A1E3222313E264A3D244A"
DATA "503560472E56261C201C1419281E2434282D372A2C775340480B0A3714248F7C7CCABCB3E1DFDDE2E2E2B59C97922D1AA0271EA828259326268C302D872F31080706000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000005C24221708080000001613173830391E10175E3F47CBB8B1C7B1A7C1A79DB3988F873A32801411A02722A45B4A6955451E171E1F161A38213F3D23493C204A"
DATA "462D5847335E3525381D131A22191D2F23295F5042783A2D4F0D0C3A1D34A4938DCEC1B9E1E1E0E2E2E2C1AFAA8F2D1E9044349A352C9F2B27954E488A64532B251E000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000602B271A07070000000302033F35411712163F202AA38B8BC8B0A7C0A69BB79D969248418C1717A25242964037775642261B1D2B1C2A3C22483E244B3C214B"
DATA "3D214C402D573B2B4920161C1E16194C3F39945A4778392B4D1615452D46B1A198CFC3BAE2E1E0E2E1E1C7B7B18E4236A0896A8755427E65527D6651604937534333000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000070404713731230C0C000000000000322A34221B231E0E13704C53C3ACA5BFA59BB69C968F4541951E1DA6483FAA5B4B794D3C2C211E51354A3F254C3E244C3D224C"
DATA "4626573C224C3F3155261C2121181C806A58B93F378D41374F2125543C56C4B1A9CFC2BAE1E1DEE2E0DED1C3BC824B406E4F3A57392A523B2C6648347F5D448F785C0E0D0B000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000D090766322A2D1111000000000000110E11362C380704063E1E258F6E70C7AFA6B99F978A4B42A25E4DBA6757B950457049374A312C65415E4F31573E244C3E244C"
DATA "49295C4525563D294B342A2B493E38977160A7615D903430511A1E6A5667CEBCB2D0C2B9E1DFDBE1DFDDD0C3BC9D4E44772C1D7347338662489A7455AE8B67A28866423E36000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000100004A2D212512100000000000000101012F263120141C090506542F35B89F9ABAA1949E6E53993C33A86855A6463E6132295B38385935657953633E244B40254E"
DATA "48295A4C2A60432550492B288150419D7C6ABF4541934E3F601A1A614C5ECEBDB2CABAB2DFDBD6DFDDD8C4B4AE93392E8B260E82432EAC8B69B2946FB3926D906F5326201A000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000160707593427030201000000000000100D1030233127151B0F080B5C4041A4816D996D5695574CB476618E3B335B332A765D5F5E405D5E376955385042274F"
DATA "48285A4C2C6349285A3F2D32A08566C09F81C15A5292463A691717695461D0C0B4CEC0B8E0DDD9E0DEDAC0AEA8942C228A2A0F7A3E2BA58C6A997B5C9F7E5E3D2F23020201000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000220D0C5D28210B06050000000000000000001C161D25182248232C4124287D4033BAA391ACA295B16A5C74372E674B3F8C74767458645934656E495E51344E"
DATA "4728574D2C644B2B61473041A38365AF937AB0A391986A5A662921574353C9B9AED2C7BEE1E0DDE1DFDCBAA5A19325198D2C1287392A875C467D342868201A000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000001A0C0B56211F0202010000000000000000000101011D161E130D113A24227E493CB39E92C29B8CAD957577543F613930947B7B876C716A4E5D543061543650"
DATA "53364A5A385C502E64482B4AAA7C64BB9481C8BF9C9D755967493958465ECCBDB0D0C4BCE1DDD8E2E0DDB1948F94291A982C18A2231A90281C922B20792523000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000029161158211F0000000000000000000000000000000202021F1820261B1A733C32874038BB9279AB856574463575564FA28A8A8E72757A5E645938574A2B55"
DATA "44284E4D2F5075506242253C714F3AA76D63A86E5E98684E593E3A635169C9BAAED0C2BAE0DCD7E1DFDBAD807B932614A52B1CB12824AA312CA02C28772626000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000004727205F262301010000000000000000000000000000000004030353372960392FAA9F82BF9A7A875B446B3F35A68F8CA8908E967A7B7B5E626B4C53684A54"
DATA "4E344642264F5535595F333964473090574D9E64538955414F38434E3C5FC6B6ADD0C1B8E0DCD7E1DDD9B38B84902915A834299F897AA18B77A7554A7D493E000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000003F291E632D280301010000000000000000000000000000002317106E3A2B68211EA98970CAAE857B5240AF9A91BCA5A1AE95929F838287696B75555B715159"
DATA "66474C573B494A30495B232B8F654B4F24207E5D497943344C394D544462CAB8B0D2C4BAE1DED8E2DED8B0857F962B19A4352A793D31761F1E9B7156775A44050302000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000130D0A5D3C2E050202000000000000000000000000000000512820894B3C8620217E55458F7055574039C0B1AAC9B3ACB89F9AAC928D98797782616276545A"
DATA "6D4C516A4B4D65474A6C29299E6B538A2121561C1972523C452D41705F72D5C2B7D3C6BCDEDBD3E0DAD4A477719B2D1DB02E27972425A5252B8C453B754E40000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000002010144221A1D110D0000000000000000000000000403026C2F28A35D4DA32E30772A29623331361D1C353031D3C1B9C6AEA7B79C96A78983936F6E7E5C5D"
DATA "6E4C4E6B4B4C694A4A682D2F9C5E4FAF4F45841A1A522720452C3F5D475ECFBBB1CDBEB5DBD5CEE1DDD79E605CA02E20B2302BB52C2DAA272D9030315B362E000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000001010155232123120E000000000000000000000000140F0B742F2AA86856BB413E8532337D3E3F0C0706020101665D5CCFBDB5C7ADA5B4968E9E7A748B6562"
DATA "795354714B4C6C4B4B6E3E3F883838B6846CA42425791213603D40664E54C4B0A4C5B4A8D5CCC5E2E1DAB28E87A32E21AC312CB42D2DA4292D8F3936542F29000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000602523150908000000000000000000000000190F0C7B2D2BA86859C44C4977313751302E000000000000080707605858B4A19BBFA49BAB897E9C756E"
DATA "8D6460795050714B4B664444843639B37568A64C44881517673B3B724E4EAC968CC4B2A7D5CCC5E1DDD6A87E78A52E24A92F2DAE2E2D9D2D2F9967515C292B000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000000201016329251509080000000000000000000000001C0E0C822A2CA96457AD4646773E441E17150000000000000000000101010908086E605CBB9D92AF8D81"
DATA "9D746C845A587A524E774D4C7A3F3E9E383EBA8D73891E1F6536356F4A4BB19A8FC8B6ACD0C5BEE0DBD3AA837EA42C26AB2D2DA42D2DA9746C8C645066282E000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000160F0C7E3F361C0B0A0000000000000000000000001A0A0A81252BB0685C913D41684B400404030000000000000000000000000000000504044136366F5D57"
DATA "A6807591635E8459557D544F7748458F343EB95951904137683434724B4AAA9188CDBBB0CDC2BAE1DED7C4B1AA9E2E29AC2E2E9E443FC5B7A3853A39642A30000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000000B0706774539200B0A0000000000000000000000001E0C0C83272DA1675B7F47423E2D25000000000000000000000000000000000000000000000000040303"
DATA "3E2F2E8B635C93645E8357527A4E497E383FAF3B4094473D6F3534754A4A91766ED2C0B4CFC4BCE1E0DED9D1CC9D4B47AA302FAC6A58BDA27F924847644E41000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000000101003721192F1D1700000000000000000000000025110F872C3298635685584C16100E000000000000000000000000000000000000000000000000000000"
DATA "0000002D2121805D5690615A83554F76404097353E913F396F3733784B4B8C706AD3C3B6D1C5BBE1DFDDE0DDD99F6E6CA12D2D95423AA883618A6F575D4637000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000000000001A060648271F0704040000000000000000002E17148E4F449C5E536D4D41000000000000000000000000000000000000000000000000000000000000"
DATA "0000000000000604042C1D1F654341704742843740933C3C6F39337C4F4C866862CFBEAFD1C4B9DED9D2E2E1DEC5B5B0933D3F982D31852D31812F34674335030302010101000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000220B0B5C2C250C06060000000000000000003D1A19933F3D91474940312B000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000003020218110F864E4F8A54486D312D784C4A75504EBAA498CEBFB6D7D1CBE1E1DEDDDAD5A47D7B922C2F9A31389B3B3C80463D82776B3935330F0E0D000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000170F0D5331275727230100000000000000000000004B201E924A457F564C1B1211000000000000000000000000000000000000000000000000000000000000"
DATA "0000000000000000000000000000000100008752509739406F4337352124694446AB9389CFBFB5CEC4BBDAD5D0E2E2E2D7D2CE965D5D932C3197333990353B906566CCBFB9ACA099625C57131211000000000000000000"
DATA "000000000000000000000000000000000000000000281E194D372A281C194645420000000000000000000101015D2723957263664638090606000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000794A47A43D457E4C3D130F0C181013917E77D0BEB3CBBEB5D0C7C0E2E2E1E1E1DDC9BBB7925D5E8C3136892A329C5758CABFB6D3CBC4D8CEC8706964080707000000000000"
DATA "00000000000000000000000000000000000028231C38241D08050520363C3F8CA8030A0D000000000000090605762D28996455573831020101000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000744541AB42468A483C292018000000625954D3C3B6D1C3BAC9BDB3DCD8D3E2E1DEE1DFD9D8D1CBB096948D5357924445C2B1ACD9D4CFE2E2E0D5D1CC5F5B58020202000000"
DATA "000000000000000000000000000000221E18776045281D14000000213D482F77BD06161F0000000000001A100C8F5D52A28B6E614C3C000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000743E3DA846469472575646340101014A4441D9C8BDD9CAC2C9B9AFCBBEB7DAD5D0E2E2DFE1E0DCDDD8D3D0C9C3BAA49FBCADA7B8ADA7E0DEDBE2E2E0DBD9D4353331000000"
DATA "0000000000000000000000000908079481608568470B0806000000151E274B55B2080B180000000000004E4031AEA99266523F655442000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000004030275313195665D8F7E623E2C220D0A071A1918CDC2B7DDCCC1CEBFB6C3B4A9CBC0B8DEDBD6E2E1E0E2E2E1E2E2E0DDD9D4D4CBC3CDC4BDC6C0BAD3CFC9D9D3CC413E3B000000"
DATA "0000000000000000000000002E291EC0B38D7C604209060400000007060B7438A009050F00000005040477685255483C281C195C4939090806000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000201D167E57439A927B392D255543342115100101017B756EDDCCC0D2C2B6C6B6ACC4B5ABCDC2BADBD7D1E2E1DEE2E2DEE2E2DFE2E1DDE2E1DEDCD8D2C9BDB2D6CFC753504E000000"
DATA "0000000000000000000000003D3627C4B78E836746251C1400000000000062217A030206000000201A153C2C226151438D6F532C1D17090605000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000018120D9074565F55465C4C41B99E7A64534206060621201ECFBEB3D3C2B5D0BFB4C7B6ABC4B4A8CABDB4D6CEC6D5CEC7DAD5CEDCDAD3DEDBD6DDD9D4CBBFB6CEC1B779726E010101"
DATA "000000000000000000000000372E21AE9B738D6F4B4A3828030302000000553A430B0907000000020101423427A19073887155382B20000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000070504553D2B65503FAF9274BAA983A98967544F49040303776C66D1BFB1D3C1B4CBB9ACC6B5A7C7B7AACBBDB2C6B7ABC9BAB1CEC2BAD0C5BCCDC1B8CBBBB0D1BFB1968E86040303"
DATA "00000000000000000000000016110B927B5790704C2920160000000200007E48373C1F18000000000000675542BDB18BA6906D3D2D21000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000574C38674B369B8064C1AA7FDFC997C3A98A2724220F0D0D94887FD8C9BBD2C1B3D0BCAFCFBBADCFBCAFCAB8AAC6B3A5C7B4A6C4AFA0C6B2A4D2BEB2DFD2C6C3C1BC121212"
DATA "0000000000000000000000000100004134238566442C22180000000000004F392A291D160000000100006D5640DCCB9EB6A57F5D4330030202000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000027221A372A1E876C50816A4FAC9B74E1C393AF94781D1A16191716ADA299D3C2B4D3C1B1D3BFAED2BFAFD3BFAFD0BCACD2C0B3CAB3A4D0BDAFDAC8BCE2DACE7D7D7A020202"
DATA "0000000000000000000000000000000101004C3B2843332302020100000037291E1F171100000014100D70563FDBCC9DC7B1886E4E3615100B000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000006040338291E5C453288684DD5AD82CAA077896A4F29221A191716534C47CFBFB1D8C5B4D5BFACD5C0ADD7C6B5DACBBDD6C3B3D7C5B7DCCCC0A69D950B0B0B000000"
DATA "0000000000000000000000000000000000000000000101010000000000000605030403020000000503037E5F45DCC394BC9D756B4B34403023000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000010000100C09372B205F48355C422F55412E040403030303544E49958D85D2C2B4C8B7A9CCBDB0CCC4BAD2C3B5C6B7AC8E837C1D1B19000000000000"
DATA "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000E0B085F4735805F45533A27150F0A000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020101110F0F0F0E0D1B1A182423221A1A18100E0E000000000000000000000000"
DATA "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000906050A0706000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
END

EXTERNAL  PICTURE DISP(XX,YY,C(,),M(,))
SET DRAW MODE MASK
MAT PLOT CELLS,IN 0,0;XX-1,YY-1:M
SET DRAW MODE MERGE
MAT PLOT CELLS,IN 0,0;XX-1,YY-1:C
END PICTURE

EXTERNAL  FUNCTION GETKEY !'キー入力
LET GETKEY=-1
IF GETKEYSTATE(37)<0 THEN LET GETKEY=4
IF GETKEYSTATE(38)<0 THEN LET GETKEY=8
IF GETKEYSTATE(39)<0 THEN LET GETKEY=6
IF GETKEYSTATE(40)<0 THEN LET GETKEY=2
FOR I=48 TO 57
   IF GETKEYSTATE(I)<0 THEN
      LET GETKEY=I-48
      EXIT FUNCTION
   END IF
NEXT I
FOR I=96 TO 105
   IF GETKEYSTATE(I)<0 THEN
      LET GETKEY=I-96
      EXIT FUNCTION
   END IF
NEXT I
END FUNCTION

EXTERNAL SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
SET COLOR MIX(0) 0,0,0
CLEAR
SET COLOR MODE "NATIVE"
SET POINT STYLE 1
SET WINDOW 0,XSIZE-1,YSIZE-1,0
END SUB

EXTERNAL SUB RGB(X,R,G,B)
LET B=MOD(INT(X/65536),256)
LET G=MOD(INT(X/256),256)
LET R=MOD(X,256)
END SUB

EXTERNAL SUB GETPOINT(X,Y,R,G,B)
ASK PIXEL VALUE (X,Y) C
CALL RGB(C,R,G,B)
END SUB

EXTERNAL SUB PSET(X,Y,R,G,B)
LET RR=MIN(255,MAX(0,INT(R)))
LET GG=MIN(255,MAX(0,INT(G)))
LET BB=MIN(255,MAX(0,INT(B)))
SET COLOR COLORINDEX(RR/255,GG/255,BB/255)
PLOT POINTS:X,Y
END SUB

EXTERNAL SUB CIRCLE(X,Y,RR,R,G,B)
SET COLOR COLORINDEX(R/255,G/255,B/255)
DRAW CIRCLE WITH SCALE(RR)*SHIFT(X,Y)
END SUB
 

8王妃問題

 投稿者:hayashi  投稿日:2019年 1月30日(水)14時17分51秒
返信・引用
  REM 8-QUEEN PROBLEM SOLVER
DECLARE EXTERNAL SUB SET_QUEEN
OPTION BASE 0
PUBLIC NUMERIC FLG0(7),FLG1(14),FLG2(14),QUEEN(7),COUNT_ANS
MAT FLG0 = ZER !列(|)方向に配置済みか
MAT FLG1 = ZER !右上左下方向に配置済みか
MAT FLG2 = ZER !左上右下方向に配置済みか
LET COUNT_ANS = 0  !答のカウント
CALL SET_QUEEN(0)
END

EXTERNAL SUB SET_QUEEN(I)
FOR J = 0 TO 7 !各行チェック
!3方向に未配置なら
   IF(FLG0(J) = 0) AND (FLG1(I+J) = 0) AND (FLG2(I-J+7) = 0) THEN
      LET QUEEN(I) = J !I行目のJ列目に配置
      IF I = 7 THEN    !全行配置完了なら
         LET COUNT_ANS = COUNT_ANS + 1
         PRINT COUNT_ANS   !答の通し番号を表示
         FOR K = 0 TO 7 !答を表示
            PRINT REPEAT$("□",QUEEN(K)) & "■" & REPEAT$("□",7-QUEEN(K))
         NEXT K
         PRINT !一行空ける
      ELSE
         LET FLG0(J) = 1 !配置済み
         LET FLG1(I+J) = 1
         LET FLG2(I-J+7) = 1
         CALL SET_QUEEN(I+1)
         LET FLG0(J) = 0   !一つ下の行をチェック
         LET FLG1(I+J) = 0 !するので未配置に戻す
         LET FLG2(I-J+7) = 0
      END IF
   END IF
NEXT J
END SUB
 

花模様

 投稿者:hayashi  投稿日:2019年 1月30日(水)14時12分11秒
返信・引用
  しばっちさんどうもありがとうございます。
私はまだしばっちさんのようなおおがかり
なものは出来ないので小さいものを投稿して
いきます。

REM 花模様
LET LEFT   = -1
LET RIGHT  =  1
LET BOTTOM = -1
LET TOP    =  1
SET WINDOW LEFT, RIGHT, BOTTOM, TOP
SET AREA COLOR 1 ! 黒
PLOT AREA : LEFT,BOTTOM;RIGHT,BOTTOM;RIGHT,TOP;LEFT,TOP
SET LINE COLOR 7 ! ピンク
FOR T = 0 TO 2*PI STEP 0.01
   LET R = SIN(4*T) + 0.25*SIN(12*T) + 0.12*SIN(20*T) + 0.07*SIN(28*T)
   PLOT R * COS(T), R * SIN(T);
NEXT T
END
 

Re: ソートアニメ

 投稿者:しばっち  投稿日:2019年 1月24日(木)21時23分26秒
返信・引用
  > No.4624[元記事へ]

hayashiさんへのお返事です。

> ヒープソートのところで止まってしまうのですが?
>

ご報告ありがとうございます。投稿前に確認していたのですが
ソースの一部が欠けていたのを修正した時に抜けてしまっていたようです。大変失礼致しました。
下記プログラムを最後に追加してください。


EXTERNAL SUB HEAPSORT(N,A())
LET NN=N
FOR K=INT(NN/2) TO 1 STEP -1
   LET I=K
   LET X=A(I)
   DO WHILE 2*I<=NN
      LET J=2*I
      IF J<NN THEN
         IF A(J)<A(J+1) THEN LET J=J+1
      END IF
      IF X>=A(J) THEN EXIT DO
      LET A(I)=A(J)
      CALL DRAWBAR(A)
      LET I=J
   LOOP
   LET A(I)=X
   CALL DRAWBAR(A)
NEXT K
DO WHILE NN>1
   LET X=A(NN)
   LET A(NN)=A(1)
   CALL DRAWBAR(A)
   LET NN=NN-1
   LET I=1
   DO WHILE 2*I<=NN
      LET J=2*I
      IF J<NN AND A(J)<A(J+1) THEN LET J=J+1
      IF X>=A(J) THEN EXIT DO
      LET A(I)=A(J)
      CALL DRAWBAR(A)
      LET I=J
   LOOP
   LET A(I)=X
   CALL DRAWBAR(A)
LOOP
END SUB
 

フーリエ級数展開(矩形波)アニメーション

 投稿者:hayashi  投稿日:2019年 1月23日(水)14時48分0秒
返信・引用
  REM フーリエ級数展開(矩形波)アニメーション
OPTION ANGLE RADIANS
LET LEFT   = -2*PI
LET RIGHT  =  2*PI
LET BOTTOM = -2
LET TOP    =  2
SET WINDOW LEFT, RIGHT, BOTTOM, TOP
DATA 1, 2, 3, 5, 10, 50
DIM N(0 TO 5)
MAT READ N
DRAW GRID
DO
   FOR J = 0 TO 5
      SET DRAW MODE HIDDEN    ! 描画途中を画面に反映させない
      SET AREA COLOR 0        ! 背景を白で塗りつぶす
      PLOT AREA : LEFT,BOTTOM;RIGHT,BOTTOM;RIGHT,TOP;LEFT,TOP
      DRAW GRID
      FOR T = LEFT TO RIGHT STEP 0.02
         LET S = 0
         FOR I = 1 TO N(J) ! 1から第N(J)項まで足す
            LET S = S + 1/(2*I-1)*SIN((2*I-1)*T)
         NEXT I
         PLOT LINES:T,S;
      NEXT T
      PLOT TEXT ,AT -0.8, -1.5, USING "N = >%":STR$(N(J))
      SET DRAW MODE EXPLICIT  ! 描画結果を画面に反映させる
      WAIT DELAY 1            ! 処理を1秒停止
   NEXT J
LOOP
END
 

Re: ソートアニメ

 投稿者:hayashi  投稿日:2019年 1月23日(水)14時36分38秒
返信・引用
  > No.4611[元記事へ]

ヒープソートのところで止まってしまうのですが?

> PUBLIC NUMERIC N,KMAX
> LET N=100
> LET KMAX=100
> DIM X(N)
> SET WINDOW 1,N+1,0,KMAX
> FOR MODE=1 TO 16
>    CALL DATASET(N,X)
>    SELECT CASE MODE
>    CASE 1
>       PRINT "バブルソート"
>       CALL BUBBLESORT(N,X)
>    CASE 2
>       PRINT "双方向バブルソート"
>       CALL BIDIRECTIONALBUBBLESORT(N,X)
>    CASE 3
>       PRINT "選択法"
>       CALL SELECTIONSORT(N,X)
>    CASE 4
>       PRINT "基数ソート"
>       CALL RADIXSORT(N,X)
>    CASE 5
>       PRINT "シェルソート"
>       CALL SHELLSORT(N,X)
>    CASE 6
>       PRINT "マージソート"
>       CALL MERGESORT(1,N,X)
>    CASE 7
>       PRINT "ヒープソート"
>       CALL HEAPSORT(N,X)
>    CASE 8
>       PRINT "選択ソート"
>       CALL SELECTSORT(N,X)
>    CASE 9
>       PRINT "挿入ソート"
>       CALL INSERTSORT(N,X)
>    CASE 10
>       PRINT "コムソート"
>       CALL COMBSORT(N,X)
>    CASE 11
>       PRINT "ストゥージソート"
>       CALL STOOGESORT(1,N,X)
>    CASE 12
>       PRINT "ノームソート"
>       CALL GNOMESORT(N,X)
>    CASE 13
>       PRINT "バケットソート"
>       CALL BUCKETSORT(N,X)
>    CASE 14
>       PRINT "分布数えソート"
>       CALL DISTRIBUTIONSORT(N,X)
>    CASE 15
>       PRINT "奇遇転置ソート"
>       CALL ODDEVEN(N,X)
>    CASE 16
>       PRINT "クイックソート"
>       CALL QUICKSORT(1,N,X)
>    END SELECT
>    IF MODE<16 THEN PAUSE
> NEXT MODE
> END
>
> EXTERNAL  SUB DATASET(N,X())
> RANDOMIZE
> FOR I=1 TO N
>    LET X(I)=INT(RND*KMAX)
>    CALL DRAWBAR(X)
> NEXT I
> END SUB
>
> EXTERNAL  SUB DRAWBAR(X())
> SET DRAW MODE HIDDEN
> CLEAR
> FOR I=1 TO N
>    PLOT AREA:I,0;I+.5,0;I+.5,X(I);I,X(I)
> NEXT  I
> SET DRAW MODE EXPLICIT
> END SUB
>
> EXTERNAL  SUB BUBBLESORT(N,X())
> FOR I=1 TO N
>    FOR J=1 TO N-I
>       IF X(J)>X(J+1) THEN
>          SWAP X(J),X(J+1)
>          CALL DRAWBAR(X)
>       END IF
>    NEXT J
> NEXT I
> END SUB
>
> EXTERNAL  SUB BIDIRECTIONALBUBBLESORT(N,A())
> LET ST=0
> LET EN=N
> DO WHILE ST<EN
>    LET ST=ST+1
>    LET EN=EN-1
>    FOR I=ST TO EN
>       IF A(I)>A(I+1) THEN
>          SWAP A(I),A(I+1)
>          CALL DRAWBAR(A)
>          LET FL=1
>       END IF
>    NEXT I
>    IF FL=0 THEN EXIT DO
>    LET FL=0
>    FOR I=EN TO ST STEP-1
>       IF A(I)>A(I+1) THEN
>          SWAP A(I),A(I+1)
>          CALL DRAWBAR(A)
>          LET FL=1
>       END IF
>    NEXT I
>    IF FL=0 THEN EXIT DO
>    LET FL=0
> LOOP
> END SUB
>
> EXTERNAL SUB SELECTIONSORT(N,X())
> FOR I=1 TO N-1
>    FOR J=I+1 TO N
>       IF X(I)>X(J) THEN
>          SWAP X(I),X(J)
>          CALL DRAWBAR(X)
>       END IF
>    NEXT J
> NEXT I
> END SUB
>
> EXTERNAL SUB RADIXSORT(N,A())
> DIM B(N)
> FOR I=1 TO N
>    LET KETA=MAX(KETA,LOG10(A(I)+1))
> NEXT I
> FOR J=0 TO INT(KETA)
>    LET M=1
>    FOR K=0 TO 9
>       FOR I=1 TO N
>          IF MOD(INT(A(I)/10^J),10)=K THEN
>             LET B(M)=A(I)
>             CALL DRAWBAR(B)
>             LET M=M+1
>          END IF
>       NEXT I
>    NEXT K
>    MAT A=B
> NEXT J
> END SUB
>
> EXTERNAL SUB SHELLSORT(N,A())
> LET H=1
> DO WHILE H<=N
>    LET H=H*3+1
> LOOP
> LET H=INT(H/9)
> DO WHILE H>=1
>    FOR I=H TO N
>       LET X=A(I)
>       LET J=I-H
>       DO WHILE J>0 AND A(J)>X
>          LET A(J+H)=A(J)
>          LET J=J-H
>          IF J<1 THEN EXIT DO
>       LOOP
>       LET A(J+H)=X
>       CALL DRAWBAR(A)
>    NEXT I
>    LET H=INT(H/3)
> LOOP
> END SUB
>
> EXTERNAL SUB MERGESORT(FI,LA,X())
> IF FI>=LA THEN EXIT SUB
> DIM W(LA-FI+1)
> LET MI=INT((FI+LA)/2)
> CALL MERGESORT(FI,MI,X)
> CALL MERGESORT(MI+1,LA,X)
> LET P=1
> FOR I=FI TO MI
>    LET W(P)=X(I)
>    LET P=P+1
> NEXT I
> LET I=MI+1
> LET J=1
> LET K=FI
> DO WHILE I <= LA AND J < P
>    IF W(J) <= X(I) THEN
>       LET X(K)=W(J)
>       LET K=K+1
>       LET J=J+1
>       CALL DRAWBAR(X)
>    ELSE
>       LET X(K)=X(I)
>       LET K=K+1
>       LET I=I+1
>       CALL DRAWBAR(X)
>    END IF
> LOOP
> DO WHILE J < P
>    LET X(K)=W(J)
>    CALL DRAWBAR(X)
>    LET K=K+1
>    LET J=J+1
> LOOP
> END SUB
>
> EXTERNAL SUB SELECTSORT(N,A())
> FOR I=1 TO N-1
>    LET MIN=A(I)
>    LET K=I
>    FOR J=I+1 TO N
>       IF A(J)<MIN THEN
>          LET MIN=A(J)
>          LET K=J
>       END IF
>    NEXT J
>    LET A(K)=A(I)
>    LET A(I)=MIN
>    CALL DRAWBAR(A)
> NEXT I
> END SUB
>
> EXTERNAL SUB INSERTSORT(N,A())
> FOR I=N TO 1 STEP-1
>    LET X=A(I)
>    LET J=I+1
>    DO WHILE J<=N AND A(J)<X
>       LET A(J-1)=A(J)
>       CALL DRAWBAR(A)
>       LET J=J+1
>    LOOP
>    LET A(J-1)=X
>    CALL DRAWBAR(A)
> NEXT I
> END SUB
>
> EXTERNAL  SUB COMBSORT(SIZE,ARRAY())
> LET H = SIZE
> DO WHILE H > 1 OR IS_SWAPPED=1
>    LET H = INT((H*10)/13)
>    IF H<1 THEN LET H=1
>    IF H=9 OR H=10 THEN LET H=11
>    LET IS_SWAPPED = 0
>    FOR I = 1 TO  SIZE-H
>       IF ARRAY(I) > ARRAY(I+H) THEN
>          SWAP ARRAY(I),ARRAY(I+H)
>          LET IS_SWAPPED = 1
>          CALL DRAWBAR(ARRAY)
>       END IF
>    NEXT I
> LOOP
> END SUB
>
> EXTERNAL  SUB STOOGESORT(I,J,L())
> IF L(J) < L(I) THEN
>    SWAP  L(I) , L(J)
>    CALL DRAWBAR(L)
> END IF
> IF J - I + 1 >= 3 THEN
>    LET T = INT((J - I + 1) / 3)
>    CALL STOOGESORT(I  , J-T,L)
>    CALL STOOGESORT(I+T, J  ,L)
>    CALL STOOGESORT(I  , J-T,L)
> END IF
> END SUB
>
> EXTERNAL  SUB GNOMESORT(SIZE,A())
> LET I = 1
> DO WHILE I < SIZE
>    IF A(I) <= A(I+1) THEN
>       LET I = I + 1
>    ELSE
>       SWAP A(I), A(I+1)
>       CALL DRAWBAR(A)
>       LET I = I - 1
>       IF I = 0 THEN
>          LET I = I + 1
>       END IF
>    END IF
> LOOP
> END SUB
>
> EXTERNAL  SUB BUCKETSORT(N,A())
> LET MIN=999999999
> LET MAX=-MIN
> FOR I=1 TO N
>    IF MIN>A(I) THEN LET MIN=A(I)
>    IF MAX<A(I) THEN LET MAX=A(I)
> NEXT I
> DIM BUFF(MIN TO MAX)
> FOR I=1 TO N
>    LET BUFF(A(I))=BUFF(A(I))+1
> NEXT I
> FOR I=MIN TO MAX
>    FOR J=1 TO BUFF(I)
>       LET COUNT=COUNT+1
>       LET A(COUNT)=I
>       CALL DRAWBAR(A)
>    NEXT J
> NEXT I
> END SUB
>
> EXTERNAL SUB DISTRIBUTIONSORT(N,A())
> LET MIN=999999999
> LET MAX=-MIN
> FOR I=1 TO N
>    IF MIN>A(I) THEN LET MIN=A(I)
>    IF MAX<A(I) THEN LET MAX=A(I)
> NEXT I
> DIM C(MIN TO MAX),B(N)
> FOR I=1 TO N
>    LET C(A(I))=C(A(I))+1
> NEXT I
> FOR I=MIN TO MAX-1
>    LET C(I+1)=C(I+1)+C(I)
> NEXT I
> FOR I=N TO 1 STEP-1
>    LET X=A(I)
>    LET B(C(X))=X
>    CALL DRAWBAR(B)
>    LET C(X)=C(X)-1
> NEXT I
> MAT A=B
> END SUB
>
> EXTERNAL  SUB ODDEVEN(N,D())
> DO
>    LET FLAG = 0
>    FOR I = 2 TO N-1 STEP 2
>       IF D(I) > D(I+1) THEN
>          SWAP D(I), D(I+1)
>          CALL DRAWBAR(D)
>          LET FLAG = 1
>       END IF
>    NEXT I
>    FOR I = 1 TO N-1 STEP 2
>       IF D(I) > D(I+1) THEN
>          SWAP D(I), D(I+1)
>          CALL DRAWBAR(D)
>          LET FLAG = 1
>       END IF
>    NEXT I
> LOOP WHILE FLAG=1
> END SUB
>
> EXTERNAL SUB QUICKSORT(FI,LA,A())
> LET X=A((FI+LA)/2)
> LET I=FI
> LET J=LA
> DO
>    DO WHILE A(I)<X
>       LET I=I+1
>    LOOP
>    DO WHILE X<A(J)
>       LET J=J-1
>    LOOP
>    IF I>=J THEN EXIT DO
>    SWAP A(I),A(J)
>    CALL DRAWBAR(A)
>    LET I=I+1
>    LET J=J-1
> LOOP
> IF FI<I-1 THEN CALL QUICKSORT(FI,I-1,A)
> IF J+1<LA THEN CALL QUICKSORT(J+1,LA,A)
> END SUB
>
 

パスカルのリマソン

 投稿者:hayashi  投稿日:2019年 1月23日(水)14時31分7秒
返信・引用
  REM パスカルのリマソン
DEF F(X,Y,A) = (X^2 + Y^2 - X)^2 - A^2 * (X^2 + Y^2)
LET LEFT   = -1.5
LET RIGHT  =  3.5
LET BOTTOM = -2.5
LET TOP    =  2.5
SET WINDOW LEFT, RIGHT, BOTTOM, TOP
SET AREA COLOR 1 ! 背景黒
PLOT AREA : LEFT,BOTTOM;RIGHT,BOTTOM;RIGHT,TOP;LEFT,TOP
SET POINT STYLE 1
LET COL1 = 4 ! 赤
LET COL2 = 0 ! 白
FOR A = 2.2 TO 0.4 STEP -0.2
   SET POINT COLOR COL1
   FOR I = 0 TO PIXELX(RIGHT)
      LET X = WORLDX(I)
      FOR J = 0 TO PIXELY(TOP)
         LET Y = WORLDY(J)
         IF F(X,Y,A) < 0 THEN
            PLOT POINTS: X, Y
         END IF
      NEXT J
   NEXT I
   SWAP COL1,COL2 ! 赤白交互
NEXT A
DRAW GRID
END
 

ペアノ曲線

 投稿者:しばっち  投稿日:2019年 1月21日(月)19時31分13秒
返信・引用
  ペアノ曲線(Peano Curve)
https://ja.wikipedia.org/wiki/ペアノ曲線


PUBLIC NUMERIC X,Y,ALPHA,XYMAX
LET XSIZE=600
LET YSIZE=600
CALL GINIT(XSIZE,YSIZE)
INPUT  PROMPT "LEVEL(1-8)=":N
LET X=5
LET Y=5
LET LENGTH=100
CALL PEANO(N,90,LENGTH)
IF XYMAX>XSIZE OR XYMAX>YSIZE THEN
   CLEAR
   SET WINDOW 0,XYMAX+5,0,XYMAX+5
   LET X=5
   LET Y=5
   CALL PEANO(N,90,LENGTH)
END IF
END

EXTERNAL  SUB PEANO(N,A,H)
IF N>0 THEN
   CALL RT(A)
   CALL PEANO(N-1,-A,H)
   CALL FD(H)
   CALL PEANO(N-1,A,H)
   CALL FD(H)
   CALL PEANO(N-1,-A,H)
   CALL LT(A)
END IF
END SUB

EXTERNAL SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW 0,XSIZE-1,0,YSIZE-1
SET POINT STYLE 1
SET COLOR MODE "REGULAR"
FOR I=0 TO 7
   SET COLOR MIX(I) BITAND(I,2)/2,BITAND(I,4)/4,BITAND(I,1)
NEXT I
CLEAR
SET COLOR 7
END SUB

EXTERNAL SUB FD(L)
PLOT LINES:X,Y;
LET X=X+L*COS(ALPHA*PI/180)
LET Y=Y-L*SIN(ALPHA*PI/180)
PLOT LINES:X,Y;
LET XYMAX=MAX(XYMAX,MAX(X,Y))
END SUB

EXTERNAL SUB LT(R)
LET ALPHA=MOD(ALPHA+R+360,360)
END SUB

EXTERNAL SUB RT(R)
LET ALPHA=MOD(ALPHA-R+360,360)
END SUB
 

格子曲線

 投稿者:しばっち  投稿日:2019年 1月21日(月)19時30分33秒
返信・引用
  格子曲線(Grate curve)


PUBLIC NUMERIC X,Y,ALPHA
LET XSIZE=640
LET YSIZE=640
CALL GINIT(XSIZE,YSIZE)
CALL GRATE(4,90,XSIZE,YSIZE)
END

EXTERNAL  SUB TWO(A,C,W)
IF C<=1 THEN EXIT SUB
CALL RT(A)
CALL FD(1)
CALL RT(A)
CALL FD(W)
CALL LT(A)
IF C>1 THEN CALL FD(1)
CALL LT(A)
CALL FD(W)
CALL TWO(A,C-2,W)
END SUB

EXTERNAL  SUB SQUARE(A,H,W)
CALL FD(W)
CALL TWO(A,H-1,W)
END SUB

EXTERNAL  SUB GRATE(N,A,W,H)
IF N<=0 THEN
   CALL SQUARE(A,H,W)
   EXIT SUB
END IF
CALL RT(A)
CALL GRATE(N-1,-A,H/4,W)
CALL FD(H/8)
CALL GRATE(N-1,A,H/4,W)
CALL FD(H/8)
CALL GRATE(N-1,-A,H/4,W)
CALL LT(A)
END SUB

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"
FOR I=0 TO 7
   SET COLOR MIX(I) BITAND(I,2)/2,BITAND(I,4)/4,BITAND(I,1)
NEXT I
CLEAR
SET COLOR 7
END SUB

EXTERNAL SUB FD(L)
PLOT LINES:X,Y;
LET X=X+L*COS(ALPHA*PI/180)
LET Y=Y-L*SIN(ALPHA*PI/180)
PLOT LINES:X,Y;
END SUB

EXTERNAL SUB LT(R)
LET ALPHA=MOD(ALPHA+R+360,360)
END SUB

EXTERNAL SUB RT(R)
LET ALPHA=MOD(ALPHA-R+360,360)
END SUB
 

クヌース曲線

 投稿者:しばっち  投稿日:2019年 1月21日(月)19時29分53秒
返信・引用
  クヌース曲線(Knuth curve)
https://codom.hatenablog.com/entry/2017/01/20/225952


PUBLIC NUMERIC X,Y,ALPHA
LET XSIZE=650
LET YSIZE=650
CALL GINIT(XSIZE,YSIZE)
INPUT  PROMPT "LEVEL(1-10)=":LEV
LET Y=YSIZE-10
IF MOD(LEV,2)=1 THEN
   CALL LT(180)
   LET X=XSIZE-5
ELSE
   CALL LT(90)
   LET X=5
END IF
LET L=10*SQR(2)^(9-LEV)
CALL KNUTH(LEV,-90,45,L)
END

EXTERNAL SUB KNUTH(N,A,T,H)
IF N=0 THEN
   CALL RT(45+T)
   CALL FD(H)
   CALL LT(45+T)
ELSE
   CALL RT(2*T+A)
   CALL KNUTH(N-1,2*T,-T,H)
   CALL RT(45-3*T-A)
   CALL FD(H)
   CALL LT(45-T+A)
   CALL KNUTH(N-1,0,-T,H)
   CALL RT(A)
END IF
END SUB

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"
FOR I=0 TO 7
   SET COLOR MIX(I) BITAND(I,2)/2,BITAND(I,4)/4,BITAND(I,1)
NEXT I
CLEAR
SET COLOR 7
END SUB

EXTERNAL SUB FD(L)
PLOT LINES:X,Y;
LET X=X+L*COS(ALPHA*PI/180)
LET Y=Y-L*SIN(ALPHA*PI/180)
PLOT LINES:X,Y;
END SUB

EXTERNAL SUB LT(R)
LET ALPHA=MOD(ALPHA+R+360,360)
END SUB

EXTERNAL SUB RT(R)
LET ALPHA=MOD(ALPHA-R+360,360)
END SUB
 

ヒルベルト曲線(アニメーション)

 投稿者:hayashi  投稿日:2019年 1月16日(水)16時06分10秒
返信・引用
  REM ヒルベルト曲線(アニメーション)
OPTION ANGLE DEGREES
LET LEFT   = 0
LET RIGHT  = 2
LET BOTTOM = 0
LET TOP    = 2
SET WINDOW LEFT, RIGHT, BOTTOM, TOP
SET LINE COLOR 6 ! 黄
DO
   FOR N = 1 TO 6
      SET DRAW MODE HIDDEN    ! 描画途中を画面に反映させない
      SET AREA COLOR 1        ! 背景を黒で塗りつぶす
      PLOT AREA : LEFT,BOTTOM;RIGHT,BOTTOM;RIGHT,TOP;LEFT,TOP
      LET DIRECTION = 0
      LET CURX = 0.5
      LET CURY = 0.5
      LET L = 1
      DRAW HIRBERT(N, L, 90) WITH SCALE(0.5^(N-1))
      SET DRAW MODE EXPLICIT  ! 描画結果を画面に反映させる
      WAIT DELAY 1            ! 処理を1秒停止
   NEXT N
LOOP

PICTURE FORWARD(R)
   LET X0 = CURX
   LET Y0 = CURY
   LET CURX = CURX + R*COS(DIRECTION)
   LET CURY = CURY + R*SIN(DIRECTION)
   PLOT LINES: X0, Y0; CURX, CURY
END PICTURE

SUB TURN(T)
   LET DIRECTION = DIRECTION + T
END SUB

PICTURE HIRBERT(N, L, A)
   IF N <> 0 THEN
      CALL TURN( A)
      DRAW HIRBERT(N - 1, L, -A)
      DRAW FORWARD(L)
      CALL TURN(-A)
      DRAW HIRBERT(N - 1, L,  A)
      DRAW FORWARD(L)
      DRAW HIRBERT(N - 1, L,  A)
      CALL TURN(-A)
      DRAW FORWARD(L)
      DRAW HIRBERT(N - 1, L, -A)
      CALL TURN( A)
   END IF
END PICTURE
END
 

バーンスレイのシダ

 投稿者:hayashi  投稿日:2019年 1月 9日(水)15時55分54秒
返信・引用
  REM BARNSLEY FERN(バーンスレイのシダ)
LET LEFT   = -4
LET RIGHT  =  4
LET BOTTOM =  0
LET TOP    = 11
SET WINDOW LEFT, RIGHT, BOTTOM, TOP
SET POINT STYLE 1
SET POINT COLOR 3 ! 緑
SET AREA COLOR 1 ! 背景黒
PLOT AREA : LEFT,BOTTOM;RIGHT,BOTTOM;RIGHT,TOP;LEFT,TOP
LET N = 100000
LET X = 0
LET Y = 0
RANDOMIZE
FOR I = 1 TO N
   DRAW FERN(X,Y,RND)
NEXT I

PICTURE FERN(X,Y,R)
   IF R < 0.85 THEN
      LET PX = X
      LET X =  0.85 * PX + 0.04 * Y
      LET Y = -0.04 * PX + 0.85 * Y + 1.6
   ELSEIF R < 0.92 THEN
      LET PX = X
      LET X =  0.2  * PX - 0.26 * Y
      LET Y =  0.23 * PX + 0.22 * Y + 1.6
   ELSEIF R < 0.99 THEN
      LET PX = X
      LET X = -0.15 * PX + 0.28 * Y
      LET Y =  0.26 * PX + 0.24 * Y + 0.44
   ELSE
      LET X =  0
      LET Y =  0.16 * Y
   END IF
   PLOT POINTS : X,Y
END PICTURE
END
 

グラデーションライン

 投稿者:しばっち  投稿日:2019年 1月 5日(土)19時36分59秒
返信・引用 編集済
  グラデーションライン
単色ではなく、グラデーションをかけながら
直線を引く


  直線の場合

始点(XS,YS)から終点(XE,YE)までを
線形補間式により求め、同時にR,G,B値についても
高次補間式(3次)により求めプロットしていく。

SET COLOR MODE "NATIVE"
RANDOMIZE
SET LINE WIDTH 30
DIM R(5),G(5),B(5)
FOR I=1 TO 19
   FOR J=1 TO 5
      LET R(J)=INT(RND*255)
      LET G(J)=INT(RND*255)
      LET B(J)=INT(RND*255)
   NEXT J
   LET XS=.1
   LET XE=.9
   LET YS=YS+1/20
   LET YE=YS+1/20
   CALL LINE(XS,YS,XE,YE,R,G,B)
NEXT I
END

EXTERNAL  SUB LINE(XS,YS,XE,YE,R(),G(),B())
FOR T=0 TO 1 STEP 1/128
   LET RR=Y3(T,R)
   LET GG=Y3(T,G)
   LET BB=Y3(T,B)
   LET RR=MAX(0,MIN(INT(RR),255))
   LET GG=MAX(0,MIN(INT(GG),255))
   LET BB=MAX(0,MIN(INT(BB),255))
   SET LINE COLOR 65536*BB+256*GG+RR
   LET X=XE*T+(1-T)*XS
   LET Y=YE*T+(1-T)*YS
   PLOT LINES:X,Y;
NEXT  T
PLOT LINES
END SUB

EXTERNAL  FUNCTION Y1(T,X()) !'1次補間式
LET A=-X(1)+X(2) !'T=0...X(1)
LET B=X(1)       !'T=1...X(2)
LET Y1=A*T+B
END FUNCTION

EXTERNAL  FUNCTION Y2(T,X()) !'2次補間式
!'            C=X(1)
!'1/4*A+1/2*B+C=X(2)
!'    A+    B+C=X(3)
LET A=2*X(1)-4*X(2)+2*X(3) !'T=0/2...X(1)
LET B=-3*X(1)+4*X(2)-X(3)  !'T=1/2...X(2)
LET C=X(1)                 !'T=2/2...X(3)
LET Y2=A*T^2+B*T+C
END FUNCTION

EXTERNAL  FUNCTION Y3(T,X()) !'3次補間式
!'                   D=X(1)
!'1/27*A+1/9*B+1/3*C+D=X(2)
!'8/27*A+4/9*B+2/3*C+D=X(3)
!'     A+    B+    C+D=X(4)
LET A=-9/2*X(1)+27/2*X(2)-27/2*X(3)+9/2*X(4) !'T=0/3...X(1)
LET B=9*X(1)-45/2*X(2)+18*X(3)-9/2*X(4)      !'T=1/3...X(2)
LET C=-11/2*X(1)+9*X(2)-9/2*X(3)+X(4)        !'T=2/3...X(3)
LET D=X(1)                                   !'T=3/3...X(4)
LET Y3=A*T^3+B*T^2+C*T+D
END FUNCTION

EXTERNAL  FUNCTION Y4(T,X()) !'4次補間式
!'                              E=X(1)
!' 1/256*A+ 1/64*B+1/16*C+1/4*D+E=X(2)
!'16/256*A+ 8/64*B+4/16*C+2/4*D+E=X(3)
!'81/256*A+27/64*B+9/16*C+3/4*D+E=X(4)
!'       A+      B+     C+    D+E=X(5)
LET A=32/3*X(1)-128/3*X(2)+64*X(3)-128/3*X(4)+32/3*X(5) !'T=0/4...X(1)
LET B=-80/3*X(1)+96*X(2)-128*X(3)+224/3*X(4)-16*X(5)    !'T=1/4...X(2)
LET C=70/3*X(1)-208/3*X(2)+76*X(3)-112/3*X(4)+22/3*X(5) !'T=2/4...X(3)
LET D=-25/3*X(1)+16*X(2)-12*X(3)+16/3*X(4)-X(5)         !'T=3/4...X(4)
LET E=X(1)                                              !'T=4/4...X(5)
LET Y4=A*T^4+B*T^3+C*T^2+D*T+E
END FUNCTION


------------------------------------------------------
   曲線の場合


SET COLOR MODE "NATIVE"
RANDOMIZE
SET LINE WIDTH 30
LET N=INT(RND*3)+3
DIM R(N),G(N),B(N),X(N),Y(N)
FOR J=1 TO N
   LET R(J)=INT(RND*255)
   LET G(J)=INT(RND*255)
   LET B(J)=INT(RND*255)
   LET X(J)=RND
   LET Y(J)=RND
NEXT J
CALL LINE(N,X,Y,R,G,B)
END

EXTERNAL FUNCTION LARGRANGE(X(),Y(),N,T) !'ラグランジュ補間
FOR I=1 TO N
   LET R=Y(I)
   FOR J=1 TO N
      IF J<>I THEN LET R=R*(T-X(J))/(X(I)-X(J))
   NEXT J
   LET S=S+R
NEXT I
LET LARGRANGE=S
END FUNCTION

EXTERNAL  SUB LINE(N,X(),Y(),R(),G(),B())
DIM TT(N)
FOR I=1 TO N
   LET TT(I)=(I-1)/(N-1)
NEXT I
FOR T=0 TO 1 STEP 1/128
   LET RR=LARGRANGE(TT,R,N,T)
   LET GG=LARGRANGE(TT,G,N,T)
   LET BB=LARGRANGE(TT,B,N,T)
   LET XX=LARGRANGE(TT,X,N,T)
   LET YY=LARGRANGE(TT,Y,N,T)
   LET RR=MAX(0,MIN(INT(RR),255))
   LET GG=MAX(0,MIN(INT(GG),255))
   LET BB=MAX(0,MIN(INT(BB),255))
   SET LINE COLOR 65536*BB+256*GG+RR
   PLOT LINES:XX,YY;
NEXT  T
PLOT LINES
END SUB

------------------------------------------------------
      円の場合


SET COLOR MODE "NATIVE"
RANDOMIZE
SET LINE WIDTH 10
DIM R(10),G(10),B(10)
SET WINDOW -1,1,-1,1
FOR RR=.1 TO 1 STEP 1/10
   LET N=INT(RND*4)+3
   FOR J=1 TO N-1
      LET R(J)=INT(RND*255)
      LET G(J)=INT(RND*255)
      LET B(J)=INT(RND*255)
   NEXT J
   LET R(N)=R(1)
   LET G(N)=G(1)
   LET B(N)=B(1)
   CALL CIRCLE(N,0,0,RR,R,G,B)
NEXT  RR
END

EXTERNAL FUNCTION LARGRANGE(X(),Y(),N,T)
FOR I=1 TO N
   LET R=Y(I)
   FOR J=1 TO N
      IF J<>I THEN LET R=R*(T-X(J))/(X(I)-X(J))
   NEXT J
   LET S=S+R
NEXT I
LET LARGRANGE=S
END FUNCTION

EXTERNAL  SUB CIRCLE(N,XX,YY,R0,R(),G(),B())
DIM TT(N)
FOR I=1 TO N
   LET TT(I)=(I-1)/(N-1)
NEXT I
FOR T=0 TO 1 STEP 1/128
   LET RR=LARGRANGE(TT,R,N,T)
   LET GG=LARGRANGE(TT,G,N,T)
   LET BB=LARGRANGE(TT,B,N,T)
   LET RR=MAX(0,MIN(INT(RR),255))
   LET GG=MAX(0,MIN(INT(GG),255))
   LET BB=MAX(0,MIN(INT(BB),255))
   SET LINE COLOR 65536*BB+256*GG+RR
   PLOT LINES:XX+R0*COS(2*PI*T),YY+R0*SIN(2*PI*T);
NEXT  T
PLOT LINES
END SUB
 

ubuntuへの十進basic インストール

 投稿者:chyatora  投稿日:2019年 1月 3日(木)14時49分6秒
返信・引用
  白石さま
 早速の御教示ありがとう御座います。できました。
 hayashi様 投稿のハート型を表示して動作を確認しました。
 今後も勉強させていただきます。
 宜しくお願いいたします。
 

Re: ubuntuへの十進basic インストール

 投稿者:SHIRAISHI kazuo  投稿日:2019年 1月 3日(木)08時34分52秒
返信・引用 編集済
  > No.4614[元記事へ]

ダウンロードしたアーカイブファイルをダブルクリックすると,おそらくアーカイブマネージャーが起動すると思うので,BASICJaを選択して希望のインストール場所を指定してください。
Windowsとファイルマネージャーの使い勝手が異なるので最初は戸惑うことが多いと思いますが,そのうち慣れると思います。
 

ubuntuへの十進basic インストール

 投稿者:chyatora  投稿日:2019年 1月 3日(木)07時19分53秒
返信・引用
   Windows から ubuntu にOSを変更しようと思います。
 ubuntu へのインストール手順をわかりやすく教えていただけないでしょうか。
 ダウンロードしたあとのインストールまでの手順が知りたいです。
 よろしくお願いいたします。
 

レンタル掲示板
/162