[pstricks] Sunflower

Herbert Voss Herbert.Voss at fu-berlin.de
Sun Nov 18 19:30:47 CET 2007


Poul Riis schrieb:

> Yet, I would like to understand what's wrong with my example.
> Strangely enough, the pdf-converted version is better than the ps-version.

depends to the viewer ...
I do not really understand what you mean by "not centered",
but maybe this helps:

\def\psSunflower at i#1#2{%
    \begin at SpecialObj%
    \addto at pscode{
     /rhomb {
      newpath
      0 -3 moveto
      6 0 lineto
      0 3 lineto
      -6 0 lineto
      closepath gsave fill grestore } def
     /radius #2 def
     0 0 radius 0 360 arc
%    gsave 0 1 0 setrgbcolor fill grestore
     /phig 3 5 sqrt sub 180 mul def
     0 1 #1 1 sub {
       /jj ED
       /actradius jj #1 div sqrt radius mul def
       /actang phig jj mul def
       /xx actang cos actradius mul def
       /yy actang sin actradius mul def
       actang rotate
       actradius 0 translate rhomb
       actradius neg 0 translate
       actang neg rotate
       xx yy 1 0 360 arc
       gsave 1 1 0.7 setrgbcolor fill grestore
      } for
    }%
    \end at SpecialObj}


Herbert



More information about the PSTricks mailing list