uses crt, graph; var q:char; beta,alfa,s,x,y,z:real; a,b,a1,b1,a2,b2,a3,b3:integer; d,m,i,j,k:integer; procedure koordin(s,z,x,y:real; var a,b:integer); begin y:=y*0.8; if x*x=0 then begin a:=0; b:=round(s*y/(s-z)*100); end else begin a:=round(s*sqrt(x*x+y*y)/(s-z)/sqrt(1+y*y/x/x)*100); b:=round(s*sqrt(x*x+y*y)/(s-z)/sqrt(1+y*y/x/x)*100*y/x); end; if x*a<0 then a:=-a; if y*b<0 then b:=-b; a:=a+320; b:=b+240; if k=1 then a:=a-120 else a:=a+120; end; begin initgraph(d,m,''); alfa:=0; setcolor(15); repeat cleardevice; for k:=1 to 2 do begin case k of 1:begin alfa:=alfa-0.1; end; 2:begin alfa:=alfa+0.1; end; end; for j:=1 to 2 do for i:=1 to 5 do begin koordin(4,cos(alfa+i*pi/2),sin(alfa+i*pi/2),j*2-3,a,b); if i=1 then moveto(a,b) else lineto(a,b); end; for i:=1 to 4 do begin koordin(4,cos(alfa+i*pi/2),sin(alfa+i*pi/2),1,a,b); moveto(a,b); koordin(4,cos(alfa+i*pi/2),sin(alfa+i*pi/2),-1,a,b); lineto(a,b); end; end; {alfa:=alfa+0.01;} { atklaat sho un aizklaat 4 naakamaas rindas, } {delay(100); } { lai roteetu automatiski! } q:=readkey; while q=#0 do q:=readkey; if q=#75 then alfa:=alfa+0.05; if q=#77 then alfa:=alfa-0.05; until (q=#27) or keypressed; closegraph; end.