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

code: #pascal
uses graph,crt;
var gd,gm,choice:integer;
label 1,2,3;
begin
writeln('1-тетраэдр 2-куб 3-четырехугольная пирамида');
readln(choice);
initgraph(gd,gm,'c:\bp\bgi');
IF choice = 1 THEN GOTO 1;
IF choice = 2 THEN GOTO 2;
IF choice = 3 THEN GOTO 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.
Поделиться:

Похожие статьи: