29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

z0 .. z1 .. z2<br />

z0 {curl 1} .. z1 .. {curl 1} z2<br />

So, a curl of 1 is the default. When set to 1, the begin and/or end points are approached. Given<br />

the following definitions:<br />

u := 1cm ; z1 = (0,0) ; z2 = (2u,4u) ; z3 = (4u,0) ;<br />

def sample (expr p, c) =<br />

draw p withpen pencircle scaled 2.5mm withcolor white ;<br />

draw p withpen pencircle scaled 2.0mm withcolor c ;<br />

enddef ;<br />

We can draw three curved paths.<br />

sample (z1 {curl 0} .. z2 .. {curl 0} z3, .625red) ;<br />

sample (z1 {curl 2} .. z2 .. {curl 2} z3, .625yellow) ;<br />

sample (z1 {curl 1} .. z2 .. {curl 1} z3, .625white) ;<br />

The third (gray) curve is the default situation, so we could have left the curl specifier out of the<br />

expression.<br />

The curly specs have a lower bound of zero and no upper bound. When we use METAPOST maximum<br />

value of infinity instead of 2, we get:<br />

These curves were defined as:<br />

Inflection, tension and curl A few more details<br />

89

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

Saved successfully!

Ooh no, something went wrong!