Run m2000.exe (the M2000 Interpreter), write Edit A and then copy this program. Press Esc and write Save UnionFlag to save it, Now write A and press enter to execute,
We get Union |Flag at 3/5 and 1/2 ratio.
// https://en.wikipedia.org/wiki/Flag_of_the_United_Kingdom
// https://www.flagcolorcodes.com/united-kingdom
CLS 5,0
module UnionFlag(X1=3000, Y1=1000, z=10000, RATIO=.6) {
RED=#C8102E
BLUE=#012169
WHITE=#FFFFFF
z50=z div 50
z1=int(z*RATIO)
z130=z1 div 30
MOVE X1,Y1
PATH {
POLYGON 0, z+twipsX, 0, 0, z1+twipsY, -z-twipsX, 0, 0,-z1-twipsY
};
PEN BLUE {POLYGON BLUE, z+twipsX, 0, 0, z1+twipsY, -z-twipsX, 0, 0,-z1-twipsY}
MOVE X1+Z/2,Y1+Z1/2
P=ATN(Z1/Z)/180*PI
Z2=SQRT(Z1**2+Z**2)
STEP ANGLE P, -Z2/2
STEP ANGLE P+PI/2, -Z130*3
PEN WHITE {POLYGON WHITE, ANGLE P, Z2, P+PI/2, Z130*6, P, -Z2, P+PI/2, -Z130*6}
STEP ANGLE P+PI/2, Z130
PEN RED {POLYGON RED, ANGLE P, Z2/2, P+PI/2, Z130*2, P, -Z2/2, P+PI/2, -Z130*2}
STEP ANGLE P+PI/2, Z130*2
STEP ANGLE P, Z2/2
PEN RED {POLYGON RED, ANGLE P, Z2/2, P+PI/2, Z130*2, P, -Z2/2, P+PI/2, -Z130*2}
MOVE X1+Z/2,Y1+Z1/2
oldp=p
p=pi/2-p
STEP ANGLE P-PI/2, -Z2/2
STEP ANGLE P, Z130*3
PEN WHITE {POLYGON WHITE, ANGLE P+pi/2, -Z2, P, -Z130*6, P+pi/2,Z2, P, Z130*6}
STEP ANGLE P, -Z130*3
PEN RED {POLYGON RED, ANGLE P+pi/2, -Z2/2, P, -Z130*2, P+pi/2,Z2/2, P, Z130*2}
STEP ANGLE P, Z130*2
STEP ANGLE P+PI/2, -Z2/2
PEN RED {POLYGON RED, ANGLE P+pi/2, -Z2/2, P, -Z130*2, P+pi/2,Z2/2, P, Z130*2}
p=oldp
MOVE X1+Z/2,Y1+Z1/2
STEP -z50*5, -z1/2
PEN white {POLYGON white, z50*10, 0, 0,z1, -z50*10, 0, 0, -z1}
STEP z50*5-z/2, z1/2
STEP 0, -z130*5
PEN white {POLYGON white, z, 0, 0, 10*z130, -z, 0, 0, -10*z130}
STEP z/2, z130*5
STEP -z50*3, -z1/2
PEN red {POLYGON red, z50*6, 0, 0,z1, -z50*6, 0, 0, -z1}
STEP z50*3-z/2, z1/2
STEP 0, -z130*3
PEN red {POLYGON red, z, 0, 0, 6*z130, -z, 0, 0, -6*z130}
STEP z/2, z130*3
path {};
}
unionFlag 1000,8100, 15000, 0.5
unionFlag
unionFlag 16000,1000, 8000
unionFlag 18000,9000, 8000, 0.5
drawing {
unionFlag
} as unionFlag
move 8000,10000
image unionFlag, 9000,,30
a$=key$
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου
You can feel free to write any suggestion, or idea on the subject.