Some experiments with latex.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

44 lines
1.0 KiB

\documentclass[tikz]{standalone}
\usepackage{datetime}
\begin{document}
\def\hours{\number\currenthour}
\def\minutes{\number\currentminute}
\def\seconds{\number\currentsecond}
\begin{tikzpicture}
%\node {\Huge \number\currenthour};
\draw[line width=0.2cm] (0,0) circle (5.1cm);
% Minutes
\foreach \i in {1,2,...,60}{
\def\angle{\i*6}
\draw[thin] (\angle:5cm) -- (\angle:4.9cm);
}
% 5 minutes
\foreach \i in {1,2,...,12}{
\def\angle{\i*-30+90}
\draw[thin] (\angle:5cm) -- (\angle:4.5cm);
\node at (\angle:4cm) {\Huge\i};
};
% Hour hand
\def\angle{\hours*-30 + \minutes*-0.5 + \seconds*-0.008333 +90}
\draw[line width=0.1cm] (0,0) -- (\angle:2.5cm);
% Minute hand
\def\angle{\minutes*-6 + \seconds*-0.1 +90}
\draw[line width=0.05cm] (0,0) -- (\angle:4cm);
% Second hand
\def\angle{\seconds*-6+90}
\draw[very thick,color=red] (\angle:-1cm) -- (\angle:4.5cm);
\draw[line width=0.1cm,color=red] (\angle:-1cm) -- (\angle:-0.25cm);
% Center dot
\draw[fill=black] (0,0) circle (0.1cm);
\end{tikzpicture}
\end{document}