[pstricks] The outside of a closed curve
Michael Sharpe
mchl.sharpe at gmail.com
Sun Dec 6 22:56:57 CET 2009
On Dec 6, 2009, at 1:38 PM, Jon Joseph wrote:
> I have the following code
>
> \begin{pspicture}(0,0)(5,4)
> \multido{\rx=1.45+0.45}{7}
> {
> \psline(\rx,0)(\rx,4)
> }
> \psccurve[showpoints=false, linewidth=2pt](1,2)(1.4,2.6)(2,2.95)(2.8,3.55)(3.4,3.75)(4,3.6)(4.5,3)(4.6,2.6)(4.45,2.0)(4,1.35)(3.3,1.0)(2.6,0.9)(2.0,1.1)(1.4,1.4)
> \end{pspicture}
>
> And I would the lines to be clipped outside the curve. The psccurve* option of course fills the inside of the curve. Is there a method to "fill" outside the curve out to the edges of the picture so I don't have to calculate where the lines intersect the curve? (i.e. I only want the vertical lines to be visible inside the curve). Thanks, Jon.
\begin{pspicture}(0,0)(5,4)
\psclip{\psccurve[showpoints=false, linewidth=2pt](1,2)(1.4,2.6)(2,2.95)(2.8,3.55)(3.4,3.75)(4,3.6)(4.5,3)(4.6,2.6)(4.45,2.0)(4,1.35)(3.3,1.0)(2.6,0.9)(2.0,1.1)(1.4,1.4)
} \multido{\rx=1.45+0.45}{7}
{
\psline(\rx,0)(\rx,4)
}\endpsclip
\psccurve[showpoints=false, linewidth=2pt](1,2)(1.4,2.6)(2,2.95)(2.8,3.55)(3.4,3.75)(4,3.6)(4.5,3)(4.6,2.6)(4.45,2.0)(4,1.35)(3.3,1.0)(2.6,0.9)(2.0,1.1)(1.4,1.4)
More information about the PSTricks
mailing list