[metapost] how to draw the water flow

Hans Hagen pragma at wxs.nl
Thu Jun 11 10:24:40 CEST 2009


hjw0848 wrote:
> Hi,
> 
> I'm new to the Metapost.  I want to draw some figures whick looks like the water-flow (see the attachment).  Dose anyone show me how to draw them?  Thank you very much. 
numeric unit ; unit := mm ;

pickup pencircle scaled 2unit ; ahlength := 6unit ;

picture p ; p := image (
     drawarrow reverse fullcircle rotated - 5 scaled 50unit ;
     drawarrow reverse fullcircle rotated -10 scaled 30unit ;
) shifted ( -45unit, 0unit) ;

for i=0 step 90 until 360 : draw p rotated i ; endfor ;

currentpicture := currentpicture shifted - center currentpicture ;

p := currentpicture ; p := image (
     draw llcorner p -- center p ;
     drawarrow llcorner p -- 0.875[llcorner p,center p] ;
) ;

for i=0 step 90 until 360 : draw p rotated i ; endfor ;

clip currentpicture to boundingbox (fullcircle scaled 80unit) ;

draw currentpicture withcolor .6blue ;




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example-1.pdf
Type: application/pdf
Size: 4396 bytes
Desc: not available
URL: <http://tug.org/pipermail/metapost/attachments/20090611/c37302b7/attachment.pdf>


More information about the metapost mailing list