MetaFun - Pragma ADE
MetaFun - Pragma ADE MetaFun - Pragma ADE
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
- Page 39 and 40: test (a) (b) (c) (d) ; test (a,b) (
- Page 41 and 42: If you forget about the colors, the
- Page 43 and 44: linejoin=mitered linecap=butt linej
- Page 45 and 46: 1.15 Text Most dashpatterns can be
- Page 47 and 48: Z13 Z24 Z14 Z1 Z12 Z2 Z21 Z23 Z11 Z
- Page 49 and 50: 3 Because we want to call this macr
- Page 51 and 52: dotlabel.rt ("$Z_{3}$", z3) ; dotla
- Page 53 and 54: A different approach is to use a tw
- Page 55 and 56: The graphic extends beyond the boun
- Page 57 and 58: p := (p shifted (5cm,0)) randomized
- Page 59 and 60: path p ; p := (0,0) -- (2cm,3cm) ;
- Page 61 and 62: path p ; p := (0cm,0cm) -- (4cm,1cm
- Page 63 and 64: Here, the image macro creates an (a
- Page 65 and 66: So, in addition to on to specify a
- Page 67 and 68: Watch how we can pass a point (poin
- Page 69 and 70: 2 A few more details In this chapte
- Page 71 and 72: The second line does just as it say
- Page 73 and 74: fill shape ; draw shape ; filldraw
- Page 75 and 76: 2.3 Units 6 As you can see here, as
- Page 77 and 78: 2.4 Scaling and shifting When we dr
- Page 79 and 80: Especially when a path results from
- Page 81 and 82: points first order curve second ord
- Page 83 and 84: first iteration second iteration th
- Page 85 and 86: and get: We don't even need that mu
- Page 87 and 88: Figure 2.3 Circles with minimized i
- Page 89: The tension specifier can be used t
- Page 93 and 94: z0 .. z1 .. z2 z0 {curl 1} .. z1 ..
- Page 95 and 96: 7 In literature concerning POSTSCRI
- Page 97 and 98: currentpicture := currentpicture sl
- Page 99 and 100: We can achieve this by defining poi
- Page 101 and 102: We're still not there. Like in a pr
- Page 103 and 104: Due to the thicker line width used
- Page 105 and 106: left up down right The previous def
- Page 107 and 108: Here the & glues strings together,
- Page 109 and 110: picture p ; p := "MetaFun" normalin
- Page 111 and 112: pickup pencircle scaled 2pt ; draw
- Page 113 and 114: Because the z--variables are used f
- Page 115 and 116: 3 Embedded graphics In addition to
- Page 117 and 118: \startMPcode fill fullcircle scaled
- Page 119 and 120: \startuniqueMPgraphic{right or wron
- Page 121 and 122: {\externalfigure[mprun:extrafun::my
- Page 123 and 124: \startlinecorrection[blank] \proces
- Page 125 and 126: In order to prevent problems, we ad
- Page 127 and 128: There are a few more low level swit
- Page 129 and 130: When we convert color to gray, we u
- Page 131 and 132: 4 Enhancing the layout One of the m
- Page 133 and 134: 4.2 Overlay variables [offset=3pt,f
- Page 135 and 136: This background demonstrates that a
- Page 137 and 138: As you may know, TEX's ambassador i
- Page 139 and 140: This works as expected: \RotatedTex
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