총을 살까 생각하다가 총을 사면 과녁이 필요하겠다는 생각이 들었습니다. 그래서 과녁 먼저 만들고 총을 사기로 했습니다.
\documentclass{standalone}
\usepackage{tikz}
\usepackage{ifthen}
\usepackage{expl3,xparse}
\ExplSyntaxOn
\clist_set:Nn \l_tmpa_clist
{white,white,black,black,blue,blue,red,red,yellow,yellow}
\clist_set:Nn \l_tmpb_clist
{black,black,white,white,white,white,black,black,black,black,black}
\NewDocumentCommand \setcolors { }
{
\clist_gpop:NN \l_tmpa_clist \bgcolor
\clist_gpop:NN \l_tmpb_clist \fgcolor
}
\NewDocumentCommand \points { m }
{
\int_set:Nn \l_tmpa_int { 11 - #1 }
\textcolor{\fgcolor}{\sffamily\bfseries \int_use:N \l_tmpa_int}
}
\ExplSyntaxOff
\begin{document}
\begin{tikzpicture}
\sffamily
\foreach \i in {10,9,...,1}{
\setcolors
\filldraw[fill=\bgcolor, draw=\fgcolor] (0,0) circle [ radius=\i ];
\ifthenelse{\i=1}{
\node at (180:0) { \points{\i} };
}{
\node at (180:\i-0.5) { \points{\i} };
}
}
\end{tikzpicture}
\end{document}
KTUG 한국 텍 사용자 그룹