program lab_14; uses graph,crt; type Point=record x,y :word; end; type Po_t=record x,y:integer; end; const str = 'Module GRAPH'; var x,y,i,x_t,y_t :integer; point_t :array[0..3] of Point; p_t :array[0..3] of Po_t; begin x:=detect; InitGraph(x,y,'Z:'); SetBkColor(White); ClearDevice; SetColor(8); //boarder Line(10,10,1014,10);Line(1014,10,1014,758); Line(1014,758,10,758);Line(10,758,10,10); //axis Line(512,10,512,758); Line(10,384,1014,384); // 1quad [10.10 - 512.384] c.p[261.197] SetFillStyle(5,3); p_t[0].x:=0; p_t[0].y:=150; for i:=1 to 3 do begin p_t[i].x:=trunc(p_t[i-1].x*cos((2*pi)/3)-p_t[i-1].y*sin((2*pi)/3)); p_t[i].y:=trunc(p_t[i-1].x*sin((2*pi)/3)+p_t[i-1].y*cos((2*pi)/3)); end; for i:=0 to 3 do begin //point_t[i].x:=point_t[i].x+384; //point_t[i].y:=point_t[i].y+40; if p_t[i].x<0 then point_t[i].x:=261-abs(p_t[i].x) else point_t[i].x:=261+p_t[i].x; if p_t[i].y<0 then point_t[i].y:=197-abs(p_t[i].y) else point_t[i].y:=197+abs(p_t[i].y); writeln(p_t[i].x); writeln(p_t[i].y); writeln(point_t[i].x); writeln(point_t[i].y); writeln; end; FillPoly(4,point_t); // 2quad [512.10 - 1014.384] c.p.[773.197] for i:=5 to 15 do begin SetColor(i-5); circle(773,197,i*10); end; SetColor(0); // 3quad [10.384 - 512.758] c.p. [261.581] x :=230; y :=480; x_t:=290; y_t:=640; SetFillStyle(1,red); Bar(x,y,x_t,y_t); Bar(x-50,y+50,x_t+50,y_t-50); // 4quad [512.384-1014.758[ c.p. [773.581] SetColor(8); ellipse(773,581,0,360,220,110); // text outtextxy(530,375,'Complited: Me!, 103g'); i:=400; while (i<520) do begin outtextxy(515,i,str[trunc((i-400)/10)+1]); inc(i, 10); end; readln; CloseGraph; end.