DIM srez(5000)
DIM set(5000)
DIM set1(5000)
DIM set2(5000)
DIM set3(5000)
DIM det(5000)
SCREEN 12
COLOR 6
GOSUB 1000
A = 0: FV = VARPTR(A)
b = 0: FS = VARPTR(b)
D = 0: rdv = VARPTR(D)
E = 0: RDs = VARPTR(E)
POKE FV, 0
POKE FS, 0
30 LOCATE 6
PRINT TAB(20); "input speed 1 or 2 - "
40 pv$ = INKEY$
IF pv$ = "1" THEN VY = &O340
IF pv$ = "2" THEN VY = &O350
IF pv$ = "" THEN GOTO 40
IF (pv$ = "1") OR (pv$ = "2") THEN POKE FV, &H1
GOTO 70
50 LOCATE 6
PRINT TAB(20); "input the cutting depth 1 or 2 - "
60 ps$ = INKEY$
IF ps$ = "1" THEN VS = &O360
IF ps$ = "2" THEN VS = &O370
IF ps$ = "" THEN GOTO 60
IF ps$ = "1" OR ps$ = "2" THEN POKE FS, &H1
GOTO 80
70 IF PEEK(FV) = &H1 THEN POKE rdv, VY ELSE GOTO 30
IF PEEK(rdv) = &O340 THEN PAINT (540, 265), 2, 4
IF PEEK(rdv) = &O350 THEN PAINT (540, 293), 2, 4
PLAY "l4 d#"
GOTO 50
80 IF PEEK(FS) = &H1 THEN POKE RDs, VS ELSE GOTO 50
IF PEEK(RDs) = &O360 THEN PAINT (540, 328), 2, 4
IF PEEK(RDs) = &O370 THEN PAINT (540, 358), 2, 4
PLAY "l4 d#"
GOSUB 2000
END
2000 REM ********************dinamika**************************
IF PEEK(rdv) = &O340 THEN T = 90000
IF PEEK(rdv) = &O350 THEN T = 10000
IF PEEK(RDs) = &O360 THEN GOTO 2010
IF PEEK(RDs) = &O370 THEN GOTO 2020
2010 PAINT (470, 210), 2, 4
PLAY "a#"
FOR i = 90 TO 264
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (i, 290), set, XOR
PUT (i + 1, 290), set, OR
NEXT i
PAINT (470, 210), 15, 4
PAINT (560, 210), 2, 4
PLAY "a#"
PUT (265, 290), set
PUT (235, 320), set1
FOR i = 1 TO 155
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (235, 321 - i), set1, XOR
PUT (235, 320 - i), set1, OR
NEXT i
PAINT (560, 210), 15, 4
PAINT (560, 166), 2, 4
PLAY "a#"
PUT (235, 165), set1
PUT (252, 165), set2
FOR i = 1 TO 155
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (253 - i, 165), set2, XOR
PUT (252 - i, 165), set2, OR
NEXT i
PAINT (560, 170), 15, 4
PAINT (470, 170), 2, 4
PLAY "a#"
PUT (97, 165), set2
PUT (90, 165), set3
FOR i = 1 TO 126
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (90, 164 + i), set3, XOR
PUT (90, 165 + i), set3, OR
NEXT i
PAINT (470, 170), 15, 4
PLAY "a#"
GOTO 2030
2020 PAINT (470, 210), 2, 4
FOR i = 90 TO 252
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (i, 290), set, XOR
PUT (i + 1, 290), set, OR
NEXT i
PAINT (470, 210), 15, 4
PAINT (560, 210), 2, 4
PLAY "a#"
PUT (253, 290), set
PUT (223, 320), set1
FOR i = 1 TO 150
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (223, 321 - i), set1, XOR
PUT (223, 320 - i), set1, OR
NEXT i
PAINT (560, 210), 15, 4
PAINT (560, 170), 2, 4
PLAY "a#"
PUT (223, 170), set1
PUT (253, 170), set2
FOR i = 1 TO 144
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (254 - i, 170), set2, XOR
PUT (253 - i, 170), set2, OR
NEXT i
PAINT (560, 170), 15, 4
PAINT (470, 170), 2, 4
PLAY "a#"
PUT (109, 170), set2
PUT (109, 170), set3
FOR i = 1 TO 120
FOR j = 1 TO T
ZADERJ = EXP(30)
NEXT j
PUT (109, 169 + i), set3, XOR
PUT (109, 170 + i), set3, OR
NEXT i
PAINT (470, 170), 15, 4
2030 RETURN
1000 REM *********** nadpisi *******************
COLOR (3)
LOCATE (11)
PRINT TAB(72); "relay 3"
LOCATE (11)
PRINT TAB(52); "relay 4"
LOCATE (14)
PRINT TAB(72); "relay 2"
LOCATE (14)
PRINT TAB(52); "relay 1"
COLOR (4)
LOCATE (16)
PRINT TAB(63); "SPEED"
COLOR (3)
LOCATE (17)
PRINT TAB(60); "V1 - "
LOCATE (19)
PRINT TAB(60); "V2 - "
COLOR (4)
LOCATE (20)
PRINT TAB(59); "CUTTING DEPTH"
COLOR (3)
LOCATE (21)
PRINT TAB(60); "S1 - "
LOCATE (23)
PRINT TAB(60); "S2 - "
COLOR (1)
LOCATE (2)
PRINT TAB(25); "CONTROL OF THE MODEL OF OBJECT"
REM ********************** ramki ******************
LINE (10, 10)-(630, 460), 5, B
LINE (15, 15)-(625, 150), 5, B
LINE (15, 155)-(400, 455), 5, B
LINE (405, 155)-(625, 455), 5, B
PAINT (11, 11), 14, 5
REM ************** risunok ***********************
LINE (150, 230)-(250, 300), 2, BF
LINE (90, 320)-(130, 360), 4, BF
CIRCLE (110, 340), 15, 9
PAINT (110, 340), 9, 9
DRAW "bm 110,320 "
DRAW "u30 f5 d25"
DRAW "bm 90,340"
DRAW "l25 g5 r30"
DRAW "bm 110,360 "
DRAW "d25 f5 u30"
DRAW "bm 130,340"
DRAW "r25 f5 l30"
LINE (490, 170)-(540, 210), 5, B
CIRCLE (470, 170), 7, 4
CIRCLE (470, 210), 7, 4
CIRCLE (560, 170), 7, 4
CIRCLE (560, 210), 7, 4
CIRCLE (540, 265), 7, 4
CIRCLE (540, 293), 7, 4
CIRCLE (540, 328), 7, 4
CIRCLE (540, 358), 7, 4
k = 90
LINE (300, 200)-(305, 210), 0, BF
GET (300, 200)-(301, 210), srez
GET (150, 250)-(250, 270), det
GET (90, 290)-(130, 360), set
GET (60, 320)-(130, 360), set1
GET (90, 320)-(130, 390), set2
GET (90, 320)-(160, 360), set3
PUT (60, 320), set1
PUT (90, 320), set2
PUT (90, 320), set3
PUT (90, 290), set, OR
RETURN
Тестирование выполнено в программе QB64 ( Скачать )