[pstricks] filling non-simply connected regions

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Fri Jan 2 21:39:35 CET 2009


Thanks to both Herbert and Juergen.  I see now that some of my  
confusion came from being a bit sloppy with details.  It seems the  
best way to create the picture I want is something like

\begin{pspicture}(-3.5,-3)(3.5,3.5)
\pscustom[fillstyle=solid, fillcolor=lightgray,
  linewidth=2pt]{
  	\psarc(0,0){2}{0}{360}
	\psarcn[liftpen=2](0,0){1}{360}{0}
  }
%
		\psarc[linewidth=2pt, arrows=->, arrowscale=2](0,0){2}{20}{100}
		\psarc[linewidth=2pt, arrows=->, arrowscale=2](0,0){2}{100}{180}
		\psarc[linewidth=2pt, arrows=->, arrowscale=2](0,0){2}{180}{260}
		\psarc[linewidth=2pt, arrows=->, arrowscale=2](0,0){2}{260}{340}

		\psarcn[linewidth=2pt, arrows=->, arrowscale=2](0,0){1}{340}{260}
		\psarcn[linewidth=2pt, arrows=->, arrowscale=2](0,0){1}{260}{180}
		\psarcn[linewidth=2pt, arrows=->, arrowscale=2](0,0){1}{180}{100}
		\psarcn[linewidth=2pt, arrows=->, arrowscale=2](0,0){1}{100}{20}
\end{pspicture}

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/

On Jan 2, 2009, at 15:15, Herbert Voss wrote:

> Zbigniew Nitecki schrieb:
>> I wanted to draw an annulus, filled in light gray, with arrows  
>> along the edges.
>> The code below gives more-or-less what I want (although I am not  
>> sure how to get
>> rid of the
>> gaps in the circles):
>
>> But I wonder if there is a way of filling the annulus using
>> a single \pscustom command.  The following code gives the second  
>> picture below:
>> the main problem is the small bit of filled-in area inside the  
>> "hole", another
>> is that the lines print thin, and the arrows are cut in half.   
>> (Also, I needed
>> to leave off the last arrow because otherwise I got an even worse  
>> picture):
>
> the arrows are not part of the path, the reason why
> they are not seen in this case.
>
> \begin{pspicture}(-3.5,-3)(3.5,3.5)
> \pscustom[fillstyle=solid, fillcolor=lightgray,
>  linewidth=2pt, arrows=->, arrowscale=2]{
> \psarc[](0,0){2}{20}{100}
> \psarc(0,0){2}{100}{180}
> \psarc(0,0){2}{180}{260}
> \psarc(0,0){2}{260}{340}
> \psarc[arrows=-](0,0){2}{340}{20}
> %
> \psarcn[liftpen=2](0,0){1}{340}{260}
> \psarcn(0,0){1}{260}{180}
> \psarcn(0,0){1}{180}{100}
> \psarcn(0,0){1}{100}{20}
> \psarcn[arrows=-](0,0){1}{20}{260}
> \psarc[arrows=-,linestyle=none](0,0){1}{260}{340}}
> \end{pspicture}
>
> Herbert
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090102/f222472d/attachment.html 


More information about the PSTricks mailing list