//004 size 400 500 paper 100 command circlew solid cx cy radius r g b { pen r g b set x 0 set y radius set d (1-radius) //circlepixels cx cy x y // 707/1000 approximates square root of 0.5 = cos(45) repeat x 0 (radius*707/1000) { set tempd d smaller? tempd 0 { set d (d+(2*x)+3) } notsmaller? tempd 0 { set d (d+(2*(x-y))+5) set y (y-1) } same? solid 0 { line (cx+x) (cy+y) (cx+x) (cy+y) line (cx+y) (cy+x) (cx+y) (cy+x) line (cx+y) (cy-x) (cx+y) (cy-x) line (cx+x) (cy-y) (cx+x) (cy-y) line (cx-x) (cy-y) (cx-x) (cy-y) line (cx-y) (cy-x) (cx-y) (cy-x) line (cx-y) (cy+x) (cx-y) (cy+x) line (cx-x) (cy+y) (cx-x) (cy+y) } notsame? solid 0 { line (cx+x) (cy+y) (cx+x) (cy-y) line (cx-x) (cy+y) (cx-x) (cy-y) line (cx-y) (cy+x) (cx+y) (cy+x) line (cx-y) (cy-x) (cx+y) (cy-x) } } refresh } //主圓 command circleAO Ox Oy//外 { circleW 1 Ox Oy 37 100 100 100 circleW 1 Ox Oy 35 0 0 0 circleW 0 Ox Oy 30 100 100 100 } command circleAI Ix Iy//內 { circleW 0 Ix Iy 37 100 100 100 circleW 1 Ix Iy 31 100 100 100 circleW 1 Ix Iy 29 0 0 0 } command circleAN Nx Ny//同 { circleW 1 Nx Ny 37 100 100 100 circleW 1 Nx Ny 36 0 0 0 circleW 0 Nx Ny 30 100 100 100 } //白虛實圓 command circleY Dcom DBx DBy radius//Dcom=1實心 { same? Dcom 1 { circleW 1 DBx DBy radius 100 100 100 } notsame? Dcom 1 { circleW 0 DBx DBy radius 100 100 100 } } //黑虛圓 command circleBW BWx BWy radius { circleW 1 BWx BWy radius 0 0 0 } //黑圓 command circleF DSx DSy radius { circleW 1 DSx DSy radius 0 0 0 circleW 0 DSx DSy radius 100 100 100 } //箭頭 command Arrow air com AWax AWay //air=1右_com=1實心 { pen 0 same? air 1 { same? com 1 { repeat br 0 10 { line (AWax-8) (AWay-5+br) (AWax+8) (AWay) } } notsame? com 1 { line (AWax-8) (AWay-5) (AWax+8) (AWay) line (AWax+8) (AWay) (Awax-8) (AWay+5) line (AWax-8) (AWay+5) (AWax-8) (AWay-5) } } same? air 2 { same? com 1 { repeat br 0 10 { line (AWax-5+br) (AWay-8) (AWax) (AWay+8) } } notsame? com 1 { line (AWax-5) (AWay-8) (AWax) (AWay+8) line (AWax) (AWay+8) (Awax+5) (AWay-8) line (AWax+5) (AWay-8) (AWax-5) (AWay-8) } } same? air 3 { same? com 1 { repeat br 0 10 { line (AWax+8) (AWay-5+br) (AWax-8) (AWay) } } notsame? com 1 { line (AWax-8) (AWay) (AWax+8) (AWay+5) line (AWax+8) (AWay+5) (AWax+8) (AWay-5) line (AWax+8) (AWay-5) (AWax-8) (AWay) } } same? air 4 { same? com 1 { repeat br 0 10 { line (AWax-5+br) (AWay+8) (AWax) (AWay-8) } } notsame? com 1 { line (AWax-5) (AWay+8) (AWax) (AWay-8) line (AWax) (AWay-8) (AWax+5) (AWay+8) line (AWax+5) (AWay+8) (AWax-5) (AWay+8) } } } fast //p2 circleAO 150 50 circleY 1 150 50 4 circleF 150 20 4 circleF 150 80 4 //p3 circleAO 250 50 Arrow 1 0 250 50 circleY 1 240 30 2 circleY 1 260 30 2 //p4 circleAI 350 50 circleY 1 350 38 4 circleY 1 350 62 2 circleY 1 380 20 2 circleY 1 388 30 2 //p8 circleAN 350 150 Arrow 2 1 350 150 circleY 0 355 108 2 circleY 0 345 108 2 //p12 circleAO 350 250 circleY 1 350 250 4 circleY 1 320 220 2 line 350 250 320 220 circleY 1 387 250 4 //p7 circleAO 250 150 Arrow 2 0 250 150 circleY 1 250 135 2 circleF 265 125 4 circleF 235 125 4 //p11 circleAI 250 250 circleY 1 250 268 2 circleY 1 250 250 4 line 250 268 250 250 circleF 286 250 4 circleF 214 250 4 circleY 1 225 215 2 circleY 1 218 223 2 //p15 line 295 350 250 350 circleY 1 295 350 2 circleAO 250 350 Arrow 1 1 245 350 circleY 1 250 313 4 circleY 0 263 350 4 //p16 circleAI 350 350 circleY 1 350 305 2 line 350 312 350 305 circleY 1 325 350 2 circleF 387 350 4 circleF 383 365 4 Arrow 2 0 350 350 //p20 circleY 1 350 492 2 circleY 1 350 408 2 line 350 492 350 408 circleAO 350 450 Arrow 3 1 350 450 //p19 circleAO 250 450 circleY 1 250 450 4 circleY 1 235 450 2 line 250 450 235 450 circleY 1 350 250 4 circleY 1 280 430 4 circleY 1 280 470 4 //p18 circleAN 150 450 circleY 1 150 462 4 circleY 0 150 438 4 //p17 circleAI 50 450 circleY 1 50 405 2 line 50 412 50 405 circleY 1 50 460 2 circleF 87 450 4 Arrow 4 0 50 440 circleY 1 20 480 2 circleY 1 12 470 2 //p13 circleAI 50 350 circleY 1 63 350 4 circleF 30 380 4 Arrow 1 1 40 350 //p14 circleAI 150 350 circleY 1 150 308 2 circleY 1 158 391 2 circleY 1 169 387 2 Arrow 4 0 150 350 //p10 circleAO 150 250 circleY 1 135 250 2 Arrow 3 1 150 250 //p9 circleAO 50 250 circleY 1 50 250 4 circleY 1 60 240 2 line 50 250 60 240 circleY 1 30 258 2 circleY 1 30 242 2 //p6 circleAN 150 150 circleY 1 165 150 2 Arrow 3 0 140 150 circleF 180 170 4 circleF 180 130 4 line 165 150 148 150 //p5 circleAI 50 150 circleY 1 50 150 4 circleY 1 19 170 2 circleY 1 29 180 2 //p1 circleY 1 13 50 2 line 95 50 50 50 circleAI 50 50 circleY 1 95 50 2 circleF 19 70 4 circleF 19 30 4 Arrow 1 1 50 50