DECLARE SUB heart.model (cnt.heart!) DECLARE SUB lungs.model (cnt.lung!) '*************************************************************** '* '* This is a model. pmg '04 '* SCREEN 12 main.rate = 10 / 100 WHILE mercy$ <> CHR$(27) WINDOW SCREEN (0, 0)-(638, 478) VIEW (1, 1)-(638, 478), , 4 heart.model (cnt.xh) lungs.model (cnt.xl) cnt = cnt + main.rate cnt.xh = cnt cnt.xl = cnt mercy$ = INKEY$ 'PRINT "", mercy$, CHR$(27) WEND CLS END SUB heart.model (cnt.heart) heart.capacity = 20 x = 25 y = 100 dhi = 240 / 2 d1.hi = 200 / 2 xh = 210 + x yh = 230 + y x1.h = 360 + x y1.h = 260 + y delay.first = 0 delay.second = 0 delay.global = 0 WHILE delay.global < 100 delay.global = delay.global + 1 WEND WHILE delay.first < 100 delay.first = delay.first + 1 WEND dh = dhi + heart.capacity * SIN(cnt.heart + 180) WHILE delay.second < 600 delay.second = delay.second + 1 WEND d1.h = d1.hi + heart.capacity * SIN(cnt.heart + 145) CIRCLE (xh, yh), dh, 12 CIRCLE (x1.h, y1.h), d1.h, 4 CLS END SUB SUB lungs.model (cnt.lung) lung.capacity = 45 x = 20 y = 0 dialate.lung.r = lung.capacity * COS((cnt.lung * .4) + 135) dialate.lung.l = lung.capacity * COS((cnt.lung * .4) + 135) x.l = 280 + x y.l = 50 + y x1.l = 50 - dialate.lung.r + x y1.l = 400 + dialate.lung.r + y xa.l = 320 + x ya.l = 50 + y xa1.l = 550 + dialate.lung.l + x ya1.l = 400 + dialate.lung.l + y LINE (x.l, y.l)-(x1.l, y1.l), 4, B LINE (xa.l, ya.l)-(xa1.l, ya1.l), 4, B END SUB