Wow.<br><br><div class="gmail_quote">2009/5/27 Herbert Voss <span dir="ltr"><<a href="mailto:Herbert.Voss@fu-berlin.de">Herbert.Voss@fu-berlin.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
David Arnold schrieb:<br>
<div class="im">> Nice solution. I wound up with following. Brute force, but it worked.<br>
<br>
</div>you can calculate anything in PS ...<br>
<br>
Herbert<br>
<div class="im"><br>
\documentclass{article}<br>
\usepackage{pstricks-add}<br>
\begin{document}<br>
<br>
</div>\pstVerb{<br>
/prime? {<br>
/n exch def<br>
n 1 eq {false} { % 1 is not prime<br>
n 2 mod 0 eq {n 2 eq} {<br>
/divide? false def<br>
3 2 n sqrt {<br>
n exch div dup ceiling eq {/divide? true def exit} if<br>
} for<br>
divide? not } ifelse } ifelse<br>
} bind def<br>
}<br>
\makeatletter<br>
<div class="im">\begin{pspicture}(0,0)(10,-10)<br>
\psgrid[subgriddiv=1,gridlabels=0pt]<br>
\multido{\iA=2+1}{99}{%<br>
</div> \rput(! \iA\space 2 sub 10 mod /xVal ED<br>
\iA\space 2 sub 10 div cvi neg /yVal ED<br>
\iA\space prime? not {<br>
gsave xVal yVal \tx@ScreenCoor translate<br>
0 0 moveto 1 -1 \tx@ScreenCoor lineto<br>
0 -1 \tx@ScreenCoor moveto 1 0 \tx@ScreenCoor lineto<br>
1 setlinewidth 1 0 0 setrgbcolor stroke grestore } if<br>
xVal 0.5 add yVal 0.5 sub ){\iA}}<br>
<div><div></div><div class="h5">\end{pspicture}<br>
<br>
\end{document}<br>
<br>
<br>
Herbert<br>
<br>
_______________________________________________<br>
PSTricks mailing list<br>
<a href="mailto:PSTricks@tug.org">PSTricks@tug.org</a><br>
<a href="http://tug.org/mailman/listinfo/pstricks" target="_blank">http://tug.org/mailman/listinfo/pstricks</a><br>
</div></div></blockquote></div><br>