Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. documentclass[pstricks,12pt]{standalone}
  2. usepackage{pst-node}
  3. usepackage{pgfmath}% don't forget this line!
  4. psset{saveNodeCoors}
  5. degrees[13]
  6. begin{document}
  7. makeatletter
  8. begin{pspicture}(-4,-4)(4,4)
  9. foreach i [count=j from 0] in {A,2,3,4,5,6,7,8,9,T,J,Q,K}
  10. {
  11. pnodes(!3 jspace neg pst@angleunit 90 add PtoC){Xi}
  12. qdisk(Xi){2pt}
  13. uput[!N-Xi.y N-Xi.x atan 1 pst@angleunit div](Xi){i}
  14. %uput[(Xi)](Xi){i}
  15. %uput[!psGetNodeCenter{Xi} Xi.y Xi.x atan 1 pst@angleunit div](Xi){i}
  16. }
  17. end{pspicture}
  18. makeatother
  19. end{document}
  20.  
  21. uput[(Xi)](Xi){i}
  22. uput[!psGetNodeCenter{Xi} Xi.y Xi.x atan 1 pst@angleunit div](Xi){i}
  23.  
  24. documentclass[pstricks,border=20pt]{standalone}
  25. usepackage{pst-node,pst-plot}
  26. pstVerb{/XX 3 def /YY 4 def}
  27.  
  28. degrees[12]
  29.  
  30. makeatletter
  31. defobject#1{%
  32. begin{pspicture}[saveNodeCoors,showgrid](0,1)(6,7)
  33. pnode(!XX YY){P}
  34. pscircle(!XX YY){2}
  35. curvepnodes[plotpoints=13]{0}{12}{2 t pst@angleunit PtoC YY add exch XX add exch}{R}
  36. multido{i=0+1}{Rnodecount}
  37. {%
  38. pstVerb
  39. {
  40. /ALPHA {ispace} def
  41. %/ALPHA {N-Ri.y N-P.y sub N-Ri.x N-P.x sub atan 1 pst@angleunit div} def
  42. %/ALPHA {psGetNodeCenter{Ri}psGetNodeCenter{P} Ri.y P.y sub Ri.x P.x sub atan 1 pst@angleunit div} def % IT CANNOT BE USED!
  43. %/BETA {ALPHA 90 1 pst@angleunit div sub} def
  44. /BETA {ispace 90 1 pst@angleunit div sub} def
  45. }%
  46. ifcase#1
  47. psset{linecolor=red}
  48. uput[i]{!BETA}(Ri){$R_{i}$}
  49. or
  50. psset{linecolor=green}
  51. uput[!ALPHA]{!BETA}(Ri){$R_{i}$}
  52. or
  53. psset{linecolor=blue}
  54. uput[(Ri)]{!BETA}(>Ri){$R_{i}$}
  55. fi
  56. psline(!XX YY)(Ri)
  57. }
  58. end{pspicture}}
  59. makeatother
  60.  
  61. begin{document}
  62. foreach x in {0,...,2}{object{x}}
  63. end{document}
  64.  
  65. documentclass[pstricks,margin=12pt]{standalone}
  66. usepackage{pst-node}
  67. usepackage{pgfmath}
  68. degrees[13]
  69. begin{document}
  70. makeatletter
  71. begin{pspicture}(-4,-4)(4,4)
  72. foreach x [count=xi from 0] in {A,2,3,4,5,6,7,8,9,T,J,Q,K}
  73. {
  74. pnodes(!3 xispace neg pst@angleunit 90 add PtoC){Xx}
  75. qdisk(Xx){2pt}
  76. uput[(Xx)](>Xx){x}
  77. }
  78. end{pspicture}
  79. makeatother
  80. end{document}
  81.  
  82. uput[!psGetNodeCenter{Xx} Xx.y Xx.x Atan 1 pst@angleunit div](>Xx){x}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement