29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pickup pencircle scaled 2pt ;<br />

draw (0,0)--(0,1)--(1,1) scaled 1cm withcolor .625 red ;<br />

draw ((0,0)--(0,1)--(1,1)) scaled 2cm withcolor .625 yellow ;<br />

The scaled operates on the previous expression which in the first case is the point (1,1) and in<br />

the second case the whole path.<br />

pickup pencircle scaled 2pt ;<br />

draw (0,0)--(0,1)--(1,1)--cycle scaled 1cm withcolor .625 red ;<br />

draw ((0,0)--(0,1)--(1,1)--cycle) scaled 2cm withcolor .625 yellow ;<br />

Here the last element in the first case is not the cycle, and the next alternative does not help us<br />

much in discovering what is going on. (Well, at least something is going on, because the result<br />

seems to have some dimensions.)<br />

pickup pencircle scaled 2pt ;<br />

draw (1,1)--cycle scaled 1cm withcolor .625 red ;<br />

draw ((1,1)--cycle) scaled 1cm withcolor .625 yellow ;<br />

The next lines demonstrate that we're dealing with the dark sides of METAPOST, and from that we<br />

may conclude that in case of doubt it's best to add parenthesis when such fuzzy situations threaten<br />

to occur.<br />

pickup pencircle scaled 2pt ;<br />

draw (0,1)--(1,1)--cycle scaled 1cm withcolor .625 red ;<br />

draw ((0,1)--(1,1)--cycle) scaled 1cm withcolor .625 yellow ;<br />

Pitfalls A few more details<br />

107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!