%%%%%%%%%%%%%%%%%% ifclk.gen %%%%%%%%%%%%%%%%%%%%%%%
% (c) Ingo Kloeckl
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.

% History
% 20.12.1999 v1.0  IK 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% generates clock symbols with 5 min increment
% by I.Kloeckl, ingo.kloeckl@2k-software.de
% clock for hh:mm -> \symbol{hh*12+mm/5}

picture clk,	% Zifferblatt
	clkb,	% Zifferblatt mit Zeiger 13:00
	clks;	% Stopuhr

path button; button = (5.5pt,10pt)--(5.5pt,11pt)--(6pt,11pt)..
    (6.5pt,11.5pt)..(6pt,12pt)--(4pt,12pt)..(3.5pt,11.5pt)..
    (4pt,11pt)--(4.5pt,11pt)--(4.5pt,10pt)--cycle;

% Zifferblatt
beginchar(149,10pt#,10pt#,0); 
  pickup pencircle scaled .75linewidth;
  draw fullcircle scaled 10pt shifted (5pt,5pt);
  path s; s=(8pt,5pt)--(9pt,5pt);
  for i=0 upto 11:
    draw s rotatedaround ((5pt,5pt),(i*30));
  endfor;
  clk := currentpicture;
endchar;

n := 0;
for h=3 downto -8:
  for m=15 step -5 until -40:
    beginchar((char n),10pt#,10pt#,0); 
      currentpicture := clk;
      pickup pencircle scaled .75linewidth;
      draw (5pt,5pt)--(9pt,5pt) rotatedaround ((5pt,5pt),(m*6));
      draw (5pt,5pt)--(7pt,5pt) rotatedaround ((5pt,5pt),(h*30-(15-m)/2));
    endchar;
    n := n+1;
  endfor;
endfor;

% Taschenuhr
beginchar(150,10pt#,14pt#,0); 
  currentpicture := clk;
  pickup pencircle scaled .75linewidth;
  draw (5pt,5pt)--(9pt,5pt) rotatedaround ((5pt,5pt),0);
  draw (5pt,5pt)--(7pt,5pt) rotatedaround ((5pt,5pt),22.5);
  clkb := currentpicture;
  draw fullcircle scaled 4pt shifted (5pt,12pt);
  fill button;
endchar;

% Taschenuhr2
beginchar(148,11pt#,16pt#,0); 
  currentpicture := clkb shifted(0,1pt);
  pickup pencircle scaled .75linewidth;
  draw fullcircle scaled 12pt shifted (5pt,6pt);
  draw fullcircle scaled 4pt shifted (5pt,14pt);
  fill button shifted(0,2pt);
endchar;

% stop watch start
beginchar(151,12pt#,12pt#,0); 
  currentpicture := clk;
  pickup pencircle scaled .75linewidth;
  draw fullcircle scaled 2pt shifted (5pt,11pt);
  fill button rotatedaround((5pt,5pt),40);
  fill button rotatedaround((5pt,5pt),-40);
  clks := currentpicture;
  draw (5pt,5pt)--(9pt,5pt) rotatedaround ((5pt,5pt),90);
endchar;

% stop watch stop
beginchar(152,10pt#,12pt#,0); 
  currentpicture := clks;
  pickup pencircle scaled .75linewidth;
  draw (5pt,5pt)--(9pt,5pt) rotatedaround ((5pt,5pt),-60);
endchar;

% interval
beginchar(153,10pt#,10pt#,0); 
  currentpicture := clk;
  fill quartercircle scaled 10pt shifted(5pt,5pt)--(5pt,5pt)--cycle;
  fill quartercircle rotated -30 scaled 10pt shifted(5pt,5pt)
	--(5pt,5pt)--cycle;
endchar;

% Wecker
beginchar(154,14pt#,12pt#,0); 
  fill unitsquare xscaled 14pt yscaled 12pt;
  unfill fullcircle scaled 10pt shifted(7pt,6pt);
  currentpicture := currentpicture + clkb shifted(2pt,1pt);
endchar;

% another clock
beginchar(155,10pt#,10pt#,0);
  pickup pencircle scaled .75linewidth;
  draw fullcircle scaled 10pt shifted (5pt,5pt);
  fill fullcircle scaled 1pt shifted (5pt,5pt);
  draw (5pt,5pt)--(9pt,5pt) rotatedaround ((5pt,5pt),90);
  draw (5pt,5pt)--(7pt,5pt) rotatedaround ((5pt,5pt),60);
endchar;

end.
%%%%%%%%%%%%%%%%%% end of ifclk.gen %%%%%%%%%%%%%%%%%%%%%%%