![]() |
Матрица статей Список статей Всячина Контакты | ||||||||||||
|
Резаный лист
program Paper;
uses CRT, Graph;
var
gd, gm: Integer;
procedure Draw(x, y, l, u : Real; t : Integer);
procedure Draw2(var x, y: Real; l, u : Real; t : Integer);
begin
Draw(x, y, l, u, t);
x := x + l*cos(u);
y := y - l*sin(u);
end;
begin
if t > 0 then
begin
l := l * 0.453;
Draw2(x, y, l, u, t-1);
Draw2(x, y, l, u+7*pi/15, t-1);
Draw2(x, y, l, u-7*pi/15, t-1);
Draw2(x, y, l, u, t-1);
end
else
Line(Round(x), Round(y), Round(x + cos(u)*l), Round(y - sin(u)*l))
end;
begin
gd := Detect;
InitGraph(gd, gm, 'c:\bp\bgi');
Draw(410, 10, 400, -pi, 4);
Draw(10, 410, 400, 0, 4);
Draw(10, 10, 400, -pi/2, 4);
Draw(410, 410, 400, pi/2, 4);
ReadKey;
CloseGraph
end.
Смотрите также: Ссылки:
|