Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage[svgnames]{xcolor}
- usepackage{tikz}
- usetikzlibrary{shadings}
- begin{document}
- makeatletter
- pgfdeclareradialshading[tikz@ball]{ball}{pgfqpoint{-10bp}{10bp}}{%
- color(0bp)=(tikz@ball!30!white);
- color(9bp)=(tikz@ball!60!white);
- color(18bp)=(tikz@ball!98!black);
- color(25bp)=(tikz@ball!90!black);
- color(50bp)=(black)}
- makeatother
- tikzset{Etoile/.style args={#1}{%
- circle,shading=ball,ball color=#1,
- inner sep = 0pt,text width = 1.8em,align = center
- }
- }
- newcommand{Etoile}[2][1.8]{%
- draw[very thick,draw=#2] (90:#1)
- -- (210:#1)
- coordinate[pos=0] (A1)
- coordinate[pos=.333] (A7)
- coordinate[pos=.666] (A8)
- -- (-30:#1)
- coordinate[pos=0] (A3)
- coordinate[pos=.333] (A9)
- coordinate[pos=.666] (A10)
- -- cycle
- coordinate[pos=0] (A5)
- coordinate[pos=.333] (A11)
- coordinate[pos=.666] (A12)
- ;
- draw[very thick,draw=#2,rotate=180]
- (90:#1) coordinate (A4)
- -- (210:#1) coordinate (A6)
- -- (-30:#1) coordinate (A2)
- -- cycle ;
- }
- begin{center}
- smallskip
- begin{tikzpicture}
- begin{scope}
- Etoile{violet}
- foreach x [count=i from 1] in {%
- 2,24,-1,0,4,-19,-2,-1,25,20,-3,-5
- } {%
- node[Etoile={violet!20}] at (Ai) {x} ;
- }
- end{scope}
- begin{scope}[shift={(4,0)}]
- Etoile{DarkGreen}
- foreach x [count=i from 1] in {%
- 2,24,-1,0,4,-19,-2,-1,25,20,-3,-5
- } {%
- node[Etoile={DarkGreen!20}] at (Ai) {x} ;
- }
- end{scope}
- end{tikzpicture}
- smallskip
- end{center}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement