| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- Uses Graph,CRT;
- Var
- d,r,r1,r2,rr,k,
- x1,y1,x2,y2,x01,y01: Integer;
- Xasp, Yasp: Word;
- begin
- d := detect;
- InitGraph(d,r,'');
- x1 := GetMaxX div 2;
- y1 := GetMaxY div 2;
- GetAspectRatio(Xasp,Yasp);
- r:= round(3*GetMaxY*Yasp/8/Xasp);
- r1:= round(0.9*r);
- r2:= round(0.95*r);
- Circle(x1,y1,r);
- Circle(x1,y1,round(1.02*r));
- for k := 0 to 59 do
- begin
- if k mod 5 = 0 then
- rr:=r1
- else
- rr:=r2;
- x01:= x1 + round(rr*sin(2*pi*k/60));
- y01:= y1 - round(rr*Xasp*cos(2*pi*k/60)/Yasp);
- x2:= x1 + round(r*sin(2*pi*k/60));
- y2:= y1 - round(r*Xasp*cos(2*pi*k/60)/Yasp);
- Line(x01,y01,x2,y2);
- end;
- SetWriteMode(XorPut);
- SetLineStyle(SolidLn,0,ThickWidth);
- r:=0;
- repeat
- for k := 0 to 59 do
- if not keypressed then begin
- x2:= x1 + round(0.85*r1*sin(2*pi*r/60/12));
- y2:= y1 - round(0.85*r1*Xasp*cos(2*pi*r/60/12)/Yasp);
- x01:= x1 + round(r2*sin(2*pi*k/60));
- y01:= y1 - round(r2*Xasp*cos(2*pi*k/60)/Yasp);
- Line(X1,y1,x2,y2);
- Line(x1,y1,x01,y01);
- Delay(100);
- Line(x1,y1,x01,y01);
- Line(X1,y1,x2,y2);
- inc(r);
- if r=12*60 then r:=0;
- end
- Until keypressed;
- if readkey=#0 then k := ord(readkey);
- CloseGraph;
- End.
|