MetaFun - Pragma ADE

MetaFun - Pragma ADE MetaFun - Pragma ADE

pragma.ade.com
from pragma.ade.com More from this publisher
29.11.2012 Views

86 Curves finally are made up out of points, and each point has two control points. Since the tension specifier finally becomes a control point, it is not surprising that you may specify two tension values. If we replace the tension in the previous example by .. tension i and 2i .. we get the following graphic: If we swap both values (.. tension 2i and i ..) we get: We mentioned control points. We will now draw a few extreme tensions and show the control points as METAPOST calculates them. sample (z1 .. tension 0.75 .. z2 .. z3, .625red) ; sample (z1 .. tension 2.00 .. z2 .. z3, .625yellow) ; sample (z1 .. z2 .. z3, .625white) ; First we will show the symmetrical tensions. A few more details Inflection, tension and curl

The asymetrical tensions are less prominent. We use the following values: sample (z1 .. tension .75 and 10 .. z2 .. z3, .625red) ; sample (z1 .. tension 10 and .75 .. z2 .. z3, .625yellow) ; sample (z1 .. z2 .. z3, .625white) ; What happens when you use the METAPOST maximum value of infinity instead of 10? Playing with this kind of graphic can be fun, especially when we apply a few tricks. def sample (expr p, c) = draw p withpen pencircle scaled 2.5mm withcolor white ; draw p withpen pencircle scaled 2.0mm withcolor c ; enddef; u := 1cm ; z1 = (0,0) ; z2 = (2u,4u) ; z3 = (4u,0) ; for i=0 step .05 until 1 : Inflection, tension and curl A few more details 87

86<br />

Curves finally are made up out of points, and each point has two control points. Since the tension<br />

specifier finally becomes a control point, it is not surprising that you may specify two tension<br />

values. If we replace the tension in the previous example by<br />

.. tension i and 2i ..<br />

we get the following graphic:<br />

If we swap both values (.. tension 2i and i ..) we get:<br />

We mentioned control points. We will now draw a few extreme tensions and show the control<br />

points as METAPOST calculates them.<br />

sample (z1 .. tension 0.75 .. z2 .. z3, .625red) ;<br />

sample (z1 .. tension 2.00 .. z2 .. z3, .625yellow) ;<br />

sample (z1 .. z2 .. z3, .625white) ;<br />

First we will show the symmetrical tensions.<br />

A few more details Inflection, tension and curl

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

Saved successfully!

Ooh no, something went wrong!