Program Epicykle;
uses graph,crt;
var karta,tryb,n:integer;
x,y,r,alfa,beta:real;
begin
karta:=detect; initGraph(karta,tryb,'');
alfa:=0;
repeat
r:=120; beta:=alfa;
x:=r*cos(alfa)+320;
y:=r*sin(alfa)+240;
fillEllipse(round(x),round(y),1,1);
for n:=1 to 5 do
begin
r:=r/2; beta:=beta*5;
x:=x+r*cos(beta);
y:=y+r*sin(beta);
putPixel(round(x),round(y),n+10);
end;
alfa:=alfa+0.0005;
until (keyPressed) or (alfa>=2*pi);
readLn; closegraph;
end.
|
|