Слайд 1Сатурн и его кольца на экране монитора
Моделирование на языке программирования
QBASIC
Слайд 2«Чёрная дыра»
SCREEN 12
FOR i = 50 TO 1 STEP -1
x
= INT(300 / 2)
y = 50 + 900 / i
r
= 3 * i
CIRCLE (x, y), r, , , , .3
NEXT i
Слайд 3«Сатурн и его кольца»
SCREEN 12
x = INT(300 / 2)
y =
INT(200 / 2)
FOR r = 79 TO 81
CIRCLE (x, y),
r
NEXT r
k0 = .77
k2 = .77
FOR i = 1 TO 26 STEP 5
k0 = k0 - .02
k1 = k0 * 3.1415
k2 = k2 + .05
CIRCLE (x, y - 7), 100 + i, , k1, k2, .3
NEXT i
Слайд 4«Ваза»
SCREEN 12
FOR i = 15 TO 2 STEP -1
r =
120 * COS(3.1415 / i)
y = 80 * SIN(3.1415 /
i)
CIRCLE (INT(300 / 2), 20 + y), r, , , , .3
NEXT i
y2 = y
FOR i = 10 TO 65 STEP 5
r = 20 / (i / 20)
CIRCLE (INT(300 / 2), y2 + i), r, , , , .3
NEXT i
y3 = y2 + 65
FOR i = 2 TO 10
r = 2 * EXP(i / 3)
CIRCLE (INT(300 / 2), y3 + i), r, , , , .3
NEXT i
Слайд 5«Чаша»
SCREEN 7
pi = 3.14
CIRCLE (160, 40), 30, 2, , ,
.2
CIRCLE (160, 40), 60, 2, pi, 2 * pi, 2
CIRCLE
(160, 95), 65, 2, .6 * pi, .4 * pi, .2
CIRCLE (190, 60), 10, 2, 1.36 * pi, .49 * pi
PAINT (160, 50), 1, 2
Слайд 6«Ваза 2»
SCREEN 7
pi = 3.14
CIRCLE (160, 45), 30, 5, ,
, .15
CIRCLE (130, 65), 20, 5, 1.5 * pi, .5
* pi, 2
CIRCLE (190, 65), 20, 5, .5 * pi, 1.5 * pi, 2
CIRCLE (130, 95), 10, 5, .5 * pi, 1.5 * pi, 1.1
CIRCLE (190, 95), 10, 5, 1.5 * pi, .5 * pi, 1.1
LINE (130, 105)-(190, 105), 5
PAINT (150, 80), 5, 5