Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[pstricks,12pt]{standalone}
- usepackage{pst-node}
- usepackage{pgfmath}% don't forget this line!
- psset{saveNodeCoors}
- degrees[13]
- begin{document}
- makeatletter
- begin{pspicture}(-4,-4)(4,4)
- foreach i [count=j from 0] in {A,2,3,4,5,6,7,8,9,T,J,Q,K}
- {
- pnodes(!3 jspace neg pst@angleunit 90 add PtoC){Xi}
- qdisk(Xi){2pt}
- uput[!N-Xi.y N-Xi.x atan 1 pst@angleunit div](Xi){i}
- %uput[(Xi)](Xi){i}
- %uput[!psGetNodeCenter{Xi} Xi.y Xi.x atan 1 pst@angleunit div](Xi){i}
- }
- end{pspicture}
- makeatother
- end{document}
- uput[(Xi)](Xi){i}
- uput[!psGetNodeCenter{Xi} Xi.y Xi.x atan 1 pst@angleunit div](Xi){i}
- documentclass[pstricks,border=20pt]{standalone}
- usepackage{pst-node,pst-plot}
- pstVerb{/XX 3 def /YY 4 def}
- degrees[12]
- makeatletter
- defobject#1{%
- begin{pspicture}[saveNodeCoors,showgrid](0,1)(6,7)
- pnode(!XX YY){P}
- pscircle(!XX YY){2}
- curvepnodes[plotpoints=13]{0}{12}{2 t pst@angleunit PtoC YY add exch XX add exch}{R}
- multido{i=0+1}{Rnodecount}
- {%
- pstVerb
- {
- /ALPHA {ispace} def
- %/ALPHA {N-Ri.y N-P.y sub N-Ri.x N-P.x sub atan 1 pst@angleunit div} def
- %/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!
- %/BETA {ALPHA 90 1 pst@angleunit div sub} def
- /BETA {ispace 90 1 pst@angleunit div sub} def
- }%
- ifcase#1
- psset{linecolor=red}
- uput[i]{!BETA}(Ri){$R_{i}$}
- or
- psset{linecolor=green}
- uput[!ALPHA]{!BETA}(Ri){$R_{i}$}
- or
- psset{linecolor=blue}
- uput[(Ri)]{!BETA}(>Ri){$R_{i}$}
- fi
- psline(!XX YY)(Ri)
- }
- end{pspicture}}
- makeatother
- begin{document}
- foreach x in {0,...,2}{object{x}}
- end{document}
- documentclass[pstricks,margin=12pt]{standalone}
- usepackage{pst-node}
- usepackage{pgfmath}
- degrees[13]
- begin{document}
- makeatletter
- begin{pspicture}(-4,-4)(4,4)
- foreach x [count=xi from 0] in {A,2,3,4,5,6,7,8,9,T,J,Q,K}
- {
- pnodes(!3 xispace neg pst@angleunit 90 add PtoC){Xx}
- qdisk(Xx){2pt}
- uput[(Xx)](>Xx){x}
- }
- end{pspicture}
- makeatother
- end{document}
- uput[!psGetNodeCenter{Xx} Xx.y Xx.x Atan 1 pst@angleunit div](>Xx){x}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement