118 lines
3.2 KiB
TeX
118 lines
3.2 KiB
TeX
|
\documentclass[a5paper,12pt]{article}
|
||
|
\usepackage{myXsim}
|
||
|
|
||
|
\date{Mars 2018}
|
||
|
\title{Lire l'heure}
|
||
|
\tribe{Sixième}
|
||
|
|
||
|
\pagestyle{empty}
|
||
|
|
||
|
\RequirePackage{contour}
|
||
|
\newcommand{\clockA}{%
|
||
|
% colors
|
||
|
\colorlet{minutes color}{blue!50!cyan!70!black}
|
||
|
\colorlet{bg hours 0}{yellow}
|
||
|
\colorlet{bg hours 1}{red!50}
|
||
|
\colorlet{hours color}{red!80!black}
|
||
|
% styles
|
||
|
\tikzset{
|
||
|
minutes/.style={circle,inner sep=0,text width=5mm,align=center,font=\bfseries},
|
||
|
minutes 0/.style={fill=minutes color,text=white,minutes},
|
||
|
minutes 1/.style={text=minutes color,fill=white,minutes},
|
||
|
minutes font/.style={font=\normalsize},
|
||
|
hours/.style={font=\fontsize{60}{66}\selectfont\bfseries,text=hours color,align=center},
|
||
|
mini hours font/.style={font=\fontsize{40}{46}\selectfont\bfseries},
|
||
|
}
|
||
|
% radii
|
||
|
\def\bigradius{80mm}
|
||
|
\def\minuteradius{75mm}
|
||
|
\def\hourradius{60mm}
|
||
|
\def\minihourminradius{25mm}
|
||
|
\def\minihourmaxradius{45mm}
|
||
|
\pgfmathsetmacro\minihourradius{(\minihourmaxradius + \minihourminradius)*.5}
|
||
|
\def\hourwidth{2mm}
|
||
|
\def\minutewidth{1mm}
|
||
|
|
||
|
% big circle
|
||
|
\filldraw [fill=white,draw=minutes color] (0,0) circle (\bigradius);
|
||
|
|
||
|
% minutes marks
|
||
|
\foreach \angle[count=\c from 0,evaluate={\c as \hourmark using notequal(int(mod(\c,5)),0)}]
|
||
|
in {0,6,...,354}{ \path (-\angle:\minuteradius) node[minutes \hourmark]{\c}; }
|
||
|
|
||
|
% hours marks
|
||
|
\foreach \angle[count=\c from 1,evaluate={\c as \col using int(mod(\c,2))}] in {30,60,...,360}{
|
||
|
|
||
|
\path (-\angle:\hourradius) node[hours]{\c};
|
||
|
|
||
|
\path[fill=bg hours \col]
|
||
|
(-\angle:\minihourminradius) -- (-\angle:\minihourmaxradius)
|
||
|
arc(-\angle:-\angle-30:\minihourmaxradius) -- (-\angle-30:\minihourminradius)
|
||
|
arc(-\angle-30:-\angle:\minihourminradius) -- cycle;
|
||
|
|
||
|
\path (-\angle-15:\minihourradius pt) node[mini hours font]{\textcolor{white}{\contour{hours color}{\c}}};
|
||
|
}
|
||
|
|
||
|
\path [fill=black] (0,0) circle (3mm);
|
||
|
\path [fill=red] (0,0) circle (1.5mm);
|
||
|
}
|
||
|
|
||
|
\newcommand{\clockB}{%
|
||
|
\draw (0,0) circle (2cm);
|
||
|
\foreach \angle / \label in
|
||
|
{0/3, 30/2, 60/1, 90/12, 120/11, 150/10, 180/9,
|
||
|
210/8, 240/7, 270/6, 300/5, 330/4}
|
||
|
{
|
||
|
\draw (\angle:1.8cm) -- (\angle:2cm);
|
||
|
\draw (\angle:1.4cm) node{\textsf{\label}};
|
||
|
}
|
||
|
\foreach \angle[count=\c from 0] in {0,6,...,354}
|
||
|
{
|
||
|
\draw (\angle:1.9cm) -- (\angle:2cm);
|
||
|
}
|
||
|
\path [fill=black] (0,0) circle (3pt);
|
||
|
\path [fill=red] (0,0) circle (1.5pt);
|
||
|
}
|
||
|
|
||
|
\begin{document}
|
||
|
|
||
|
~
|
||
|
\vspace{3cm}
|
||
|
|
||
|
\hspace{5cm}
|
||
|
\begin{tikzpicture}[cap=round, rotate=90, transform canvas={scale=0.5}]
|
||
|
\clockA
|
||
|
\end{tikzpicture}
|
||
|
|
||
|
\vspace{6cm}
|
||
|
\hspace{2cm}
|
||
|
\begin{tikzpicture}[cap=round, rotate=90, transform canvas={scale=0.3}]
|
||
|
\clockA
|
||
|
\end{tikzpicture}
|
||
|
\hspace{6cm}
|
||
|
\begin{tikzpicture}[cap=round, rotate=90, transform canvas={scale=0.3}]
|
||
|
\clockA
|
||
|
\end{tikzpicture}
|
||
|
|
||
|
\vspace{5cm}
|
||
|
\hspace{1cm}
|
||
|
\begin{tikzpicture}[cap=round, transform canvas={scale=1}]
|
||
|
\clockB
|
||
|
\end{tikzpicture}
|
||
|
\hspace{4cm}
|
||
|
\begin{tikzpicture}[cap=round, transform canvas={scale=1}]
|
||
|
\clockB
|
||
|
\end{tikzpicture}
|
||
|
\hspace{4cm}
|
||
|
\begin{tikzpicture}[cap=round, transform canvas={scale=1}]
|
||
|
\clockB
|
||
|
\end{tikzpicture}
|
||
|
|
||
|
\end{document}
|
||
|
|
||
|
%%% Local Variables:
|
||
|
%%% mode: latex
|
||
|
%%% TeX-master: "master"
|
||
|
%%% End:
|
||
|
|