
Karl is a list of randomly generated nodes by \curvepnodes using parametric points in RPN (I don't know how to use rand in algebraic expression). The number of elements of the list is \Karlnodecount + 1 or plotpoints.
In the documentation, I only see \psnline to connect the list with a straight line segment between two consecutive nodes. To close the path, I invoke \closepath inside \pscustom.
- Unfortunately, the closing line segment does not look smooth.
- Instead of using a straight line segment, I want to use a curved one. Using
\psparametricplot[plotstyle=curve]does help a bit but the closing segment is still problematic.

\documentclass[pstricks]{standalone}
\usepackage{pst-plot,pst-node}
\psset
{
fillstyle=solid,
fillcolor=gray,
linearc=2pt,
}
\begin{document}
\begin{pspicture}(-3,-3)(3,3)
\curvepnodes[plotpoints=40]{0}{360}{/R rand 1001 mod 1000 div 1.5 add def R t cos mul R t sin mul}{Karl}
\pscustom
{
\psnline(0,\Karlnodecount){Karl}
\closepath
}
\end{pspicture}
\end{document}
I also tried using \multido and \curveto but \curveto needs 3 points per invocation (two of them are control points of a bezier curve).
How to draw a closed smooth curve from a list of nodes?


