Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. documentclass{article}
  2. usepackage[svgnames]{xcolor}
  3. usepackage{tikz}
  4.  
  5.  
  6. usetikzlibrary{shadings}
  7.  
  8. begin{document}
  9.  
  10.  
  11. makeatletter
  12. pgfdeclareradialshading[tikz@ball]{ball}{pgfqpoint{-10bp}{10bp}}{%
  13. color(0bp)=(tikz@ball!30!white);
  14. color(9bp)=(tikz@ball!60!white);
  15. color(18bp)=(tikz@ball!98!black);
  16. color(25bp)=(tikz@ball!90!black);
  17. color(50bp)=(black)}
  18. makeatother
  19.  
  20. tikzset{Etoile/.style args={#1}{%
  21. circle,shading=ball,ball color=#1,
  22. inner sep = 0pt,text width = 1.8em,align = center
  23. }
  24. }
  25.  
  26. newcommand{Etoile}[2][1.8]{%
  27. draw[very thick,draw=#2] (90:#1)
  28. -- (210:#1)
  29. coordinate[pos=0] (A1)
  30. coordinate[pos=.333] (A7)
  31. coordinate[pos=.666] (A8)
  32. -- (-30:#1)
  33. coordinate[pos=0] (A3)
  34. coordinate[pos=.333] (A9)
  35. coordinate[pos=.666] (A10)
  36. -- cycle
  37. coordinate[pos=0] (A5)
  38. coordinate[pos=.333] (A11)
  39. coordinate[pos=.666] (A12)
  40. ;
  41.  
  42. draw[very thick,draw=#2,rotate=180]
  43. (90:#1) coordinate (A4)
  44. -- (210:#1) coordinate (A6)
  45. -- (-30:#1) coordinate (A2)
  46. -- cycle ;
  47.  
  48. }
  49.  
  50.  
  51. begin{center}
  52. smallskip
  53. begin{tikzpicture}
  54.  
  55. begin{scope}
  56. Etoile{violet}
  57. foreach x [count=i from 1] in {%
  58. 2,24,-1,0,4,-19,-2,-1,25,20,-3,-5
  59. } {%
  60. node[Etoile={violet!20}] at (Ai) {x} ;
  61. }
  62. end{scope}
  63.  
  64. begin{scope}[shift={(4,0)}]
  65. Etoile{DarkGreen}
  66. foreach x [count=i from 1] in {%
  67. 2,24,-1,0,4,-19,-2,-1,25,20,-3,-5
  68. } {%
  69. node[Etoile={DarkGreen!20}] at (Ai) {x} ;
  70. }
  71. end{scope}
  72.  
  73. end{tikzpicture}
  74.  
  75.  
  76. smallskip
  77. end{center}
  78.  
  79. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement