§ Изометрическое изображение кубика

10 PLOT 50,50: DRAW 0,100: DRAW 100,0: DRAW 0,-100: DRAW -100,0
20 PLOT 0,0: DRAW 0,100: DRAW 100,0: DRAW 0,-100: DRAW -100,0
30 PLOT 0,0: DRAW 50,50
40 PLOT 100,0: DRAW 50,50
50 PLOT 0,100: DRAW 50,50
60 PLOT 100,100: DRAW 50,50
70 PRINT AT 3,6;"0"; AT 15,6;"3"; AT 3,18;"1"; AT 15,18;"2"
80 PRINT AT 21,0;"7"; AT 21,12;"6"; AT 9,0;"4"; AT 9,12;"5"
cube.png

§ Джуди Хопс?

10 PLOT 107,144: DRAW 13,3: DRAW 13,-1: DRAW 12,-5: DRAW 7,-8: DRAW 6,-13: DRAW 5,-9: DRAW 2,-11: DRAW -2,-10: DRAW -13,-9: DRAW -17,-8: DRAW -16,0: DRAW -14,2: DRAW -12,8: DRAW -8,6: DRAW 0,10: DRAW 2,10: DRAW 4,7: DRAW 2,10: DRAW 5,7: DRAW 4,6: DRAW 7,4
20 PLOT 112,126: DRAW -9,-1: DRAW -6,-4: DRAW -4,-5: DRAW -1,-4: DRAW 0,-2: DRAW 5,-3: DRAW 9,-1: DRAW 5,0: DRAW 7,4: DRAW 1,6: DRAW -2,6: DRAW -4,4: PLOT 102,115: DRAW 3,-5: DRAW 5,-1: DRAW 4,1: DRAW 3,2: DRAW 1,5: DRAW -2,4: DRAW -4,3: DRAW -5,-1: DRAW -3,-2
30 DRAW -2,-4: DRAW 0,-2: PLOT 108,120: DRAW 4,1: DRAW 2,-1: DRAW 0,-2: DRAW 0,-3: DRAW -2,-2: DRAW -3,0: DRAW -2,2: DRAW 0,3: DRAW 1,1: DRAW 0,-5: DRAW 4,0: DRAW 1,6: DRAW 0,-6: DRAW -1,6: DRAW -1,0: DRAW 0,-6: DRAW -2,1: DRAW 1,4: DRAW -1,0: DRAW 1,-4: DRAW 0,2
40 PLOT 119,102: DRAW 8,-3: DRAW 3,0: DRAW 7,3: DRAW -3,-5: DRAW -5,-2: DRAW 0,-4: DRAW -1,3: DRAW -9,7: PLOT 113,94: DRAW 9,-3: DRAW 4,-1: DRAW 5,0: DRAW 4,0: DRAW -3,-4: DRAW -3,-1: DRAW -5,0: DRAW -4,2: DRAW -7,6: PLOT 147,130: DRAW 6,-4: DRAW 2,-5: DRAW 2,-5
50 DRAW -1,-5: DRAW -3,-2: DRAW -7,-4: DRAW -7,2: DRAW -1,6: DRAW 0,8: DRAW 4,7: DRAW 5,2: PLOT 144,127: DRAW 4,-2: DRAW 2,-4: DRAW 1,-4: DRAW 0,-3: DRAW -4,-2: DRAW -3,0: DRAW -2,2: DRAW -3,2: PLOT 145,123: DRAW 3,-3: DRAW 0,-2: DRAW 0,-3: DRAW -2,-1: DRAW -2,1
60 DRAW -1,3: DRAW -1,4: DRAW 3,0: DRAW 1,-7: DRAW 1,5: DRAW -1,0: DRAW -1,-5: DRAW -2,6: DRAW 3,-1: DRAW 0,1: DRAW 2,-4: DRAW -1,0: DRAW 0,-1: DRAW -2,2: DRAW -1,2: DRAW -2,0: PLOT 143,120: PLOT 142,120: DRAW 1,-2: DRAW -1,-1: DRAW 2,-2: DRAW -2,3: PLOT 114,134
70 DRAW -8,4: DRAW -6,-2: DRAW -6,-6: PLOT 137,137: DRAW 6,2: DRAW 5,-2: PLOT 94,132: DRAW 2,19: DRAW 4,17: DRAW 1,7: DRAW 4,-1: DRAW 3,-29: PLOT 91,125: DRAW -7,23: DRAW -5,15: DRAW -2,12: PLOT 126,175: DRAW 2,-28: PLOT 143,142: DRAW -12,31: PLOT 147,174
80 DRAW -1,-18: DRAW 1,-15: PLOT 132,173: DRAW 1,0: DRAW 0,2: PLOT 0,175: PLOT 139,75: DRAW -2,-6: DRAW 2,-5: DRAW 5,-7: DRAW 7,-5: DRAW 3,-15: DRAW 3,-18: DRAW 4,-12: DRAW -7,-2: DRAW -8,-4: DRAW -3,9: DRAW 3,14: DRAW 1,9: PLOT 111,73: DRAW 2,-5: DRAW -1,-4
90 DRAW -7,-5: DRAW -8,-8: DRAW -4,-21: DRAW -3,-21: DRAW 4,0: DRAW 7,-1: DRAW 5,-2: DRAW 5,-3: DRAW -1,10: DRAW 0,15: DRAW -3,11: PLOT 91,8: DRAW 1,-4: DRAW 3,-1: DRAW 2,0: DRAW 1,3: DRAW 0,2: PLOT 111,63: DRAW 12,-7: DRAW 10,-4: DRAW 6,3: DRAW 4,3: DRAW 5,-4
100 DRAW -11,-5: DRAW -10,0: DRAW -8,3: DRAW -9,6: DRAW -3,1: DRAW 8,1: DRAW 4,-6: DRAW 5,1: DRAW 6,-5: DRAW 2,1: DRAW 6,-1: DRAW 2,4: DRAW 6,0: PLOT 0,175: PLOT 110,101: DRAW 11,7: DRAW 8,1: DRAW 6,-1: DRAW 8,-4: DRAW 6,-2
judi.png

§ Повёрнутый на чём-то, куб

Мы все на чём-то повёрнуты, как этот куб-компаньон.
10 DATA -1,1,1,  1,1,1,  1,-1,1,  -1,-1,1
20 DATA -1,1,-1, 1,1,-1, 1,-1,-1, -1,-1,-1
30 DATA 2,1,4,3, 1,2,6,5, 5,6,7,8, 3,4,8,7, 1,5,8,4, 6,2,3,7
40 DIM v(8,3): DIM f(6,4): DIM p(8,2): DIM t(4,2)
50 LET camx = 0: LET camy = 0: LET camz=3
54 LET cosx=COS(0.5): LET sinx=SIN(0.5)
55 LET cosy=COS(0.5): LET siny=SIN(0.5)
56 LET cosz=COS(0.5): LET sinz=SIN(0.5)
60 FOR i=1 TO 8: FOR j=1 TO 3: READ v(i,j): NEXT j: NEXT i
70 FOR i=1 TO 6: FOR j=1 TO 4: READ f(i,j): NEXT j: NEXT i
80 FOR i=1 TO 8
81 LET yp=v(i,2)*cosx + v(i,3)*sinx
82 LET zp=v(i,3)*cosx - v(i,2)*sinx
83 LET xp=v(i,1)*cosy + zp*siny
84 LET zp=zp*cosy - v(i,1)*siny: LET xp2=xp
85 LET xp=xp2*cosz + yp*sinz
86 LET yp=yp*cosz - xp2*sinz
90 LET p(i,1)=128+(camx+xp)*80/(zp+camz)
100 LET p(i,2)=87-(camy+yp)*80/(zp+camz)
110 NEXT i
120 FOR i=1 TO 6
130 FOR j=1 TO 4
140 LET t(j,1)=p(f(i,j),1): LET t(j,2)=p(f(i,j),2)
150 NEXT j
160 LET ABX=t(2,1)-t(1,1): LET ABY=t(2,2)-t(1,2)
170 LET ACX=t(4,1)-t(1,1): LET ACY=t(4,2)-t(1,2)
180 IF ABX*ACY < ACX*ABY THEN GO TO 240
190 PLOT t(1,1),t(1,2)
200 DRAW t(2,1)-t(1,1),t(2,2)-t(1,2)
210 DRAW t(3,1)-t(2,1),t(3,2)-t(2,2)
220 DRAW t(4,1)-t(3,1),t(4,2)-t(3,2)
230 DRAW t(1,1)-t(4,1),t(1,2)-t(4,2)
240 NEXT i
test.png
24 авг, 2022
© 2007-2022 Мочил лажовый запад