Меню сайта

Задача №15

Построение многогранников.

uses graph,crt-

vargd,gm,choice:integer-

label 1,2,3-

begin

writeln(‘1-тетраэдр 2-куб 3-четырехугольная пирамида’)-

readln(choice)-

initgraph(gd,gm,’c:&#92-bp&#92-bgi’)-

IF choice = 1 THENGOTO 1-

IF choice = 2 THENGOTO 2-

IF choice = 3 THENGOTO 3-

1:

LINE (150, 100,67,100)-

LINE (67, 100,102,68)-

LINE (102, 68,150,100)-

LINE (150, 100,140,50)-

LINE (67, 100,140,50)-

LINE (102, 68,140,50)-

repeat-

until keypressed-

halt-

2:

rectangle (320,240,220, 340)-

rectangle (300,200,200, 300)-

LINE (320, 240,300,200)-

LINE (220, 240,200,200)-

LINE (320, 340,300,300)-

LINE (220, 340,200,300)-

repeat-

until keypressed-

halt-

3:

LINE (320, 240,400,240)-

LINE (350, 290,430,290)-

LINE (320, 240,350,290)-

LINE (400, 240,430,290)-

LINE (430, 290,350,180)-

LINE (350, 290,350,180)-

LINE (320, 240,350,180)-

LINE (400, 240,350,180)-

repeat-

until keypressed-

halt-

closegraph-

end.

Категория: Графика в Паскале | Дата: 23.11.12

Меню раздела
Блок