[pstricks] \psrandom
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Wed May 17 20:11:07 CEST 2017
Am 17.05.2017 um 19:32 schrieb cyrille.piatecki:
> Dear Herbert,
>
> I have to request :
>
> 1) could you add a seed to the command \psrandom ; for instance I need
> to project dots of two colors in the same space the simplest way I have
> found is the following
>
> \begin{pspicture}(0,0)(14,6)
> \psgrid
> \psRandom[dotsize=3pt,linestyle=none,fillstyle=solid,fillcolor=red,randomPoints=100,
>
> dotstyle=o,linecolor=red](1,1)(4.5,5){\pspolygon[,
> linecolor=blue!50,fillstyle=solid,
> fillcolor=blue!20](1,1)(3,1)(4.5,5)(2.5,5)}
> \rput(-8,0){\psRandom[dotsize=3pt,linestyle=none,fillstyle=solid,fillcolor=blue,randomPoints=100,
>
> dotstyle=o,linecolor=blue,linewidth=1.2](8,1)(12.5,5){\pspolygon[origin={8,0},linestyle=none](1,1)(3,1)(4.5,5)(2.5,5)}}
>
> \end{pspicture}
see documentation of pstricks-add:
\documentclass[11pt,a4paper]{report}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}[showgrid](0,0)(14,6)
\psRandom[dotsize=3pt,randomPoints=100,
dotstyle=o,linecolor=red,fillcolor=red](1,1)(4.5,5)%
{\pspolygon[linecolor=blue!50,fillstyle=solid,
fillcolor=blue!20](1,1)(3,1)(4.5,5)(2.5,5)}
\psRandom[dotsize=3pt,fillcolor=blue,
randomPoints=100,randInit=42,
dotstyle=o,linecolor=blue](1,1)(4.5,5)%
{\pspolygon[linestyle=none](1,1)(3,1)(4.5,5)(2.5,5)}
\end{pspicture}
\end{document}
> 2) I need to project both type of points on a surface --- a torus. Could
> the clipping path be a surface ?
>
> Hope it is possible
I never tried it but suppose that it is not possible.
You can show the coordinates and then create a 2d
clipping path.
Herbert
More information about the PSTricks
mailing list