summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-16 22:46:29 +0000
committerKarl Berry <karl@freefriends.org>2012-04-16 22:46:29 +0000
commit76e16dc8afcc19ccbb1cc66be529411dfe41ce6e (patch)
tree5e79f4db9f36c7e53887264b98bf3b33d41daa5f /Master/texmf-dist/doc/metapost/featpost/example
parent9d51929278483d4f1cbfe10dee38085f3ca4811c (diff)
featpost (16apr12)
git-svn-id: svn://tug.org/texlive/trunk@25991 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/38.mp62
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/CAT.mp45
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/DebianSwirlsmallEdited.mp55
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/EBcrossed.mp57
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/LED.mp76
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/acoplanv.mp81
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/allfigs.mp68
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/allgreatideas.mp166
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/avalzero.mp85
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/badshreeyantra.mp73
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp76
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp28
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/buildcyclebug.mp203
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/canschemes.mp159
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/cap29res.mp380
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/caratk3edit.mp339
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp53
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/cellevolve.mp72
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/cinemwork.mp307
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/convergingspirals.mp361
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/cruztuga.mp37
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/decorstatement.mp29
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/defaultcmr.mp32
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/derivondatriang.mp82
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/diameters.mp36
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/directfonts.mp20
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/durgayantra.mp174
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/electrospiral.mp50
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ellipticextrusionpress.mp31
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ellipticproperties.mp45
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/elliptictable.mp83
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ellipticthing.mp47
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/equilatrianglelines.mp40
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/esteveslogo.mp52
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/experimental2Dsetup.mp175
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/f1aula03.mp104
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/f1aula05.mp98
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/fis3prex7.mp47
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/gnupost.mp110
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/goldenellipse.mp57
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/graphs.mp65
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/hap.mp137
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/heatfromroom.mp90
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/hexacylon.mp23
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/iamsorrykarl.mp94
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/jd44.mp172
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/kopptrammel.mp39
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/lamarquejaune.mp100
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/latexboxes.mp25
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/lawofcosines.mp167
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ledlogo.mp202
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/loglogpaper.mp47
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/logofontest.mp35
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/manjusha.mp76
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/mce-lng.mp89
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/micromu.mp34
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/milimetricpaper.mp43
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/mpfields.mp160
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/muslimpattern.mp73
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/naoestacionar.mp39
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/newcommunism.mp237
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/nosimples.mp61
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/nosuspension.mp131
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/nulldefectanglexample.mp134
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/onebigword.mp17
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/optest.mp51
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/pifpaf.mp56
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/pixelgrid.mp45
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/plaintangency.mp106
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/potenciadecicloeliptico.mp46
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/probtodooterr.mp75
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/profaux.mp70
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/project.mp75
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/qap.mp117
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/reeditedgoodquestionmark.mp102
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/roadincline.mp67
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/rodarolaremplaninc.mp52
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/rothexagrid.mp45
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/sap.mp179
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/sincityredesigned.mp264
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/some2Dvecs.mp77
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/statement.mp51
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/statethreelines.mp21
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/strength1defect.mp85
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/symbol.mp97
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/telemira.mp22
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tete.mp24
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/theHURD.mp102
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/thunderproblem.mp37
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tiposdetrans.mp71
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tiposdetransb.mp57
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/tiposdetranst.mp43
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/trianglecenterofmass.mp43
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/trigonometry.mp89
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/twoplustwo.mp59
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ubhtransients.mp139
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ultraeye.mp16
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/ultraimprovertex.mp26
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/wwfpmp.mp154
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/xcmplaca2buraquads.mp69
100 files changed, 8989 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/38.mp b/Master/texmf-dist/doc/metapost/featpost/example/38.mp
new file mode 100644
index 00000000000..ff5e4e6c518
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/38.mp
@@ -0,0 +1,62 @@
+
+
+prologues:=2;
+
+
+def rp(expr p, r)=
+ (p + (r * (.5+uniformdeviate 0.5),0) rotated (uniformdeviate 360))
+enddef;
+
+vardef eight(expr r) =
+ save a;
+ pair a;
+ a = rp(origin, r);
+ (a{dir 15}
+ .. rp((0.6,0.5),r){up}
+ .. rp((0,1),r){left}
+ .. rp((-0.6,0.5),r){down}
+ .. rp(origin,r){dir -15}
+ .. rp((0.6,-0.6),r){down}
+ .. rp((0,-1.2),r){left}
+ .. rp((-0.6,-0.6),r){up}
+ .. a{dir 15})
+enddef;
+
+
+vardef three(expr r) =
+ save a;
+ path a;
+ a = eight(r);
+ ((reverse (subpath (0,2.35) of a)) -- (subpath (4,6.5) of a))
+enddef;
+
+def scaledto(expr p, wd)=
+ p shifted (-center p) scaled (wd / (xpart (urcorner p - llcorner p)))
+ shifted (105mm,148.5mm)
+enddef;
+
+
+
+
+beginfig(1);
+
+color c;
+numeric n,e;
+
+pickup pencircle scaled 1pt;
+n := 96;
+for i=n step -2 until 0:
+ e := 1 / (i+1);
+ pickup pencircle scaled (e * pt);
+ for j=1 upto (i+1):
+ c := (i/n)[.75blue,white];
+ draw eight(i/n) scaled 100 shifted (140,0) withcolor c;
+ draw three(i/n) scaled 100 shifted (0,0) withcolor c;
+ endfor;
+endfor;
+
+currentpicture := scaledto(currentpicture, 24cm);
+
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/CAT.mp b/Master/texmf-dist/doc/metapost/featpost/example/CAT.mp
new file mode 100644
index 00000000000..2afe9da095d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/CAT.mp
@@ -0,0 +1,45 @@
+beginfig(1);
+ path pat[];
+ numeric i, a, sidel;
+ sidel = 2cm;
+ pickup pencircle scaled 3pt;
+ pair pa, pb, pc, pd;
+ for i=4 upto 10:
+ a := 360/i;
+ pa := origin+(i-4)*right*1.5*sidel;
+ pb := pa+right*sidel;
+ pd := pa+dir(a)*sidel;
+ pc := pb+dir(a)*sidel;
+ pat[i] = pa--pb--pc--pd--cycle;
+ endfor;
+ z0 = (0,2.5*sidel);
+ z1 = z0+2*right*sidel;
+ z2 = z0+2*dir(60)*sidel;
+ pat0 = z0--z1--z2--cycle;
+ z3 = z1+1.5*right*sidel;
+ z4 = z3+right*sidel;
+ z5 = z4+dir(60)*sidel;
+ z6 = z5+dir(120)*sidel;
+ z8 = z3+dir(120)*sidel;
+ z7 = z8+dir(60)*sidel;
+ pat1 = z3--z4--z5--z6--z7--z8--cycle;
+ z9 = z4+1.5*right*sidel;
+ z10= z9+right*sidel;
+ z11= z10+dir(60)*sidel;
+ z12= z11+dir(120)*sidel;
+ z14= z9+dir(60)*sidel;
+ z13= z14+dir(120)*sidel;
+ pat2 = z9--z10--z11--z12--z13--z14--cycle;
+ z15= z10+1.5*right*sidel;
+ z16= z15+right*sidel;
+ z17= z16+dir(60)*sidel;
+ z18= z15+2*dir(60)*sidel;
+ pat3 = z15--z16--z17--z18--cycle;
+ background := 0.85white;
+ for i = 0 upto 10:
+ unfill pat[i];
+ draw pat[i];
+ endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/DebianSwirlsmallEdited.mp b/Master/texmf-dist/doc/metapost/featpost/example/DebianSwirlsmallEdited.mp
new file mode 100644
index 00000000000..9f239a5478c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/DebianSwirlsmallEdited.mp
@@ -0,0 +1,55 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2003 Wolfgang Glunz <wglunz@pstoedit.net>
+
+% Edited by L. Nobre G.
+% DebianSwirlsmallEdited.mp
+
+beginfig(1);
+ color cristhine;
+ path pri, seg;
+ cristhine = (0.7,0.2,0.1);
+ pri = (190.745,542.894)
+ ..controls (-21.9817,469.739) and (-35.7288,149.215)..(169.473,46.9001)
+ ..controls (203.509,29.9294) and (261.751,14.9561)..(241.091,28.488)
+ ..controls (235.013,32.4688) and (225.136,35.4543)..(218.045,35.4543)
+ ..controls (210.954,35.4543) and (205.636,38.3416)..(205.636,42.1907)
+ ..controls (205.636,45.9331) and (199.964,50.7207)..(192.873,52.9626)
+ ..controls (157.73,64.074) and (97.0095,141.109)..(88.1819,185.782)
+ ..controls (86.8718,192.412) and (79.418,204.218)..(71.6182,212.018)
+ ..controls (30.533,253.103) and (52.4727,390.784)..(107.073,434.51)
+ ..controls (120.545,445.3) and (134.623,456.592)..(138.982,460.106)
+ ..controls (249.847,549.474) and (392.385,487.146)..(396.601,347.455)
+ ..controls (399.211,260.945) and (310.803,199.291)..(243.218,240.488)
+ ..controls (169.171,285.624) and (192.873,397.589)..(275.836,394.576)
+ ..controls (292.854,393.958) and (301.647,396.098)..(297.818,399.927)
+ ..controls (277.624,420.121) and (219.781,399.927)..(198.293,365.182)
+ ..controls (176.806,330.436) and (180.511,267.381)..(204.927,252.293)
+ ..controls (209.182,249.664) and (210.954,244.411)..(208.827,240.736)
+ ..controls (206.643,236.964) and (208.827,234.78)..(213.791,235.773)
+ ..controls (218.754,236.765) and (222.811,233.645)..(223.009,228.682)
+ ..controls (223.205,223.792) and (232.582,215.05)..(243.927,209.182)
+ ..controls (257.4,202.213) and (261.923,201.602)..(257.045,207.409)
+ ..controls (251.161,214.414) and (258.818,216.273)..(293.563,216.273)
+ ..controls (331.854,216.273) and (428.556,261.651)..(392.836,262.857)
+ ..controls (389.247,262.978) and (391.418,266.928)..(397.8,271.885)
+ ..controls (425.167,293.14) and (438.433,372.273)..(421.643,414.109)
+ ..controls (417.375,424.745) and (418.774,426.598)..(428.291,422.907)
+ ..controls (445.229,416.34) and (442.224,426.873)..(416.436,464.455)
+ ..controls (386.156,508.584) and (312.709,544.39)..(259.527,540.949)
+ ..controls (248.182,540.215) and (233.878,542.32)..(227.618,545.646)
+ ..controls (221,549.161) and (205.636,548.015)..(190.745,542.894)
+ --cycle;
+ seg = (274.773,200.673)
+ ..controls (279.736,198.687) and (287.536,198.687)..(292.5,200.673)
+ ..controls (297.464,202.658) and (293.563,204.218)..(283.636,204.218)
+ ..controls (273.709,204.218) and (269.809,202.658)..(274.773,200.673)
+ --cycle;
+ drawoptions( withcolor cristhine );
+ fill pri;
+ fill seg;
+ drawoptions( withpen pencircle scaled 1mm );
+ draw pri;
+ draw seg;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/EBcrossed.mp b/Master/texmf-dist/doc/metapost/featpost/example/EBcrossed.mp
new file mode 100644
index 00000000000..2bd1a0b0ded
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/EBcrossed.mp
@@ -0,0 +1,57 @@
+% Crossed Electric and Magnetic fields
+% L. Nobre G.
+% 2002
+
+% defaultfont := "putr8r";
+% defaultscale := 6.5;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric inc, ind, tep, larg, altr, lene;
+ path efld, velv, arch, auxi;
+ picture bfld;
+ pair vpos, cent;
+ tep = 1cm;
+ larg = 4;
+ altr = 3;
+ lene = larg*tep;
+ bfld = btex $\times$ etex;
+% bfld = thelabel("x",origin);
+ bfld := bfld shifted -(center bfld);
+ efld = origin--(lene,0);
+ for ind = 0 upto altr:
+ drawarrow efld shifted (0,ind*tep);
+ endfor;
+ auxi = efld shifted (0,tep);
+ for ind = 1 upto altr:
+ for inc = 1 step 2 until 2*larg:
+ label( bfld, (0.5*inc*tep,(ind-0.5)*tep) );
+ endfor;
+ endfor;
+ vpos = (tep,0.5tep);
+ label.lft( btex $\vec{B}$ etex, (0.5tep,(altr-0.5)*tep) );
+ label.lft( btex $\vec{E}$ etex, origin );
+ label.top( btex $\vec{v}$ etex, vpos );
+% label.lft( "B", (0.5tep,(altr-0.5)*tep) );
+% label.lft( "E", origin );
+% label.top( "v", vpos );
+ velv = vpos--((larg-1)*tep,(altr-0.5)*tep);
+ drawarrow velv;
+ cent = auxi intersectionpoint velv;
+ arch = ((fullcircle scaled (altr*tep*0.87)) shifted cent) cutafter velv;
+ draw arch;
+ label.rt( btex $\theta$ etex, point 0.5*length arch of arch );
+% label.rt( "T", point 0.5*length arch of arch );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/LED.mp b/Master/texmf-dist/doc/metapost/featpost/example/LED.mp
new file mode 100644
index 00000000000..ef934bf3f12
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/LED.mp
@@ -0,0 +1,76 @@
+% LED.mp
+% L. Nobre G.
+% 2009
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, hthick, vthick, lspace, espace, dspace, h, lbase, dbase;
+ numeric dinray, halfh, tp, scal, marg, dcorrection;
+ u = 1.5mm;
+ hthick = 20u;
+ vthick = 10u;
+% lspace = 15u;
+ lspace = 8u;
+ espace = 8u;
+ dspace = 8u;
+ h = 3*vthick+2*espace;
+% lbase = 38u;
+ lbase = 45u;
+% dbase = 16u;
+ dbase = 19u;
+ halfh = h/2;
+ dinray = halfh-vthick;
+ tp = 1.15;
+ dcorrection = 1.3u;
+ scal = (h-vthick-espace)/h;
+ marg = 4u;
+ z200 = (marg,vthick+espace-marg);
+ path pathl, pathe, pathd, pathu;
+ z0 = (0,0);
+ z1 = (lbase,0);
+ z2 = (lbase,vthick);
+ z3 = (hthick,vthick);
+ z4 = (hthick,h);
+ z5 = (0,h);
+ pathl = z0--z1--z2--z3--z4--z5--cycle;
+ z6 = (lbase+lspace,0);
+ z7 = z6 + (h,0);
+ z8 = z7 + (0,vthick);
+ z9 = z6 + (vthick,vthick);
+ z10= z9 + (0,espace);
+ z11= z10+ (vthick,0);
+ z12= z10+ (vthick,vthick);
+ z13= z6 + (0,2*vthick+espace);
+ pathe = z6--z7--z8--z9--z10--z11--z12--z13--cycle;
+ z14= z7 + (dspace,0);
+ z15= z14+ (dbase,0);
+ z16= z15+ (halfh,halfh+dcorrection);
+ z17= z15+ (dcorrection,h);
+ z18= z14+ (0,h);
+ z19= z18- (0,vthick);
+ z20= z19+ (dbase,0);
+ z21= z20+ (dinray,-dinray);
+ z22= z15+ (0,vthick);
+ z23= z14+ (0,vthick);
+ pathd = z14---z15..z16..tension tp..z17---z18--z19---z20..tension tp..z21..z22---z23--cycle;
+ z24= z6 + (0,h);
+ z25= z24+ (h,0);
+ z26= z25- (0,vthick);
+ z27= z24- (0,vthick);
+ pathu = z24--z25--z26--z27--cycle;
+% fill pathl withcolor 0.78red;
+% fill pathe;
+% fill pathd;
+% fill pathu;
+% dotlabels( 14,15,16,17,18,19,20,21,22,23 );
+ z100 = (0,-2h);
+ drawoptions( shifted z100 );
+ fill pathl withcolor 0.78red;
+ fill pathe shifted (-z6) scaled scal shifted z200;
+ fill pathd shifted (-z6) scaled scal shifted z200;
+ fill pathu shifted (-z6) scaled scal shifted z200;
+endfig;
+
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/acoplanv.mp b/Master/texmf-dist/doc/metapost/featpost/example/acoplanv.mp
new file mode 100644
index 00000000000..d29cc156826
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/acoplanv.mp
@@ -0,0 +1,81 @@
+% acoplanv.mp
+% L. Nobre G.
+% 2003
+
+verbatimtex
+\documentclass{article}
+\usepackage{mathpazo}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric overallang, torsionang, u, curvfact;
+ u = 1mm;
+ overallang = -22;
+ torsionang = 40;
+ curvfact = 0.6;
+ numeric armsize, roundray, direcstep;
+ armsize = 25u;
+ roundray = 10u;
+ direcstep = 2.8u;
+ pair restaxedir, restdir, torsaxedir, torsdir;
+ restaxedir = dir( 90+overallang );
+ restdir = dir( overallang );
+ torsaxedir = dir( 90+overallang+torsionang );
+ torsdir = dir( overallang+torsionang );
+ numeric leng;
+ pair midpos;
+ pickup pencircle scaled 0.5u;
+
+ drawoptions( withcolor 0.52white );
+ for i=1.5*direcstep step direcstep until roundray:
+ leng := roundray +-+ i;
+ midpos := i*restaxedir;
+ draw (midpos-leng*restdir)--(midpos+leng*restdir);
+ midpos := -i*restaxedir;
+ draw (midpos-leng*restdir)--(midpos+leng*restdir);
+ endfor;
+ path minuslin, plusline;
+ plusline = (0.5*direcstep*restaxedir-armsize*restdir)--
+ (0.5*direcstep*restaxedir+armsize*restdir);
+ minuslin = (-0.5*direcstep*restaxedir-armsize*restdir)--
+ (-0.5*direcstep*restaxedir+armsize*restdir);
+ draw plusline;
+ draw minuslin;
+
+ drawoptions( withcolor black );
+ for i=1.5*direcstep step direcstep until roundray:
+ leng := roundray +-+ i;
+ midpos := i*torsaxedir;
+ draw (midpos-leng*torsdir)--(midpos+leng*torsdir);
+ midpos := -i*torsaxedir;
+ draw (midpos-leng*torsdir)--(midpos+leng*torsdir);
+ endfor;
+ path minuscur, pluscurv;
+ numeric curvheig;
+ curvheig = curvfact*armsize*sind( torsionang )/cosd( torsionang );
+ leng := roundray +-+ (0.5*direcstep);
+ minuscur = ((-curvheig-0.5*direcstep)*restaxedir-armsize*restdir){restdir}..
+ (-0.5*direcstep*torsaxedir-leng*torsdir)--
+ (-0.5*direcstep*torsaxedir+leng*torsdir)..
+ {restdir}((curvheig-0.5*direcstep)*restaxedir+armsize*restdir);
+ pluscurv = ((-curvheig+0.5*direcstep)*restaxedir-armsize*restdir){restdir}..
+ (0.5*direcstep*torsaxedir-leng*torsdir)--
+ (0.5*direcstep*torsaxedir+leng*torsdir)..
+ {restdir}((curvheig+0.5*direcstep)*restaxedir+armsize*restdir);
+ draw minuscur;
+ draw pluscurv;
+
+ drawoptions( withcolor red );
+ path velbase;
+ for i=roundray+direcstep step direcstep until armsize:
+ velbase := (i*restdir)--(i*restdir+curvheig*restaxedir);
+ drawarrow velbase cutbefore plusline cutafter minuscur;
+ endfor;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+bye;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/allfigs.mp b/Master/texmf-dist/doc/metapost/featpost/example/allfigs.mp
new file mode 100644
index 00000000000..bd214e2323e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/allfigs.mp
@@ -0,0 +1,68 @@
+% allfigs.mp
+% L. Nobre G.
+% 2001
+
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex
+
+beginfig(0);
+ numeric u, i, j, s, as, bs, cs, ds;
+ pen pena, penb, penc, pend;
+ u = 1.5mm;
+ s = 7.1u;
+ as = 2u;
+ bs = 3u;
+ cs = 5u;
+ ds = 0.8u;
+ pena = pencircle scaled as;
+ penb = pencircle scaled bs;
+ penc = pencircle scaled cs;
+ pend = pencircle scaled ds;
+ linecap := squared;
+ for i=1 upto 4:
+ for j=1 upto 3:
+ draw ((i-1)*s,(j-1)*s)--
+ ((i-1)*s,j*s)--
+ (i*s,j*s)--
+ (i*s,(j-1)*s)--cycle withcolor 0.7white;
+ endfor;
+ endfor;
+ z1 = (s,3s);
+ z2 = (3s,3s);
+ z3 = (4s,3s);
+ z4 = (0,0);
+ z5 = (1s,2s);
+ z6 = (2s,2s);
+ z7 = (3s,2s);
+ z8 = (1s,1s);
+ z9 = (2s,1s);
+ linecap := rounded;
+ pickup pena;
+ draw z1;
+ draw z2;
+ pickup penb;
+ draw z3;
+ pickup penc;
+ draw z4;
+ pickup pend;
+ for i=5 upto 9:
+ draw z[i];
+ endfor;
+ label.urt(btex 1 kg etex, z1);
+ label.urt(btex 1 kg etex, z2);
+ label.rt(btex 2 kg etex, z3+(bs/2,0));
+ label.urt(btex 8 kg etex, z4+(0,cs/2));
+ label.urt(btex A etex, z5);
+ label.urt(btex B etex, z6);
+ label.urt(btex C etex, z7);
+ label.urt(btex D etex, z8);
+ label.urt(btex E etex, z9);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/allgreatideas.mp b/Master/texmf-dist/doc/metapost/featpost/example/allgreatideas.mp
new file mode 100644
index 00000000000..1a0cb083196
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/allgreatideas.mp
@@ -0,0 +1,166 @@
+% allgreatideas.mp
+% L. Nobre G.
+% 2007
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino,marvosym}
+\begin{document}
+etex
+
+path evilcrown;
+evilcrown =
+(153.18465,-56.69263)..controls (190.86575,-56.57867) and (190.82774,0)
+ ..(153.07059,0)..controls (152.44896,3.93404) and (151.82733,7.86807)
+ ..(151.2057,11.80211)..controls (151.18675,11.92209) and (151.1577,12.10594)
+ ..(151.1842,12.11972)..controls (154.27016,13.72318) and (157.32425,15.3877)
+ ..(160.34335,17.11494)..controls (165.81866,20.24739) and (171.17494,23.58395)
+ ..(176.38683,27.13756)..controls (181.43541,30.5798) and (186.34438,34.22295)
+ ..(191.08667,38.0763)..controls (195.67404,41.80377) and (200.1013,45.72461)
+ ..(204.33633,49.84808)..controls (208.429,53.83293) and (212.33783,58.00284)
+ ..(216.02922,62.36209)..controls (219.59828,66.57689) and (222.95978,70.96365)
+ ..(226.0778,75.52231)..controls (229.09842,79.93854) and (231.8863,84.51001)
+ ..(234.40594,89.2301)..controls (236.85533,93.81862) and (239.0473,98.54037)
+ ..(240.94894,103.38168)..controls (242.80696,108.11192) and (244.38446,112.94789)
+ ..(245.6573,117.86803)..controls (246.90929,122.70755) and (247.86414,127.61938)
+ ..(248.5006,132.57758)..controls (249.13164,137.49362) and (249.44836,142.44493)
+ ..(249.44836,147.4013)..controls (249.44836,152.35768) and (249.13164,157.30899)
+ ..(248.5006,162.22504)..controls (247.86414,167.18323) and (246.9093,172.09506)
+ ..(245.6573,176.93459)..controls (244.38446,181.85472) and (242.80696,186.69069)
+ ..(240.94894,191.42093)..controls (239.0473,196.26224) and (236.85533,200.984)
+ ..(234.40594,205.57251)..controls (231.8863,210.2926) and (229.09842,214.86407)
+ ..(226.0778,219.2803)..controls (222.95978,223.83896) and (219.59828,228.22572)
+ ..(216.02922,232.44052)..controls (212.33783,236.79977) and (208.429,240.96968)
+ ..(204.33633,244.95453)..controls (200.10129,249.078) and (195.67404,252.99884)
+ ..(191.08667,256.72632)..controls (221.70206,191.55792) and (196.61552,121.88226)
+ ..(141.23656,76.86674)..controls (141.1039,76.75891) and (140.91652,76.91801)
+ ..(140.87842,77.15913)..controls (129.05978,151.95451) and (117.24117,226.74988)
+ ..(105.42253,301.54526)..controls (89.43553,212.92584) and (73.44852,124.30644)
+ ..(57.46152,35.68703)..controls (57.4327,35.52724) and (57.35529,35.3694)
+ ..(57.2022,35.33107)..controls (53.45178,34.39197) and (49.65408,33.54193)
+ ..(45.81209,32.78442)..controls (45.75635,32.77344) and (45.69954,33.12679)
+ ..(45.65913,33.3782)..controls (30.43942,128.07872) and (15.21971,222.77922)
+ ..(0,317.47974)..controls (-15.23506,222.68375) and (-30.47012,127.88777)
+ ..(-45.70518,33.09178)..controls (-45.75298,32.79448) and (-46.14847,32.85071)
+ ..(-46.49614,32.92035)..controls (-50.0591,33.634) and (-53.58371,34.42728)
+ ..(-57.06757,35.2974)..controls (-57.34285,35.36615) and (-57.45767,35.66574)
+ ..(-57.50981,35.95477)..controls (-73.48071,124.48494) and (-89.45163,213.01509)
+ ..(-105.42253,301.54526)..controls (-117.2524,226.67888) and (-129.08224,151.81252)
+ ..(-140.91211,76.94614)..controls (-140.93776,76.78383) and (-141.17343,76.81525)
+ ..(-141.36346,76.96997)..controls (-196.57445,121.92412) and (-221.60674,191.40785)
+ ..(-191.21811,256.4458)..controls (-191.15338,256.58432) and (-191.08727,256.72585)
+ ..(-191.10054,256.71506)..controls (-195.68295,252.99094) and (-200.10558,249.07385)
+ ..(-204.33633,244.95453)..controls (-208.429,240.96968) and (-212.33783,236.79977)
+ ..(-216.02922,232.44052)..controls (-219.59828,228.22572) and (-222.95978,223.83896)
+ ..(-226.0778,219.2803)..controls (-229.09842,214.86407) and (-231.8863,210.2926)
+ ..(-234.40594,205.57251)..controls (-236.85533,200.984) and (-239.0473,196.26224)
+ ..(-240.94894,191.42093)..controls (-242.80696,186.69069) and (-244.38446,181.85472)
+ ..(-245.6573,176.93459)..controls (-246.90929,172.09506) and (-247.86414,167.18323)
+ ..(-248.5006,162.22504)..controls (-249.13164,157.30899) and (-249.44836,152.35768)
+ ..(-249.44836,147.4013)..controls (-249.44836,142.44493) and (-249.13164,137.49362)
+ ..(-248.5006,132.57758)..controls (-247.86414,127.61938) and (-246.9093,122.70755)
+ ..(-245.6573,117.86803)..controls (-244.38446,112.94789) and (-242.80696,108.11192)
+ ..(-240.94894,103.38168)..controls (-239.0473,98.54037) and (-236.85533,93.81862)
+ ..(-234.40594,89.2301)..controls (-231.8863,84.51001) and (-229.09842,79.93854)
+ ..(-226.0778,75.52231)..controls (-222.95978,70.96365) and (-219.59828,66.57689)
+ ..(-216.02922,62.36209)..controls (-212.33783,58.00284) and (-208.429,53.83293)
+ ..(-204.33633,49.84808)..controls (-200.10129,45.72461) and (-195.67404,41.80377)
+ ..(-191.08667,38.0763)..controls (-186.34438,34.22295) and (-181.43541,30.5798)
+ ..(-176.38683,27.13756)..controls (-171.17494,23.58395) and (-165.81866,20.2474)
+ ..(-160.34335,17.11494)..controls (-157.3213,15.386) and (-154.26416,13.71991)
+ ..(-151.17513,12.115)..controls (-151.1577,12.10596) and (-151.16463,12.06212)
+ ..(-151.16982,12.0293)..controls (-151.8034,8.01953) and (-152.437,4.00977)
+ ..(-153.07059,0)..controls (-190.8658,0) and (-190.8658,-56.69281)
+ ..(-153.07059,-56.69281)..controls (-51.1263,-56.69281) and (50.818,-56.69281)
+ ..(152.76228,-56.69281)..controls (152.90308,-56.69281) and (153.12411,-56.69281)
+ ..cycle;
+
+path foimar, monitor, ecran;
+foimar=
+(-0.00192,-12.55074)..controls (-0.64168,-11.78833) and (-1.28142,-11.02591)
+ ..(-1.92117,-10.2635)..controls (-7.51778,-14.95969) and (-13.11438,-19.65587)
+ ..(-18.71098,-24.35205)..controls (-17.00328,-26.38718) and (-15.29556,-28.42232)
+ ..(-13.58786,-30.45744)..controls (-12.30708,-31.98378) and (-12.30708,-31.98378)
+ ..(-2.1138,-28.6326)..controls (-3.95111,-27.57187) and (-6.11067,-26.96915)
+ ..(-7.48247,-25.33434)..controls (-3.921,-22.34586) and (-0.35953,-19.35738)
+ ..(3.20195,-16.3689)..controls (11.91702,-25.94652) and (23.26077,-25.99902)
+ ..(31.85223,-20.78899)..controls (31.89467,-20.76324) and (31.94853,-20.76074)
+ ..(31.98587,-20.79207)..controls (36.66202,-24.71588) and (41.33817,-28.6397)
+ ..(46.01431,-32.5635)..controls (47.72202,-30.52838) and (49.42972,-28.49324)
+ ..(51.13742,-26.45813)..controls (46.8044,-22.82224) and (42.47137,-19.18634)
+ ..(38.13835,-15.55045)..controls (38.10356,-15.52124) and (38.13104,-15.47006)
+ ..(38.16563,-15.42989)..controls (49.17552,-2.64243) and (48.7403,21.25578)
+ ..(12.84161,37.23851)..controls (42.09344,20.35042) and (41.44891,0.09486)
+ ..(31.70877,-10.05847)..controls (31.67998,-10.08849) and (31.63301,-10.09172)
+ ..(31.60129,-10.06511)..controls (23.35864,-3.1486) and (15.11601,3.7679)
+ ..(6.87337,10.68442)..controls (8.36761,12.46516) and (9.86185,14.2459)
+ ..(11.3561,16.02664)..controls (1.80319,20.141) and (1.80319,20.141)
+ ..(-0.75836,17.0883)..controls (-1.26715,17.51523) and (-1.77594,17.94215)
+ ..(-2.28471,18.36908)..controls (-3.99242,16.33397) and (-5.70012,14.29883)
+ ..(-7.40782,12.2637)..controls (-6.89905,11.83678) and (-6.39026,11.40985)
+ ..(-5.88147,10.98293)..controls (-7.16225,9.45657) and (-8.44302,7.93024)
+ ..(-9.7238,6.40388)..controls (-7.18245,4.27141) and (-4.64111,2.13893)
+ ..(-2.09976,0.00645)..controls (-2.09598,0.00328) and (-2.09096,0.00133)
+ ..(-2.08818,0.00462)..controls (-0.8087,1.52943) and (0.47078,3.05423)
+ ..(1.75026,4.57904)..controls (9.45714,-1.88791) and (17.16402,-8.35486)
+ ..(24.8709,-14.82181)..controls (24.88516,-14.83379) and (24.88658,-14.85393)
+ ..(24.87306,-14.85988)..controls (17.92508,-17.91718) and (9.47896,-17.05374)
+ ..(3.05269,-9.99147)..controls (2.03615,-10.84447) and (1.0196,-11.69746)
+ ..(0.00307,-12.55046)..controls (0.0015,-12.55177) and (-0.00072,-12.55217)
+ ..cycle;
+monitor =
+(24.90654,-57.06877)..controls (37.60521,-57.06877) and (50.3039,-57.06877)
+ ..(63.00256,-57.06877)..controls (68.00955,-57.06877) and (72.06851,-53.00981)
+ ..(72.06851,-48.00282)..controls (72.06851,-16.00095) and (72.06851,16.00095)
+ ..(72.06851,48.00282)..controls (72.06851,53.00981) and (68.00955,57.06877)
+ ..(63.00256,57.06877)..controls (21.00085,57.06877) and (-21.00085,57.06877)
+ ..(-63.00256,57.06877)..controls (-68.00955,57.06877) and (-72.06851,53.00981)
+ ..(-72.06851,48.00282)..controls (-72.06851,16.00095) and (-72.06851,-16.00095)
+ ..(-72.06851,-48.00282)..controls (-72.06851,-53.00981) and (-68.00955,-57.06877)
+ ..(-63.00256,-57.06877)..controls (-50.3039,-57.06877) and (-37.60521,-57.06877)
+ ..(-24.90654,-57.06877)..controls (-24.90654,-62.05008) and (-24.90654,-67.03139)
+ ..(-24.90654,-72.0127)..controls (-75.71588,-74.00522) and (-75.71588,-74.00522)
+ ..(-77.7084,-90.89185)..controls (-61.76822,-90.89185) and (-45.82803,-90.89185)
+ ..(-29.88785,-90.89185)..controls (-29.59856,-89.94563) and (-11.30861,-89.9454)
+ ..(0,-89.9454)..controls (11.30861,-89.9454) and (29.59856,-89.94563)
+ ..(29.88785,-90.89185)..controls (45.82803,-90.89185) and (61.76822,-90.89185)
+ ..(77.7084,-90.89185)..controls (75.71588,-74.00522) and (75.71588,-74.00522)
+ ..(24.90654,-72.0127)..controls (24.90654,-67.03139) and (24.90654,-62.05008)
+ ..cycle;
+ecran =
+(-59.11711,-44.11737)..controls (-19.7057,-44.11737) and (19.7057,-44.11737)
+ ..(59.11711,-44.11737)..controls (59.11711,-14.7058) and (59.11711,14.7058)
+ ..(59.11711,44.11737)..controls (19.7057,44.11737) and (-19.7057,44.11737)
+ ..(-59.11711,44.11737)..controls (-59.11711,14.7058) and (-59.11711,-14.7058)
+ ..cycle;
+
+
+beginfig(1);
+ picture topl, botl, rtil, aux;
+ numeric margbo, lscale, escale, fscale, dscale, i;
+ margbo = 80mm;
+ lscale = 8.5;
+ escale = lscale*0.05;
+ dscale = lscale*2;
+ topl = thelabel(btex All great ideas end--up being etex, origin)
+ scaled lscale;
+ botl = thelabel(btex distorted by Human Nature etex, origin) scaled lscale;
+ rtil = thelabel(btex \EyesDollar etex, origin ) scaled dscale;
+ draw (evilcrown shifted -center evilcrown) scaled escale
+ shifted ((-1.02,-0.05)*margbo);
+ draw foimar shifted (-4mm,0);
+ draw monitor;
+ draw ecran;
+ draw rtil shifted ((0.8,-0.05)*margbo);
+ aux = currentpicture;
+ currentpicture:=nullpicture;
+ draw aux scaled 1.93 shifted (0.45*margbo,0);
+ draw topl shifted (0,0.85*margbo);
+ draw botl shifted (0,-1.08margbo);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/avalzero.mp b/Master/texmf-dist/doc/metapost/featpost/example/avalzero.mp
new file mode 100644
index 00000000000..28ff2753914
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/avalzero.mp
@@ -0,0 +1,85 @@
+% avalzero.mp
+% L. Nobre G.
+% 1999
+
+verbatimtex \documentclass{article} \usepackage{palatino} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex
+
+beginfig(1); % crescente
+ numeric u;
+ u = 1in;
+ draw fullcircle scaled 2u;
+ draw (left--right) scaled u;
+ draw (down--up) scaled u;
+ draw (left--up) scaled u;
+ draw (left--down) scaled u;
+ path int, cresc, out;
+ int = halfcircle rotated -90 scaled (2*1.414u) shifted ((-0.999,0)*u);
+ out = halfcircle rotated -90 scaled 2u;
+ cresc = buildcycle( int, reverse out );
+ fill cresc withcolor 0.5white;
+ draw cresc withpen pencircle scaled 1pt;
+endfig;
+
+beginfig(2); % trapezio
+ numeric u, ind, esq[], rig[], h[], ch;
+ pair hlab[];
+ u = 0.55in;
+ ch = 0;
+ for ind=0 upto 4:
+ esq[ind] = -abs(((normaldeviate)-1.5)*u);
+ rig[ind] = abs(((normaldeviate)+1.5)*u);
+ h[ind] = (abs((normaldeviate)+0.25)*u/4)+2mm+ch;
+ ch := ch+h[ind];
+ endfor;
+ draw (esq0,h0)--(rig0,h0);
+ for ind=1 upto 4:
+ draw (esq[ind-1],h[ind-1])--(esq[ind],h[ind]);
+ draw (rig[ind-1],h[ind-1])--(rig[ind],h[ind]);
+ draw ((esq[ind],h[ind])--(rig[ind],h[ind])) dashed evenly;
+ hlab[ind] = (0,(h[ind]+h[ind-1])/2);
+ endfor;
+ draw (esq4,h4)--(rig4,h4);
+ draw ((0,h0)--(0,h4)) dashed evenly;
+ label.rt( btex $h_1$ etex, hlab1 );
+ label.rt( btex $h_2$ etex, hlab2 );
+ label.rt( btex $h_3$ etex, hlab3 );
+ label.rt( btex $h_4$ etex, hlab4 );
+ label.top( btex $l_0$ etex, ((rig0+esq0)/2,h0) );
+ label.top( btex $l_1$ etex, ((rig1+esq1)/2,h1) );
+ label.top( btex $l_2$ etex, ((rig2+esq2)/2,h2) );
+ label.top( btex $l_3$ etex, ((rig3+esq3)/2,h3) );
+ label.top( btex $l_4$ etex, ((rig4+esq4)/2,h4) );
+endfig;
+
+beginfig(3); % olimpiad
+ numeric u;
+ u=1in;
+ path squr, arcir, vert, horiz, area;
+ squr = unitsquare scaled u;
+ arcir = halfcircle scaled 2u;
+ vert = (origin--up) scaled u shifted (u/2,0);
+ horiz = (origin--right) scaled u shifted (0,u/2);\
+ area = buildcycle( vert, arcir, horiz );
+ fill area withcolor 0.5white;
+ draw area withpen pencircle scaled 1pt;
+ draw squr;
+ draw arcir cutafter squr;
+ draw vert;
+ draw horiz;
+endfig;
+
+beginfig(4); % ortoproj
+ numeric u;
+ u=1in;
+ draw unitsquare scaled u;
+ path one, two;
+ one = (0.5,0)--(0.5,0.5)--(1,1);
+ two = (0,1)--(0.5,0.5);
+ draw one scaled u;
+ draw two scaled u;
+ draw currentpicture shifted (0,1.5u);
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/badshreeyantra.mp b/Master/texmf-dist/doc/metapost/featpost/example/badshreeyantra.mp
new file mode 100644
index 00000000000..38e3f38432b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/badshreeyantra.mp
@@ -0,0 +1,73 @@
+% badshreeyantra.mp
+% L. Nobre G.
+% 2009
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, pA, pB, pC, pD;
+ u = 5cm;
+ path outercircle;
+ outercircle = fullcircle scaled (2*u);
+ draw outercircle;
+ pA = 0.8;
+ pB = 0.3;
+ pC = -0.2;
+ pD = 0.37;
+% message "pA: " & decimal(pA);
+% message "pB: " & decimal(pB);
+% message "pC: " & decimal(pC);
+% message "pD: " & decimal(pD);
+ pA := pA*u;
+ pB := pB*u;
+ pC := pC*u;
+ pD := pD*u;
+ z1 = (pD,pA);
+ z2 = (-pD,pA);
+ z3 = (0,pC);
+ draw z1--z2--z3--cycle;
+ z4 = ((-u,pB)--(u,pB)) intersectionpoint outercircle;
+ z5 = (-x4,pB);
+ z6 = (0,-u);
+ draw z4--z5--z6--cycle;
+ z7 = (pD,-pA);
+ z8 = (-pD,-pA);
+ z9 = (0,pB);
+ draw z7--z8--z9--cycle;
+ z10 = (x4,-pB);
+ z11 = (-x4,-pB);
+ z12 = (0,u);
+ draw z10--z11--z12--cycle;
+ z13 = (z10--z12) intersectionpoint (z1--z3);
+ z14 = (z10--z12) intersectionpoint (z4--z5);
+ z16 = (0,-pA);
+ z17 = (-x13,y13);
+ z15 = whatever[z17,z13];
+ z15 = whatever[z16,z14];
+ z18 = (-x15,y15);
+ draw z15--z16--z18--cycle;
+ z19 = (0,pA);
+ z20 = (x15,-y15);
+ z21 = (-x15,-y15);
+ draw z19--z20--z21--cycle;
+ z22 = (z3--(u,pC)) intersectionpoint (z14--z16);
+ z23 = (-x22,y22);
+ z24 = (0,y13);
+ draw z22--z23--z24--cycle;
+ z25 = (0,-y15);
+ z26 = (z3--z1) intersectionpoint (z22--z24);
+ z27 = (-x26,y26);
+ z28 = whatever[z19,z20];
+ z28 = whatever[z26,z27];
+ z29 = (-x28,y28);
+ draw z25--z28--z29--cycle;
+ z30 = (0,y10);
+ z31 = (z7--z9) intersectionpoint (z1--z3);
+ z32 = (-x31,y31);
+ z33 = whatever[z31,z32];
+ z33 = whatever[z22,z24];
+ z34 = (-x33,y33);
+ draw z30--z33--z34--cycle;
+% dotlabels.top(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34);
+endfig;
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp b/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp
new file mode 100644
index 00000000000..c585a52cc43
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp
@@ -0,0 +1,76 @@
+% balllauncher.mp
+% L. Nobre G.
+% 2007
+
+prologues := 1;
+
+beginfig(1);
+ numeric tlen, thig, plen, phig, llen, lhig, pray, sray, wray, lray;
+ numeric u, gmar, lang, hlen, rlen, pmal, pmah, aray, alim, aste, alen;
+ pen basepen, outerpen;
+ picture mydash;
+ u = 2.5mm;
+ basepen = pencircle scaled 0.35u;
+ outerpen = pencircle scaled 1.1u;
+ mydash = dashpattern( off 1.5u on 1.2u off 1.5u);
+ pickup basepen;
+ gmar = 0.65u; % margem de bordadura
+ lang = 35; % angulo do lancador
+ hlen = 70u; % comprimento da linha horizontal
+ tlen = 80u; % comprimento da tabua
+ thig = 6u; % altura da tabua
+ plen = 60u; % comprimento da placa
+ phig = 35u; % altura da placa
+ pmal = 20u; % parte da placa que fica em cima da tabua
+ pmah = 15u; % parte da placa que fica abaixo da horizontal
+ llen = 60u; % comprimento da lancador (na inclinacao zero)
+ lhig = 12u; % altura do lancador (na inclinacao zero)
+ pray = 2u; % raio dos cantos arredondados da placa
+ sray = 2.7u; % raio da marca da esfera no lancador
+ wray = 1u; % raio do peso de marcacao do angulo
+ lray = 3u; % raio da ponta do gatilho do lancador
+ rlen = 20u; % comprimento da cordinha que segura o peso de marcacao
+ alim = 45; % angulo limite do tansferidor
+ aste = 5; % divisao da escala do transferidor
+ alen = 0.9u; % comprimento das marcas da escala do transferidor
+ aray = lhig-4*gmar; % raio do transferidor
+ path t, p, a, lo, li, sp;
+ li = (aray+3*gmar-llen,-gmar)--(aray+gmar,-gmar)--
+ (aray+gmar,lhig-3*gmar)--(aray+3*gmar-llen,lhig-3*gmar)--cycle;
+ lo = (aray+2*gmar-llen,-2*gmar)--(aray+2*gmar,-2*gmar)--
+ (aray+2*gmar,lhig-2*gmar)--(aray+2*gmar-llen,lhig-2*gmar)--cycle;
+ t = origin--(tlen,0)--(tlen,-thig)--(0,-thig)--cycle;
+ p = origin--(pmal,0)---(pmal,phig-pmah-pray)...(pmal-pray,phig-pmah)---
+ (pmal-plen+pray,phig-pmah)...(pmal-plen,phig-pmah-pray)---
+ (pmal-plen,pray-pmah)...(pmal-plen+pray,-pmah)---
+ (-pray,-pmah)...(0,pray-pmah)---cycle;
+ a = buildcycle( fullcircle rotated (-10), dir(90+alim)--origin--right );
+ numeric auxa, auxb, aucc;
+ auxa = aray+5*gmar-llen+sray;
+ auxb = 0.5*lhig-2*gmar;
+ z0 = (auxa,auxb);
+ sp = fullcircle scaled (2*sray) shifted z0;
+ unfill lo;
+ draw lo;
+ fill li;
+ unfill sp;
+ unfill a scaled (2*aray);
+ numeric i;
+ for i=aste step aste until alim-aste+90:
+ draw (aray-gmar)*dir(i)--(aray-gmar-alen)*dir(i);
+ endfor;
+ z1 = rlen*dir(90-lang);
+ draw origin--z1;
+ fill fullcircle scaled (2*wray) shifted z1;
+ picture tmppicture;
+ tmppicture = currentpicture;
+ currentpicture := nullpicture;
+ draw t;
+ fill p;
+ draw tmppicture rotatedaround (z0,180+lang)
+ shifted ((-0.5*(plen-pmal),sray)-z0);
+ undraw origin--(-hlen,0) dashed mydash withpen outerpen;
+ draw origin--(-hlen,0) dashed mydash withpen basepen;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp b/Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp
deleted file mode 100644
index 4d81af39d76..00000000000
--- a/Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp
+++ /dev/null
@@ -1,28 +0,0 @@
-% borderframetest.mp
-% L. Nobre G.
-% 2003
-
-input featpost3Dplus2D;
-
-beginfig(0);
- Spread := 45;
-
- numeric theframefrach, theframefracw, Shifts;
- path theframebord;
- Shifts := 105mm;
- theframefrach = 0.2927;
- theframefracw = 0.39;
- z1 = Shifts*(1-theframefracw,1-theframefrach);
- z2 = Shifts*(1+theframefracw,1-theframefrach);
- z3 = Shifts*(1+theframefracw,1+theframefrach);
- z4 = Shifts*(1-theframefracw,1+theframefrach);
- theframebord = z1--z2--z3--z4--cycle;
- show z1;
- show z2;
- show z3;
- show z4;
- draw theframebord withcolor background withpen pencircle scaled 0;
- clip currentpicture to theframebord;
-endfig;
-
-end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/buildcyclebug.mp b/Master/texmf-dist/doc/metapost/featpost/example/buildcyclebug.mp
new file mode 100644
index 00000000000..4f2a2cfe9d5
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/buildcyclebug.mp
@@ -0,0 +1,203 @@
+% buildcyclebug.mp
+% L. Nobre G.
+% 2006
+
+beginfig(1);
+ numeric squaregridstep, i, j, rotationanglestep, u, nx, ny;
+ numeric rotationangle, horishift;
+ path leftcirc, righcirc, basecirc;
+ pen markpen;
+ pair shiftvect;
+ markpen = pencircle scaled 3pt;
+ u = 10mm;
+ squaregridstep = 2.1u;
+ rotationanglestep = 5.5;
+
+ nx = floor( 21cm / ( squaregridstep+1 ) );
+ ny = 2*floor( 29cm / ( squaregridstep+1 ) );
+ basecirc = fullcircle scaled u;
+ for i=1 upto nx:
+ horishift := (i/nx)*0.45u;
+ for j=1 upto ny:
+ rotationangle := j*rotationanglestep;
+ shiftvect := squaregridstep*(i,0.5*j);
+ leftcirc := basecirc rotated (2*rotationangle)
+ shifted ( shiftvect+horishift*left );
+ righcirc := basecirc rotated rotationangle
+ shifted ( shiftvect+horishift*right );
+ draw leftcirc withcolor 0.3white;
+ draw righcirc withcolor 0.3white;
+ draw buildcycle( leftcirc, reverse righcirc ) withcolor blue;
+ draw point 0 of leftcirc withpen markpen;
+ draw point 0 of righcirc withpen markpen;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(2);
+ path a, b, c;
+ a = (159.49368,290.7048)..controls (159.29092,291.94003)
+ and (158.9775,293.15451)
+ ..(158.55756,294.33372)..controls (158.13393,295.5233)
+ and (157.60364,296.6721)
+ ..(156.97446,297.76695)..controls (156.33871,298.87321)
+ and (155.6046,299.9199)
+ ..(154.78215,300.89539)..controls (153.9502,301.88214)
+ and (153.03125,302.79204)
+ ..(152.03786,303.61603)..controls (151.0325,304.44995)
+ and (149.95486,305.19261)
+ ..(148.81863,305.83694)..controls (147.66982,306.48843)
+ and (146.46558,307.03687)
+ ..(145.22061,307.47765)..controls (143.96362,307.92268)
+ and (142.66995,308.25626)
+ ..(141.3548,308.47633)..controls (140.03023,308.698)
+ and (138.68887,308.8037)
+ ..(137.34593,308.79295)..controls (135.99751,308.78217)
+ and (134.65259,308.65404)
+ ..(133.32639,308.40996)..controls (131.99881,308.16563)
+ and (130.69505,307.80605)
+ ..(129.43005,307.33498)..controls (128.16791,306.86497)
+ and (126.94911,306.28574)
+ ..(125.78854,305.60234)..controls (124.63374,304.92235)
+ and (123.5411,304.14188)
+ ..(122.5243,303.26889)..controls (121.51508,302.4024)
+ and (120.58455,301.44818)
+ ..(119.74568,300.41588)..controls (118.91405,299.39249)
+ and (118.17587,298.29651)
+ ..(117.54193,297.1402)..controls (116.91396,295.99477)
+ and (116.39084,294.79483)
+ ..(115.98134,293.55438)..controls (115.57558,292.32524)
+ and (115.28311,291.06154)
+ ..(115.10854,289.77898)..controls (114.93536,288.5067)
+ and (114.87895,287.22122)
+ ..(114.94107,285.93872)..controls (115.0028,284.66422)
+ and (115.18134,283.39806)
+ ..(115.47398,282.15607)..controls (115.76532,280.91968)
+ and (116.16852,279.71237)
+ ..(116.67828,278.54889)..controls (117.18674,277.38843)
+ and (117.79907,276.27635)
+ ..(118.50629,275.22514)..controls (119.21288,274.17487)
+ and (120.01135,273.18947)
+ ..(120.89124,272.27943)..controls (121.77103,271.3695)
+ and (122.72879,270.53844)
+ ..(123.75226,269.79378)..controls (124.77632,269.04868)
+ and (125.86238,268.39284)
+ ..(126.9978,267.83188)..controls (128.13411,267.27048)
+ and (129.3158,266.80612)
+ ..(130.52983,266.44218)..controls (131.74399,266.07822)
+ and (132.98631,265.81592)
+ ..(134.24382,265.65674)..controls (135.50044,265.49768)
+ and (136.76797,265.44212)
+ ..(138.03372,265.49004)..controls (139.29755,265.53787)
+ and (140.55539,265.68869)
+ ..(141.79463,265.94131)..controls (143.03053,266.19325)
+ and (144.24384,266.54561)
+ ..(145.42241,266.99493)..controls (146.59683,267.44267)
+ and (147.73291,267.98524)
+ ..(148.81863,268.61847)..controls (149.90009,269.24919)
+ and (150.9279,269.96771)
+ ..(151.89061,270.76805)..controls (152.8493,271.56505)
+ and (153.74008,272.44041)
+ ..(154.5525,273.38608)..controls (155.36205,274.32838)
+ and (156.09094,275.33714)
+ ..(156.72955,276.40274)..controls (157.36655,277.46562)
+ and (157.91138,278.58112)
+ ..(158.35652,279.73755)..controls (158.8012,280.89273)
+ and (159.14471,282.08438)
+ ..(159.38153,283.29933)..controls (159.6187,284.51605)
+ and (159.74791,285.75134)
+ ..(159.7672,286.99081)..controls (159.78654,288.23448)
+ and (159.69516,289.47742)
+ ..cycle;
+ b = (164.69388,283.76816)..controls (164.45602,285.2755)
+ and (164.0816,286.75807)
+ ..(163.57579,288.19778)..controls (163.06467,289.6526)
+ and (162.42154,291.05757)
+ ..(161.65623,292.39624)..controls (160.8809,293.75246)
+ and (159.9834,295.03499)
+ ..(158.97679,296.22963)..controls (157.95538,297.44182)
+ and (156.82588,298.55852)
+ ..(155.6046,299.56902)..controls (154.36432,300.59523)
+ and (153.03438,301.50781)
+ ..(151.63235,302.29881)..controls (150.2098,303.1014)
+ and (148.71864,303.77567)
+ ..(147.17755,304.31679)..controls (145.61667,304.86487)
+ and (144.01057,305.27425)
+ ..(142.37828,305.54321)..controls (140.73018,305.81479)
+ and (139.06157,305.9422)
+ ..(137.39133,305.92545)..controls (135.71124,305.9086)
+ and (134.03581,305.74596)
+ ..(132.38377,305.43983)..controls (130.7291,305.13322)
+ and (129.1041,304.68382)
+ ..(127.52728,304.09592)..controls (125.95447,303.5095)
+ and (124.43553,302.7875)
+ ..(122.98894,301.93604)..controls (121.55147,301.08994)
+ and (120.191,300.11926)
+ ..(118.92514,299.03305)..controls (117.6715,297.95732)
+ and (116.51561,296.77249)
+ ..(115.47398,295.49034)..controls (114.44432,294.22292)
+ and (113.53049,292.86551)
+ ..(112.74724,291.43265)..controls (111.97365,290.01747)
+ and (111.3307,288.5346)
+ ..(110.82997,287.0015)..controls (110.33537,285.48715)
+ and (109.98169,283.9303)
+ ..(109.77559,282.35062)..controls (109.5717,280.78786)
+ and (109.51315,279.20952)
+ ..(109.6024,277.63603)..controls (109.69093,276.07535)
+ and (109.9245,274.52629)
+ ..(110.29973,273.0088)..controls (110.67278,271.50015)
+ and (111.18423,270.02914)
+ ..(111.82713,268.61427)..controls (112.46806,267.20374)
+ and (113.23691,265.855)
+ ..(114.12129,264.5829)..controls (115.0049,263.31194)
+ and (116.0003,262.12254)
+ ..(117.09409,261.02722)..controls (118.18842,259.93134)
+ and (119.37697,258.93388)
+ ..(120.64404,258.04337)..controls (121.91309,257.15147)
+ and (123.25624,256.37012)
+ ..(124.65749,255.70496)..controls (126.06084,255.03879)
+ and (127.51752,254.49147)
+ ..(129.01158,254.06616)..controls (130.50682,253.64052)
+ and (132.03445,253.3385)
+ ..(133.57892,253.16093)..controls (135.1232,252.9834)
+ and (136.6793,252.93085)
+ ..(138.23209,253.003)..controls (139.78247,253.07506)
+ and (141.32457,253.27116)
+ ..(142.84367,253.58932)..controls (144.35844,253.90657)
+ and (145.84552,254.34416)
+ ..(147.29047,254.89853)..controls (148.72931,255.45056)
+ and (150.1218,256.11664)
+ ..(151.45383,256.89171)..controls (152.77919,257.66292)
+ and (154.0404,258.53955)
+ ..(155.22351,259.51508)..controls (156.4003,260.4854)
+ and (157.49585,261.55034)
+ ..(158.4969,262.70111)..controls (159.49316,263.84637)
+ and (160.39235,265.07266)
+ ..(161.18283,266.36856)..controls (161.97006,267.65913)
+ and (162.64664,269.01411)
+ ..(163.20195,270.42015)..controls (163.75612,271.82329)
+ and (164.18744,273.27196)
+ ..(164.48865,274.75021)..controls (164.7901,276.22968)
+ and (164.96005,277.73294)
+ ..(164.99524,279.2424)..controls (165.03055,280.75697)
+ and (164.93001,282.27168)
+ ..cycle;
+ draw a;
+ draw b;
+ c = buildcycle( b, a );
+ show c;
+ draw c withcolor green;
+
+ pair sh, si;
+ numeric sc;
+ sh = (-150,-285);
+ si = (-150,-290);
+ sc = 10;
+ draw a shifted sh scaled sc;
+ draw b shifted si scaled sc;
+ c := buildcycle( a shifted sh scaled sc, b shifted si scaled sc );
+ draw c withcolor green;
+endfig;
+
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/canschemes.mp b/Master/texmf-dist/doc/metapost/featpost/example/canschemes.mp
new file mode 100644
index 00000000000..1a963311da7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/canschemes.mp
@@ -0,0 +1,159 @@
+input boxes;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+defaultfont:="cmssu30";
+
+beginfig(1);
+ numeric ymax, xmax, ymed,ylow;
+ ymax = 2in;
+ xmax = 3in;
+ ymed = 1.25in;
+ ylow = 0.2in;
+ z1 = (xmax,0);
+ z2 = (xmax,ymed);
+ z5 = (xmax,ymax);
+ z3 = z2+0.4*(z5-z2);
+ z4 = z2+0.7*(z5-z2);
+ z7 = (0,ymax);
+ z6 = z5+0.7*(z7-z5);
+ z9 = (0,ymed);
+ z8 = z7+0.8*(z9-z7);
+ z10= z9+0.5*(origin-z9);
+ z11= (xmax/12,ymed);
+ z13= (xmax/3,ymed);
+ z14= (5*xmax/12,ymed);
+ z15= (7*xmax/12,0.8*ymed);
+ z16= (7*xmax/12,0.6*ymed);
+ z17= (3*xmax/4,ymed);
+ z18= (5*xmax/6,ymed);
+ path a,b,c,d;
+ a = z6{down}..z14..z15..z17..z4;
+ b = z9--z2;
+ c = z10..{right}z13..z2;
+ d = z8..z11..z16..z18..z3;
+ z12 = c intersectionpoint d;
+ pickup pencircle scaled 2pt;
+ draw origin--z1--z5--z7--cycle;
+ draw a;
+ draw b;
+ draw c;
+ draw d;
+% dotlabels.urt(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
+ label.top(btex $h^-_{I\! I}$ etex,z15);
+ label.bot(btex $h^+_{I\! I}$ etex,z16);
+ label.lrt(btex $h_{I}$ etex,z10);
+ label.urt(btex $h_0$ etex,(x12,ymed));
+ label.bot(btex $K_3/K_1$ etex,0.5*(z1-origin));
+ label.lft(btex $h$ etex,0.5*(z7-origin));
+ pickup pencircle scaled 0pt;
+ draw (x11,0)--(x11,ymax);
+ draw (x12,0)--(x12,ymax);
+ draw (x13,0)--(x13,ymax);
+ draw (x14,0)--(x14,ymax);
+ draw (x17,0)--(x17,ymax);
+ draw (x18,0)--(x18,ymax);
+ label(btex $C_1$ etex,((x7+x11)/2,ylow));
+ label(btex $C_3$ etex,((x12+x11)/2,ylow));
+ label(btex $C_2$ etex,((x13+x12)/2,ylow));
+ label(btex $B$ etex,((x14+x13)/2,ylow));
+ label(btex $A_1$ etex,((x17+x14)/2,ylow));
+ label(btex $B$ etex,((x18+x17)/2,ylow));
+ label(btex $A_2$ etex,((x1+x18)/2,ylow));
+endfig;
+
+beginfig(2);
+ numeric ymax, xmax, i, j, noise, twist, grid, size, u, actsize;
+ pair actpos, direct, one, two;
+ u = 0.5mm;
+ xmax = 9;
+ ymax = 9;
+ noise = 1u;
+ size = 5u;
+ pickup pencircle scaled u;
+ grid = size + 3*noise;
+ twist = 70/(grid*(xmax++ymax));
+ label.lft( btex tor\c{c}\~{a}o etex, grid*(-xmax-1,ymax) );
+ for i=-xmax upto -1: % twist
+ for j=1 upto ymax:
+ actpos:=(grid*i+noise*normaldeviate,grid*j+noise*normaldeviate);
+ direct:=dir(90);
+ actsize:=size*sind(3*(xpart actpos)*twist)/2;
+% direct:=dir(angle(actpos)+90);
+% actsize:=size*sind(abs(actpos)*twist)/2;
+ one:=actpos-actsize*direct;
+ two:=actpos+actsize*direct;
+ draw one--two;
+ endfor;
+ endfor;
+ label.rt( btex flex\~{a}o etex, grid*(xmax+1,ymax) );
+ for i=1 upto xmax: % bend
+ for j=1 upto ymax:
+ actpos:=(grid*i+noise*normaldeviate,grid*j+noise*normaldeviate);
+ direct:=dir(angle(actpos)+90);
+ actsize:=size/2;
+ one:=actpos-actsize*direct;
+ two:=actpos+actsize*direct;
+ draw one--two;
+ endfor;
+ endfor;
+ label.rt( btex sela etex, grid*(xmax+1,-ymax) );
+ for i=1 upto xmax: % saddle-splay
+ for j=-ymax upto -1:
+ actpos:=(grid*i+noise*normaldeviate,grid*j+noise*normaldeviate);
+ direct:=dir(-angle(actpos));
+ actsize:=size*sind(abs(actpos)*twist)/2;
+ one:=actpos-actsize*direct;
+ two:=actpos+actsize*direct;
+ draw one--two;
+ endfor;
+ endfor;
+ label.lft( btex afunilamento etex, grid*(-xmax-1,-ymax) );
+ for i=-xmax upto -1: % splay
+ for j=-ymax upto -1:
+ actpos:=(grid*i+noise*normaldeviate,grid*j+noise*normaldeviate);
+ direct:=unitvector(actpos);
+% actsize:=size/2;
+ actsize:=size*sind(abs(actpos)*twist)/2;
+ one:=actpos-actsize*direct;
+ two:=actpos+actsize*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(3);
+ numeric vertj;
+ path ab, at, tb;
+ vertj = 1cm;
+ boxit.afun( btex afunilamento etex );
+ boxit.bend( btex flex\~{a}o etex );
+ boxit.torc( btex tor\c{c}\~{a}o etex );
+ afun.se=bend.sw-vertj*up;
+ afun.ne=bend.nw-vertj*up;
+ bend.se=torc.sw+2*vertj*up;
+ bend.ne=torc.nw+2*vertj*up;
+ drawunboxed( afun, bend, torc );
+ ab = afun.n{up}..{right}bend.w;
+ at = afun.s{down}..{right}torc.w;
+ tb = torc.n{up}..{left}bend.e;
+ pickup pencircle scaled 1pt;
+ drawarrow ab;
+ drawarrow at;
+ drawarrow tb;
+ label.top( btex $\beta$ etex, point 0.5*length ab of ab );
+ label.bot( btex $\psi$ etex, point 0.5*length at of at );
+ label.rt( btex $\beta$ etex, point 0.5*length tb of tb );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cap29res.mp b/Master/texmf-dist/doc/metapost/featpost/example/cap29res.mp
new file mode 100644
index 00000000000..604e5911f8c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/cap29res.mp
@@ -0,0 +1,380 @@
+verbatimtex
+\documentclass[11pt]{article}
+\usepackage{palatino,mathpazo,amsmath,amssymb}
+\usepackage[squaren]{SIunits}
+\usepackage[latin1]{inputenc}
+\usepackage[portuges]{babel}
+\newcommand{\veri}{\ensuremath{\hat{\text{i}}}}
+\newcommand{\verj}{\ensuremath{\hat{\text{j}}}}
+\newcommand{\verk}{\ensuremath{\hat{\text{k}}}}
+\newcommand{\emf}{\ensuremath{\mathcal{E}}}
+\newcommand{\startprob}[1]{\vspace{3mm}\noindent\framebox{#1}}
+\begin{document}
+etex
+
+numeric un;
+un = 1mm;
+picture bigotimesp, bigodotp, efieldp, bfieldp, eforcep, bforcep, velocp, ip;
+bigotimesp = btex $\bigotimes $ etex;
+bigodotp = btex $\bigodot $ etex;
+efieldp = btex $\vec{E} $ etex;
+bfieldp = btex $\vec{B} $ etex;
+eforcep = btex $\vec{F}_E $ etex;
+bforcep = btex $\vec{F}_B $ etex;
+velocp = btex $\vec{v} $ etex;
+ip = btex $I$ etex;
+picture amperp, voltip, maiscarga, menoscarg;
+amperp = btex A etex;
+voltip = btex V etex;
+maiscarga = btex $+$ etex;
+menoscarg = btex \rule{0pt}{9pt}$-$ etex;
+
+
+drawoptions( withpen pencircle scaled 0.47un );
+ahlength := 2un;
+ahangle := 25;
+labeloffset := 2un;
+bboxmargin := 0un;
+
+def drawcircledstring( expr Pos )( text TheString ) =
+ begingroup
+ picture strpic;
+ path cirpath;
+ pair llp, urp;
+ numeric diametr;
+ strpic = thelabel( TheString, origin );
+ llp = llcorner strpic;
+ urp = urcorner strpic;
+ diametr = abs( urp - llp );
+ cirpath = fullcircle scaled diametr shifted Pos;
+ unfill cirpath;
+ draw strpic shifted Pos;
+ draw cirpath
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric elen, forcelen, vlen, marginlen;
+ elen = 30un;
+ forcelen = 15un;
+ vlen = 30un;
+ marginlen = 10un;
+ z1 = (-marginlen,forcelen);
+ z2 = (-marginlen,-forcelen);
+ z3 = (0,forcelen);
+ z4 = (0,-forcelen);
+ z5 = (vlen,0);
+ drawarrow z1--z2;
+ drawarrow origin--z3;
+ drawarrow origin--z4;
+ drawarrow origin--z5;
+ label( bigotimesp, origin );
+ label.ulft( efieldp, z2 );
+ label.lft( bfieldp, origin );
+ label.rt( eforcep, z3 );
+ label.rt( bforcep, z4 );
+ label.top( velocp, z5 );
+endfig;
+
+beginfig(2);
+ numeric dlen, altur, vlen, forcelen, marginlen;
+ marginlen = 7un;
+ dlen = 25un;
+ forcelen = 27.5un;
+ altur = 40un;
+ vlen = 15un;
+ z1 = -0.5*(dlen,altur);
+ z2 = 0.5*(dlen,-altur);
+ z5 = 0.5*(-dlen,altur);
+ z6 = 0.5*(dlen,altur);
+ z3 = z1 - (0,marginlen);
+ z4 = z2 - (0,marginlen);
+ z7 = 0.5[z5,z6];
+ z9 = (0,vlen);
+ z8 = z7 + z9;
+ z10= (forcelen,0);
+ z11= (0.5*dlen+marginlen,marginlen);
+ z12= 0.5[z3,z4];
+ draw z1--z2--z6--z5--cycle;
+ drawdblarrow z3--z4;
+ drawarrow origin--z9;
+ drawarrow origin--z10;
+ drawarrow z7--z8;
+ drawcircledstring( origin, menoscarg );
+ label( bigotimesp, z11 );
+ label.lft( velocp, z8 );
+ label.lft( velocp, z9 );
+ label.bot( bforcep, z10 );
+ label.lft( bfieldp, z11 );
+ label.top( btex $d$ etex, z12 );
+endfig;
+
+beginfig(3);
+ numeric dlen, altur, vlen, forcelen, marginlen;
+ numeric marginchar, marginvolt, marginfield, marginforce;
+ numeric ycoo, xcoo, llim, hlim;
+ marginchar = 3un;
+ marginvolt = 10un;
+ marginfield = 5un;
+ marginforce = 6un;
+ marginlen = 7un;
+ dlen = 25un;
+ forcelen = 27.5un;
+ altur = 40un;
+ vlen = 15un;
+ z1 = -0.5*(dlen,altur);
+ z2 = 0.5*(dlen,-altur);
+ z5 = 0.5*(-dlen,altur);
+ z6 = 0.5*(dlen,altur);
+ z3 = z1 - (0,marginlen);
+ z4 = z2 - (0,marginlen);
+ z12= 0.5[z3,z4];
+ z7 = 0.5[z5,z6];
+ z9 = (0,vlen);
+ z8 = z7 + z9;
+ z10= (marginforce-0.5*dlen,0);
+ z11= -z10;
+ z13= (-0.5*dlen+marginfield,0.25*altur);
+ z15= (-0.5*dlen+marginforce,-0.25*altur);
+ z14= (0.5*dlen-marginfield,0.25*altur);
+ z16= (0.5*dlen-marginforce,-0.25*altur);
+ z17= (-0.5*dlen-marginvolt,0);
+ z18= -z17;
+ z19= (-0.5*dlen-marginvolt,-0.5*altur-marginlen-marginvolt);
+ z20= (0.5*dlen+marginvolt,-0.5*altur-marginlen-marginvolt);
+ z21= 0.5[z19,z20];
+ z22= (-0.5*dlen,0);
+ z23= -z22;
+ draw z1--z2--z6--z5--cycle;
+ draw z22--z17--z19--z20--z18--z23;
+ drawdblarrow z3--z4;
+ drawarrow z11--z10;
+ drawarrow z13--z14;
+ drawarrow z15--z16;
+ drawarrow z7--z8;
+ drawcircledstring( z21, btex \rule[-1mm]{0pt}{12pt}V etex );
+ label.lft( velocp, z8 );
+ label.llft( bforcep, z16 );
+ label.llft( efieldp, z14 );
+ label.lrt( eforcep, z10 );
+ label.top( btex $d$ etex, z12 );
+ xcoo = 0.5*dlen-marginchar;
+ llim = -0.5*altur+marginchar;
+ hlim = 0.5*altur-marginchar;
+ for ycoo=llim step marginchar until hlim:
+ label( maiscarga, (-xcoo,ycoo) );
+ label( menoscarg, (xcoo,ycoo) );
+ endfor;
+endfig;
+
+beginfig(4);
+ numeric alen, blen, marginfield, margincurrent, ilen;
+ blen = 40un;
+ alen = 5*blen/12;
+ ilen = 8un;
+ marginfield = 5un;
+ margincurrent = 1.6un;
+ z17 = unitvector( (alen,blen) );
+ z18 = (blen-2*marginfield,0);
+ z1 = origin;
+ z2 = (blen,0);
+ z3 = (0,alen);
+ z4 = 0.25[z1,z2];
+ z5 = 0.45[z2,z3];
+ z6 = 0.35[z3,z1];
+ z7 = 0.5[z1,z2]+margincurrent*down;
+ z8 = z7+ilen*right;
+ z9 = 0.65[z2,z3]+margincurrent*z17;
+ z10= z9+ilen*unitvector((-blen,alen));
+ z11= 0.5[z3,z1]+margincurrent*left;
+ z12= z11+ilen*down;
+ z13= marginfield*(1,-1);
+ z14= z13+z18;
+ z15= z3+marginfield*(1,1);
+ z16= z15+z18;
+ draw z1--z2--z3--cycle;
+ drawarrow z7--z8;
+ drawarrow z9--z10;
+ drawarrow z11--z12;
+ drawarrow z13--z14;
+ drawarrow z15--z16;
+ label.llft( bfieldp, z14 );
+ label.llft( bfieldp, z16 );
+ label.rt( ip, z8 );
+ label.ulft( ip, z10 );
+ label.bot( ip, z12 );
+ label.top( btex $b$ etex, z4 );
+ label.bot( btex $c$ etex, z5 );
+ label.rt( btex $a$ etex, z6 );
+endfig;
+
+beginfig(5);
+ numeric alen, blen, marginfield, margincurrent, ilen;
+ blen = 40un;
+ alen = 5*blen/12;
+ ilen = 8un;
+ marginfield = 5un;
+ margincurrent = 1.6un;
+ z17 = unitvector( (alen,blen) );
+ z18 = (blen-2*marginfield,0);
+ z1 = origin;
+ z2 = (blen,0);
+ z3 = (0,alen);
+ z4 = 0.25[z1,z2];
+ z5 = 0.45[z2,z3];
+ z6 = 0.35[z3,z1];
+ z7 = 0.5[z1,z2]+margincurrent*down;
+ z8 = z7+ilen*right;
+ z9 = 0.5[z2,z3]+margincurrent*z17;
+ z10= z9+ilen*unitvector((-blen,alen));
+ z11= 0.5[z3,z1]+margincurrent*left;
+ z12= z11+ilen*down;
+ z13= 0.65[z3,z1];
+ z14= z13+z18;
+ z15= z3+marginfield*(1,1);
+ z16= z15+z18;
+ drawarrow z11--z12;
+ drawarrow z13--z14;
+ drawarrow z3--z1;
+ label.llft( bfieldp, z14 );
+ label.bot( ip, z12 );
+ label.rt( btex $\vec{a}$ etex, z6 );
+ label.lrt( bigodotp, z13 );
+ label.lrt( btex $\vec{F}_a$ etex, 0.13[z13,z14] );
+endfig;
+
+beginfig(6);
+ numeric alen, blen, marginfield, margincurrent, ilen;
+ blen = 40un;
+ alen = 5*blen/12;
+ ilen = 8un;
+ marginfield = 5un;
+ margincurrent = 1.6un;
+ z17 = unitvector( (alen,blen) );
+ z18 = (blen-2*marginfield,0);
+ z1 = origin;
+ z2 = (blen,0);
+ z3 = (0,alen);
+ z4 = 0.25[z1,z2];
+ z5 = 0.45[z2,z3];
+ z6 = 0.35[z3,z1];
+ z7 = 0.5[z1,z2]+margincurrent*down;
+ z8 = z7+ilen*right;
+ z9 = 0.5[z2,z3]+margincurrent*z17;
+ z10= z9+ilen*unitvector((-blen,alen));
+ z11= 0.5[z3,z1]+margincurrent*left;
+ z12= z11+ilen*down;
+ z13= marginfield*(1,-1);
+ z14= z13+z18;
+ z15= z3+marginfield*(1,1);
+ z16= z15+z18;
+% drawarrow z11--z12;
+ drawarrow z13--z14;
+ drawarrow z1--z2;
+ label.llft( bfieldp, z14 );
+% label.bot( ip, z12 );
+ label.top( btex $\vec{b}$ etex, z4 );
+% label.lrt( bigodotp, z13 );
+% label.lrt( btex $\vec{F}_a$ etex, 0.13[z13,z14] );
+endfig;
+
+beginfig(7);
+ numeric alen, blen, marginfield, margincurrent, ilen, ralpha, rphi;
+ path pc, pb, palpha, pphi;
+ ralpha = 6un;
+ rphi = 4un;
+ blen = 40un;
+ alen = 5*blen/12;
+ ilen = 8un;
+ marginfield = 5un;
+ margincurrent = 1.6un;
+ z17 = unitvector( (alen,blen) );
+ z18 = (blen-2*marginfield,0);
+ z1 = origin;
+ z2 = (blen,0);
+ z3 = (0,alen);
+ z4 = 0.25[z1,z2];
+ z5 = 0.45[z2,z3];
+ z6 = 0.35[z3,z1];
+ z7 = 0.5[z1,z2]+margincurrent*down;
+ z8 = z7+ilen*right;
+ z9 = 0.65[z2,z3]+margincurrent*z17;
+ z10= z9+ilen*unitvector((-blen,alen));
+ z11= 0.5[z3,z1]+margincurrent*left;
+ z12= z11+ilen*down;
+ z14= z2+ilen*up;
+ z13= z14-z18;
+ pb = z13--z14;
+ pc = z2--z3;
+ z19 = pb intersectionpoint pc;
+ pphi = halfcircle scaled 2rphi shifted z19 cutafter pc;
+ palpha = halfcircle scaled 2ralpha shifted z19 cutbefore pc;
+ z20 = pphi intersectionpoint (z19--(z19+1.1*rphi*dir(0.5*angle((-blen,alen)))));
+ z21 = palpha intersectionpoint (z19--(z19+1.1*ralpha*dir(180-0.5*angle((blen,alen)))));
+ label.lft( btex $\alpha$ etex, z21 );
+ label.top( btex $\phi$ etex, z20 );
+ draw pphi;
+ draw palpha;
+ drawarrow pc;
+ drawarrow z9--z10;
+ drawarrow pb;
+ label.llft( bfieldp, z14 );
+ label.ulft( ip, z10 );
+ label.bot( btex $\vec{c}$ etex, z5 );
+endfig;
+
+beginfig(8);
+ numeric raya, rayb, angs, angf, angr;
+ path pc, pd, ps, pf, pr, pI;
+ raya = 9un;
+ rayb = 11un;
+ angs = 15;
+ angf = 64;
+ angr = 240;
+ pc = fullcircle scaled 2raya;
+ pd = fullcircle scaled 2rayb;
+ ps = origin--1.1*rayb*dir(angs);
+ pf = origin--1.1*rayb*dir(angf);
+ pr = origin--raya*dir(angr);
+ pI = pd cutbefore ps cutafter pf;
+ draw pc;
+ draw pr;
+ drawarrow pI;
+ label.top( btex $R$ etex, 0.5*raya*dir(angr) );
+ label.rt( btex $A$ etex, origin );
+ label.top( btex $I$ etex, point 0.5 of pI );
+endfig;
+
+beginfig(9);
+ numeric raya, rayb, ang, lenf, lenb, lenm;
+ path pc, pm;
+ raya = 11un;
+ rayb = 0.5raya;
+ ang = 41;
+ lenm = 1.35raya;
+ lenf = 1.25lenm;
+ lenb = 0.4lenm;
+ z1 = (lenf,0);
+ z2 = lenm*dir(ang);
+ pm = origin--z2;
+ z3 = raya*dir(ang+90);
+ z4 = (-lenb,0);
+ z5 = raya*dir(ang+270);
+ z6 = rayb*dir(0.5*ang);
+ pc = halfcircle scaled 2rayb cutafter pm;
+ drawarrow z4--z1;
+ drawarrow pm;
+ draw z3--z5;
+ draw pc;
+ label.rt( btex $41\degree$ etex, z6 );
+ label.rt( btex $\vec{\mu}$ etex, z2 );
+ label.llft( bfieldp, z1 );
+ label( bigotimesp, origin );
+ label.llft( btex $\vec{\tau}$ etex, origin );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/caratk3edit.mp b/Master/texmf-dist/doc/metapost/featpost/example/caratk3edit.mp
new file mode 100644
index 00000000000..556445497a1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/caratk3edit.mp
@@ -0,0 +1,339 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin_AT_uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2007 Wolfgang Glunz <wglunz34_AT_pstoedit.net>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+% Modified by L. Nobre G's Lex scanner %%%%%%%%%%%
+randomseed := 1010;
+vardef renewcolore =
+ color tmpcolo;
+ tmpcolo = (uniformdeviate(0.8),uniformdeviate(0.8),uniformdeviate(0.8));
+ drawoptions( withcolor tmpcolo );
+enddef;
+defaultscale := 0.16;
+beginfig(1);
+ path PreeditedPath[];
+linecap := butt;
+linejoin := mitered;
+ PreeditedPath1 = hide(z1=(136.781,601.332))z1..controls hide(z2=(136.207,600.809))z2 and hide(z3=(125.922,599.672))z3..hide(z4=(113.77,598.793))z4
+ ..controls hide(z5=(93.6016,597.332))z5 and hide(z6=(75.6953,595.555))z6..hide(z7=(64.125,593.867))z7
+ ..controls hide(z8=(57.7227,592.934))z8 and hide(z9=(57.3164,592.113))z9..hide(z10=(55.6055,576.598))z10
+ ..controls hide(z11=(54.7539,568.84))z11 and hide(z12=(53.5117,560.848))z12..hide(z13=(52.8789,559.016))z13
+ ..controls hide(z14=(51.4531,554.879))z14 and hide(z15=(51.4531,554.879))z15..hide(z16=(71.1055,563.672))z16
+ ..controls hide(z17=(80.6719,567.953))z17 and hide(z18=(90.2812,571.426))z18..hide(z19=(92.5664,571.426))z19
+ ..controls hide(z20=(97.2188,571.426))z20 and hide(z21=(118.938,558.223))z21..hide(z22=(118.938,555.395))z22
+ ..controls hide(z23=(118.938,549.949))z23 and hide(z24=(131.609,554.68))z24..hide(z25=(143.246,564.469))z25
+ ..controls hide(z26=(150.484,570.559))z26 and hide(z27=(158.238,576.262))z27..hide(z28=(160.438,577.113))z28
+ ..controls hide(z29=(162.883,578.062))z29 and hide(z30=(172.723,572.715))z30..hide(z31=(185.648,563.41))z31
+ ..controls hide(z32=(197.285,555.039))z32 and hide(z33=(207.551,548.156))z33..hide(z34=(208.402,548.156))z34
+ ..controls hide(z35=(209.254,548.156))z35 and hide(z36=(213.574,551.191))z36..hide(z37=(217.969,554.879))z37
+ ..controls hide(z38=(225.984,561.602))z38 and hide(z39=(225.984,561.602))z39..hide(z40=(228.266,555.652))z40
+ ..controls hide(z41=(230.461,549.926))z41 and hide(z42=(230.965,528.246))z42..hide(z43=(229.516,501.613))z43
+ ..controls hide(z44=(228.816,488.703))z44 and hide(z45=(229.348,488.883))z45..hide(z46=(201.68,492.254))z46
+ ..controls hide(z47=(178.668,495.055))z47 and hide(z48=(168.094,498.582))z48..hide(z49=(169.715,502.906))z49
+ ..controls hide(z50=(170.492,504.977))z50 and hide(z51=(172.254,506.785))z51..hide(z52=(173.496,506.785))z52
+ ..controls hide(z53=(178.238,506.785))z53 and hide(z54=(175.566,513.844))z54..hide(z55=(169.617,517.027))z55
+ ..controls hide(z56=(164.188,519.938))z56 and hide(z57=(162.41,519.91))z57..hide(z58=(158.5,516.871))z58
+ ..controls hide(z59=(155.914,514.859))z59 and hide(z60=(152.695,512.387))z60..hide(z61=(151.262,511.309))z61
+ ..controls hide(z62=(149.855,510.258))z62 and hide(z63=(144.539,505.879))z63..hide(z64=(139.625,501.73))z64
+ ..controls hide(z65=(129.418,493.113))z65 and hide(z66=(127.215,493.512))z66..hide(z67=(102.91,508.375))z67
+ --hide(z68=(88.1719,517.387))z68--hide(z69=(72.3984,508.961))z69..controls hide(z70=(50.4219,497.223))z70 and hide(z71=(46.543,493.016))z71..hide(z72=(46.543,480.93))z72
+ ..controls hide(z73=(46.543,475.242))z73 and hide(z74=(47.2969,470.586))z74..hide(z75=(48.2227,470.586))z75
+ ..controls hide(z76=(49.1367,470.586))z76 and hide(z77=(57.918,473.5))z77..hide(z78=(67.4844,476.98))z78
+ ..controls hide(z79=(85.5859,483.562))z79 and hide(z80=(113.27,488.316))z80..hide(z81=(127.473,487.281))z81
+ ..controls hide(z82=(139.109,486.434))z82 and hide(z83=(167.711,483.555))z83..hide(z84=(177.891,482.203))z84
+ ..controls hide(z85=(188.75,480.762))z85 and hide(z86=(219.004,468.781))z86..hide(z87=(228.312,462.234))z87
+ ..controls hide(z88=(234.777,457.688))z88 and hide(z89=(236.023,457.551))z89..hide(z90=(239.949,460.98))z90
+ ..controls hide(z91=(244.086,464.594))z91 and hide(z92=(260.199,473.633))z92..hide(z93=(261.668,473.16))z93
+ ..controls hide(z94=(262.086,473.027))z94 and hide(z95=(265.547,474.047))z95..hide(z96=(269.164,475.371))z96
+ ..controls hide(z97=(272.922,476.742))z97 and hide(z98=(279.766,478.512))z98..hide(z99=(284.68,479.379))z99
+ ..controls hide(z100=(289.59,480.246))z100 and hide(z101=(296.891,481.555))z101..hide(z102=(301.227,482.352))z102
+ ..controls hide(z103=(305.492,483.133))z103 and hide(z104=(320.621,484.117))z104..hide(z105=(334.84,484.535))z105
+ ..controls hide(z106=(361.473,485.324))z106 and hide(z107=(378.926,482.516))z107..hide(z108=(405.168,473.219))z108
+ ..controls hide(z109=(413.184,470.383))z109 and hide(z110=(420.262,468))z110..hide(z111=(420.684,468))z111
+ ..controls hide(z112=(421.105,468))z112 and hide(z113=(421.461,473.688))z113..hide(z114=(421.461,480.41))z114
+ ..controls hide(z115=(421.461,493.637))z115 and hide(z116=(422.754,492.359))z116..hide(z117=(391.984,509.539))z117
+ --hide(z118=(379.312,516.609))z118--hide(z119=(362.25,505.234))z119..controls hide(z120=(352.941,499.027))z120 and hide(z121=(343.715,493.855))z121..hide(z122=(341.949,493.855))z122
+ ..controls hide(z123=(340.156,493.855))z123 and hide(z124=(332.512,499.512))z124..hide(z125=(324.758,506.586))z125
+ ..controls hide(z126=(311.051,519.074))z126 and hide(z127=(308.449,520.031))z127..hide(z128=(299.16,515.973))z128
+ ..controls hide(z129=(293.5,513.504))z129 and hide(z130=(293.477,509.887))z130..hide(z131=(299.082,503.684))z131
+ ..controls hide(z132=(304.156,498.066))z132 and hide(z133=(302.777,496.148))z133..hide(z134=(292.953,495.125))z134
+ ..controls hide(z135=(288.93,494.707))z135 and hide(z136=(280.543,493.559))z136..hide(z137=(274.078,492.539))z137
+ ..controls hide(z138=(250.547,488.832))z138 and hide(z139=(242.957,489.09))z139..hide(z140=(242.66,493.598))z140
+ ..controls hide(z141=(241.953,504.457))z141 and hide(z142=(242.695,558.922))z142..hide(z143=(243.566,559.793))z143
+ ..controls hide(z144=(244.141,560.363))z144 and hide(z145=(248.352,557.422))z145..hide(z146=(253.004,553.199))z146
+ ..controls hide(z147=(261.41,545.57))z147 and hide(z148=(261.41,545.57))z148..hide(z149=(272.27,552.422))z149
+ ..controls hide(z150=(278.215,556.176))z150 and hide(z151=(287.223,562.418))z151..hide(z152=(292.176,566.227))z152
+ ..controls hide(z153=(308.059,578.43))z153 and hide(z154=(306.914,578.707))z154..hide(z155=(340.527,554.566))z155
+ ..controls hide(z156=(345.895,550.715))z156 and hide(z157=(346.992,551.004))z157..hide(z158=(359.922,559.66))z158
+ ..controls hide(z159=(367.418,564.684))z159 and hide(z160=(376.375,568.84))z160..hide(z161=(379.703,568.84))z161
+ ..controls hide(z162=(383.016,568.84))z162 and hide(z163=(392.242,565.309))z163..hide(z164=(400,561.074))z164
+ ..controls hide(z165=(417.324,551.613))z165 and hide(z166=(419.172,551.559))z166..hide(z167=(417.348,560.566))z167
+ ..controls hide(z168=(416.086,566.789))z168 and hide(z169=(415.027,574.789))z169..hide(z170=(413.953,586.164))z170
+ ..controls hide(z171=(413.59,590.059))z171 and hide(z172=(400,592.863))z172..hide(z173=(365.867,596.09))z173
+ ..controls hide(z174=(355.785,597.043))z174 and hide(z175=(343.188,598.32))z175..hide(z176=(337.426,598.977))z176
+ ..controls hide(z177=(324.758,600.414))z177 and hide(z178=(138.176,602.605))z178..cycle;
+ renewcolore;
+ %%%draw PreeditedPath1;
+ %%%dotlabels.rt(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178);
+ PreeditedPath2 = hide(z179=(157.293,559.016))z179..controls hide(z180=(155.93,555.562))z180 and hide(z181=(130.316,537.812))z181..hide(z182=(126.695,537.812))z182
+ ..controls hide(z183=(123.594,537.812))z183 and hide(z184=(108.777,545.199))z184..hide(z185=(105.953,548.156))z185
+ ..controls hide(z186=(105.266,548.875))z186 and hide(z187=(101.617,551.461))z187..hide(z188=(97.7383,553.973))z188
+ ..controls hide(z189=(90.8516,558.438))z189 and hide(z190=(90.4961,558.363))z190..hide(z191=(71.8789,548.543))z191
+ ..controls hide(z192=(61.5391,543.09))z192 and hide(z193=(49.6758,537.77))z193..hide(z194=(45.6367,536.777))z194
+ ..controls hide(z195=(38.4258,535.008))z195 and hide(z196=(38.3047,534.711))z196..hide(z197=(40.0781,522.816))z197
+ ..controls hide(z198=(41.0781,516.094))z198 and hide(z199=(42.4062,510.145))z199..hide(z200=(43.0508,509.5))z200
+ ..controls hide(z201=(43.6914,508.859))z201 and hide(z202=(54.2969,513.68))z202..hide(z203=(66.7109,520.254))z203
+ ..controls hide(z204=(91.7891,533.539))z204 and hide(z205=(92.2734,533.531))z205..hide(z206=(114.027,519.523))z206
+ --hide(z207=(126.18,511.699))z207--hide(z208=(143.504,523.516))z208..controls hide(z209=(162.379,536.391))z209 and hide(z210=(166.609,537.348))z210..hide(z211=(175.824,530.824))z211
+ ..controls hide(z212=(189.527,521.125))z212 and hide(z213=(193.934,516.008))z213..hide(z214=(192.52,511.441))z214
+ ..controls hide(z215=(191.719,508.855))z215 and hide(z216=(191.422,506.715))z216..hide(z217=(191.855,506.629))z217
+ ..controls hide(z218=(201.68,504.664))z218 and hide(z219=(217.156,504.129))z219..hide(z220=(217.301,505.75))z220
+ ..controls hide(z221=(219.555,531.348))z221 and hide(z222=(217.371,539.543))z222..hide(z223=(210.211,532.383))z223
+ ..controls hide(z224=(208.156,530.328))z224 and hide(z225=(201.422,533.91))z225..hide(z226=(185.906,545.316))z226
+ ..controls hide(z227=(164.965,560.711))z227 and hide(z228=(159.074,563.531))z228..cycle;
+ renewcolore;
+ %%%draw PreeditedPath2;
+ %%%dotlabels.rt(179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228);
+ PreeditedPath3 = hide(z229=(287.266,545.551))z229..controls hide(z230=(264.77,529.469))z230 and hide(z231=(262.457,528.379))z231..hide(z232=(259.805,532.641))z232
+ ..controls hide(z233=(256.047,538.676))z233 and hide(z234=(254.02,533.934))z234..hide(z235=(253.719,518.422))z235
+ ..controls hide(z236=(253.395,501.613))z236 and hide(z237=(253.395,501.613))z237..hide(z238=(263.219,503.09))z238
+ ..controls hide(z239=(277.438,505.223))z239 and hide(z240=(279.07,506.164))z240..hide(z241=(277.652,511.441))z241
+ ..controls hide(z242=(276.738,514.844))z242 and hide(z243=(279.25,517.988))z243..hide(z244=(287.008,523.16))z244
+ ..controls hide(z245=(306.656,536.262))z245 and hide(z246=(308.102,536.277))z246..hide(z247=(325.016,523.523))z247
+ ..controls hide(z248=(333.289,517.285))z248 and hide(z249=(341.578,512.156))z249..hide(z250=(343.504,512.086))z250
+ ..controls hide(z251=(345.395,512.016))z251 and hide(z252=(353.973,516.176))z252..hide(z253=(362.25,521.18))z253
+ ..controls hide(z254=(379.656,531.703))z254 and hide(z255=(383.969,531.332))z255..hide(z256=(404.395,517.547))z256
+ ..controls hide(z257=(417.062,509))z257 and hide(z258=(425.559,505.672))z258..hide(z259=(427.246,508.594))z259
+ ..controls hide(z260=(427.902,509.73))z260 and hide(z261=(429.258,514.93))z261..hide(z262=(430.25,520.102))z262
+ ..controls hide(z263=(431.789,528.117))z263 and hide(z264=(431.281,529.793))z264..hide(z265=(426.891,531.219))z265
+ ..controls hide(z266=(424.043,532.145))z266 and hide(z267=(413.703,537.293))z267..hide(z268=(403.879,542.68))z268
+ ..controls hide(z269=(378.277,556.715))z269 and hide(z270=(379.137,556.656))z270..hide(z271=(362.25,545.398))z271
+ ..controls hide(z272=(353.973,539.883))z272 and hide(z273=(345.809,535.227))z273..hide(z274=(344.406,535.227))z274
+ ..controls hide(z275=(341.977,535.227))z275 and hide(z276=(320.359,550.945))z276..hide(z277=(313.379,557.789))z277
+ ..controls hide(z278=(311.57,559.562))z278 and hide(z279=(309.781,561.082))z279..hide(z280=(309.5,561.082))z280
+ ..controls hide(z281=(309.219,561.082))z281 and hide(z282=(299.16,554.059))z282..cycle;
+ renewcolore;
+ %%%draw PreeditedPath3;
+ %%%dotlabels.rt(229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282);
+ PreeditedPath4 = hide(z283=(115.836,474.383))z283..controls hide(z284=(115.414,474.004))z284 and hide(z285=(108.855,472.969))z285..hide(z286=(101.355,472.098))z286
+ ..controls hide(z287=(83.2578,470))z287 and hide(z288=(58.0664,461.602))z288..hide(z289=(45.7656,453.566))z289
+ ..controls hide(z290=(37.75,448.328))z290 and hide(z291=(36.1445,445.766))z291..hide(z292=(35.8633,437.75))z292
+ ..controls hide(z293=(34.9023,410.34))z293 and hide(z294=(36.957,405.855))z294..hide(z295=(45.6914,416.289))z295
+ ..controls hide(z296=(67.9297,442.84))z296 and hide(z297=(126.18,452.973))z297..hide(z298=(178.41,439.375))z298
+ ..controls hide(z299=(190.305,436.281))z299 and hide(z300=(210.652,423.285))z300..hide(z301=(215.777,415.512))z301
+ ..controls hide(z302=(220.012,409.086))z302 and hide(z303=(220.012,408.531))z303..hide(z304=(215.859,321.137))z304
+ ..controls hide(z305=(215.172,306.656))z305 and hide(z306=(214.898,294.762))z306..hide(z307=(215.254,294.762))z307
+ ..controls hide(z308=(215.605,294.762))z308 and hide(z309=(223.656,294.059))z309..hide(z310=(232.965,293.211))z310
+ ..controls hide(z311=(243.824,292.223))z311 and hide(z312=(250.699,292.695))z312..hide(z313=(251.867,294.504))z313
+ ..controls hide(z314=(254.336,298.336))z314 and hide(z315=(254.438,314.156))z315..hide(z316=(252.25,355.527))z316
+ ..controls hide(z317=(249.855,400.773))z317 and hide(z318=(250.184,408.273))z318..hide(z319=(254.859,415.512))z319
+ ..controls hide(z320=(259.375,422.504))z320 and hide(z321=(276.145,434.113))z321..hide(z322=(283.902,435.613))z322
+ ..controls hide(z323=(287.008,436.215))z323 and hide(z324=(290.531,437.273))z324..hide(z325=(291.66,437.945))z325
+ ..controls hide(z326=(295.078,439.977))z326 and hide(z327=(321.395,442.863))z327..hide(z328=(340.012,443.246))z328
+ ..controls hide(z329=(360.438,443.668))z329 and hide(z330=(383.953,439.043))z330..hide(z331=(397.93,431.859))z331
+ ..controls hide(z332=(410.34,425.48))z332 and hide(z333=(426.988,411.098))z333..hide(z334=(425.234,408.273))z334
+ ..controls hide(z335=(424.363,406.875))z335 and hide(z336=(424.719,405.945))z336..hide(z337=(426.113,405.945))z337
+ ..controls hide(z338=(431.809,405.945))z338 and hide(z339=(434.047,430.77))z339..hide(z340=(429.445,442.922))z340
+ ..controls hide(z341=(425.523,453.285))z341 and hide(z342=(396.121,466.371))z342..hide(z343=(369.746,469.484))z343
+ ..controls hide(z344=(321.137,475.227))z344 and hide(z345=(278.848,468.273))z345..hide(z346=(249.516,449.711))z346
+ ..controls hide(z347=(235.895,441.094))z347 and hide(z348=(237.102,440.926))z348..hide(z349=(212.797,454.836))z349
+ ..controls hide(z350=(201.375,461.375))z350 and hide(z351=(190.82,465.438))z351..hide(z352=(174.531,469.566))z352
+ ..controls hide(z353=(162.121,472.715))z353 and hide(z354=(118.023,476.332))z354..cycle;
+ renewcolore;
+ %%%draw PreeditedPath4;
+ %%%dotlabels.rt(283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354);
+ PreeditedPath5 = hide(z355=(92.8242,426.75))z355..controls hide(z356=(76.793,421.73))z356 and hide(z357=(55.9102,408.535))z357..hide(z358=(51.7109,400.773))z358
+ ..controls hide(z359=(49.1953,396.129))z359 and hide(z360=(49.5352,381.125))z360..hide(z361=(53.0586,341.047))z361
+ ..controls hide(z362=(53.875,331.738))z362 and hide(z363=(55.0859,321.16))z363..hide(z364=(55.7188,317.773))z364
+ ..controls hide(z365=(56.3516,314.406))z365 and hide(z366=(57.5898,307.434))z366..hide(z367=(58.4336,302.52))z367
+ ..controls hide(z368=(60.5547,290.109))z368 and hide(z369=(69.25,267.414))z369..hide(z370=(73.1719,264.039))z370
+ ..controls hide(z371=(75.7539,261.82))z371 and hide(z372=(78.3516,263.734))z372..hide(z373=(84.3516,272.27))z373
+ ..controls hide(z374=(101.293,296.363))z374 and hide(z375=(138.848,313.016))z375..hide(z376=(184.613,316.723))z376
+ ..controls hide(z377=(190.043,317.16))z377 and hide(z378=(194.754,317.863))z378..hide(z379=(195.145,318.293))z379
+ ..controls hide(z380=(196.121,319.367))z380 and hide(z381=(198.75,349.062))z381..hide(z382=(200.617,380.09))z382
+ ..controls hide(z383=(201.766,399.223))z383 and hide(z384=(201.25,403.172))z384..hide(z385=(196.605,410.598))z385
+ ..controls hide(z386=(191.781,418.32))z386 and hide(z387=(180.996,424.793))z387..hide(z388=(167.031,428.352))z388
+ ..controls hide(z389=(164.031,429.113))z389 and hide(z390=(149.449,430.082))z390..hide(z391=(134.453,430.508))z391
+ ..controls hide(z392=(114.285,431.086))z392 and hide(z393=(103.582,430.117))z393..cycle;
+ renewcolore;
+ %%%draw PreeditedPath5;
+ %%%dotlabels.rt(355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393);
+ PreeditedPath6 = hide(z394=(166.773,417.551))z394..controls hide(z395=(178.926,409.805))z395 and hide(z396=(183.246,404.352))z396..hide(z397=(185.59,393.793))z397
+ ..controls hide(z398=(189.672,375.434))z398 and hide(z399=(182.383,357.863))z399..hide(z400=(167.289,349.672))z400
+ ..controls hide(z401=(160.973,346.242))z401 and hide(z402=(152.293,345.09))z402..hide(z403=(130.574,344.797))z403
+ ..controls hide(z404=(104.461,344.438))z404 and hide(z405=(101.137,344.945))z405..hide(z406=(89.9805,350.973))z406
+ ..controls hide(z407=(73.0039,360.145))z407 and hide(z408=(70.1602,365.352))z408..hide(z409=(70.6719,386.293))z409
+ ..controls hide(z410=(71.0781,402.844))z410 and hide(z411=(71.6211,404.305))z411..hide(z412=(79.8945,411.172))z412
+ ..controls hide(z413=(92.1172,421.312))z413 and hide(z414=(103.426,423.848))z414..hide(z415=(133.16,423.125))z415
+ ..controls hide(z416=(153.07,422.637))z416 and hide(z417=(160.801,421.355))z417..cycle;
+ renewcolore;
+ %%%draw PreeditedPath6;
+ %%%dotlabels.rt(394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417);
+ PreeditedPath7 = hide(z418=(319.328,429.711))z418..controls hide(z419=(304.328,428.168))z419 and hide(z420=(285.598,421.395))z420..hide(z421=(277.957,414.754))z421
+ ..controls hide(z422=(270.199,408.016))z422 and hide(z423=(270.199,408.016))z423..hide(z424=(270.848,363.801))z424
+ ..controls hide(z425=(271.199,339.496))z425 and hide(z426=(272.367,318.77))z426..hide(z427=(273.43,317.773))z427
+ ..controls hide(z428=(274.504,316.773))z428 and hide(z429=(282.867,315.352))z429..hide(z430=(292.176,314.586))z430
+ ..controls hide(z431=(322.43,312.109))z431 and hide(z432=(349.387,301.004))z432..hide(z433=(370.004,282.531))z433
+ ..controls hide(z434=(377.246,276.043))z434 and hide(z435=(384.23,267.918))z435..hide(z436=(385.496,264.512))z436
+ ..controls hide(z437=(388.723,255.828))z437 and hide(z438=(392.137,257.012))z438..hide(z439=(398.156,268.906))z439
+ ..controls hide(z440=(406.961,286.309))z440 and hide(z441=(412.965,314.156))z441..hide(z442=(414.879,346.477))z442
+ ..controls hide(z443=(415.508,357.078))z443 and hide(z444=(416.734,372.727))z444..hide(z445=(417.582,380.992))z445
+ ..controls hide(z446=(419.117,395.992))z446 and hide(z447=(419.047,396.199))z447..hide(z448=(409.309,405.184))z448
+ ..controls hide(z449=(400.258,413.527))z449 and hide(z450=(387.367,421.762))z450..hide(z451=(381.383,423.016))z451
+ ..controls hide(z452=(361.473,427.191))z452 and hide(z453=(351.066,428.766))z453..hide(z454=(336.133,429.852))z454
+ ..controls hide(z455=(331.219,430.207))z455 and hide(z456=(323.539,430.145))z456..cycle;
+ renewcolore;
+ %%%draw PreeditedPath7;
+ %%%dotlabels.rt(418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456);
+ PreeditedPath8 = hide(z457=(365.867,420.535))z457..controls hide(z458=(386.812,415.41))z458 and hide(z459=(394.578,407.562))z459..hide(z460=(396.934,389.141))z460
+ ..controls hide(z461=(398.883,373.883))z461 and hide(z462=(395.469,363.449))z462..hide(z463=(385.777,355.023))z463
+ ..controls hide(z464=(375.578,346.16))z464 and hide(z465=(363.539,343.035))z465..hide(z466=(338.719,342.801))z466
+ ..controls hide(z467=(320.359,342.633))z467 and hide(z468=(314.613,343.66))z468..hide(z469=(303.812,349.062))z469
+ ..controls hide(z470=(295.797,353.07))z470 and hide(z471=(289.52,358.375))z471..hide(z472=(287.289,363.023))z472
+ ..controls hide(z473=(283.066,371.828))z473 and hide(z474=(282.941,390.949))z474..hide(z475=(287.039,400.773))z475
+ ..controls hide(z476=(290.32,408.637))z476 and hide(z477=(307.434,419.148))z477..hide(z478=(320.621,421.398))z478
+ ..controls hide(z479=(330.445,423.078))z479 and hide(z480=(357.594,422.559))z480..cycle;
+ renewcolore;
+ %%%draw PreeditedPath8;
+ %%%dotlabels.rt(457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480);
+ PreeditedPath9 = hide(z481=(183.32,304.07))z481..controls hide(z482=(182.762,303.512))z482 and hide(z483=(178.152,302.418))z483..hide(z484=(173.238,301.684))z484
+ ..controls hide(z485=(157.07,299.266))z485 and hide(z486=(152.035,297.691))z486..hide(z487=(134.969,289.703))z487
+ ..controls hide(z488=(75.7578,261.984))z488 and hide(z489=(65.9453,218.688))z489..hide(z490=(106.113,162.379))z490
+ ..controls hide(z491=(127.324,132.645))z491 and hide(z492=(129.184,130.402))z492..hide(z493=(150.711,108.598))z493
+ ..controls hide(z494=(201.766,56.8828))z494 and hide(z495=(234.418,36.8555))z495..hide(z496=(245.555,50.4219))z496
+ ..controls hide(z497=(247.254,52.4883))z497 and hide(z498=(249.824,54.2969))z498..hide(z499=(251.066,54.2969))z499
+ ..controls hide(z500=(260.082,54.2969))z500 and hide(z501=(322.727,110.148))z501..hide(z502=(340.977,134.453))z502
+ ..controls hide(z503=(344.664,139.367))z503 and hide(z504=(348.984,144.805))z504..hide(z505=(350.43,146.348))z505
+ ..controls hide(z506=(358.02,154.461))z506 and hide(z507=(376.469,185.906))z507..hide(z508=(380.312,197.285))z508
+ ..controls hide(z509=(385.555,212.797))z509 and hide(z510=(384.996,233.473))z510..hide(z511=(378.996,246.152))z511
+ ..controls hide(z512=(366.691,272.152))z512 and hide(z513=(328.637,296.117))z513..hide(z514=(290.883,301.645))z514
+ ..controls hide(z515=(286.488,302.285))z515 and hide(z516=(280.605,303.227))z516..hide(z517=(277.309,303.812))z517
+ ..controls hide(z518=(272.703,304.633))z518 and hide(z519=(271.492,303.555))z519..hide(z520=(271.492,298.641))z520
+ ..controls hide(z521=(271.492,291.242))z521 and hide(z522=(272.527,290.469))z522..hide(z523=(284.938,288.574))z523
+ ..controls hide(z524=(297.043,286.727))z524 and hide(z525=(313.898,280.137))z525..hide(z526=(326.309,272.398))z526
+ ..controls hide(z527=(339.352,264.266))z527 and hide(z528=(347.293,248.223))z528..hide(z529=(347.363,229.863))z529
+ ..controls hide(z530=(347.465,203.504))z530 and hide(z531=(331.738,187.492))z531..hide(z532=(296.832,178.406))z532
+ ..controls hide(z533=(281.016,174.293))z533 and hide(z534=(270.199,173.602))z534..hide(z535=(230.121,174.141))z535
+ ..controls hide(z536=(175.566,174.875))z536 and hide(z537=(157.633,178.863))z537..hide(z538=(136.523,194.965))z538
+ ..controls hide(z539=(108.207,216.559))z539 and hide(z540=(114.027,260.922))z540..hide(z541=(147.383,277.742))z541
+ ..controls hide(z542=(156.949,282.566))z542 and hide(z543=(178.668,289.215))z543..hide(z544=(188.234,290.25))z544
+ ..controls hide(z545=(192.891,290.75))z545 and hide(z546=(196.508,291.934))z546..hide(z547=(196.508,292.953))z547
+ ..controls hide(z548=(196.508,293.949))z548 and hide(z549=(196.508,297.09))z549..hide(z550=(196.508,299.934))z550
+ ..controls hide(z551=(196.508,303.676))z551 and hide(z552=(194.828,305.105))z552..hide(z553=(190.434,305.105))z553
+ ..controls hide(z554=(187.07,305.105))z554 and hide(z555=(183.895,304.645))z555..cycle;
+ renewcolore;
+ %%%draw PreeditedPath9;
+ %%%dotlabels.rt(481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555);
+ PreeditedPath10 = hide(z556=(214.348,278.086))z556..controls hide(z557=(213.785,277.594))z557 and hide(z558=(206.594,276.473))z558..hide(z559=(198.578,275.629))z559
+ ..controls hide(z560=(167.289,272.336))z560 and hide(z561=(138.164,257.289))z561..hide(z562=(136.512,243.566))z562
+ ..controls hide(z563=(135.078,231.672))z563 and hide(z564=(139.324,214.027))z564..hide(z565=(145.094,207.887))z565
+ ..controls hide(z566=(151.16,201.426))z566 and hide(z567=(171.43,192.082))z567..hide(z568=(184.098,189.906))z568
+ ..controls hide(z569=(202.457,186.746))z569 and hide(z570=(270.727,187))z570..hide(z571=(286.746,190.281))z571
+ ..controls hide(z572=(318.293,196.75))z572 and hide(z573=(331.578,210.402))z573..hide(z574=(330.047,234.777))z574
+ ..controls hide(z575=(329.25,247.445))z575 and hide(z576=(328.191,249.797))z576..hide(z577=(320.359,256.324))z577
+ ..controls hide(z578=(306.219,268.109))z578 and hide(z579=(288.816,273.094))z579..hide(z580=(253.652,275.441))z580
+ ..controls hide(z581=(241.5,276.25))z581 and hide(z582=(227.781,277.391))z582..hide(z583=(223.398,277.957))z583
+ ..controls hide(z584=(219.004,278.523))z584 and hide(z585=(214.918,278.582))z585..cycle;
+ renewcolore;
+ %%%draw PreeditedPath10;
+ %%%dotlabels.rt(556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585);
+ PreeditedPath11 = hide(z586=(255.977,265.277))z586..controls hide(z587=(283.645,263.309))z587 and hide(z588=(285.629,262.883))z588..hide(z589=(300.453,255.688))z589
+ ..controls hide(z590=(314.672,248.781))z590 and hide(z591=(319.508,239.949))z591..hide(z592=(316.844,225.727))z592
+ ..controls hide(z593=(312.848,204.367))z593 and hide(z594=(293.73,197.211))z594..hide(z595=(237.879,196.168))z595
+ ..controls hide(z596=(175.566,195.008))z596 and hide(z597=(146.289,207.188))z597..hide(z598=(148.812,233.227))z598
+ ..controls hide(z599=(150.801,253.754))z599 and hide(z600=(166.516,262.293))z600..hide(z601=(208.145,265.461))z601
+ ..controls hide(z602=(218.227,266.227))z602 and hide(z603=(226.645,267.238))z603..hide(z604=(227.148,267.742))z604
+ ..controls hide(z605=(227.621,268.215))z605 and hide(z606=(229.477,268.215))z606..hide(z607=(231.027,267.742))z607
+ ..controls hide(z608=(232.672,267.242))z608 and hide(z609=(243.824,266.141))z609..cycle;
+ renewcolore;
+ %%%draw PreeditedPath11;
+ %%%dotlabels.rt(586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609);
+ PreeditedPath12 = hide(z610=(104.719,410.492))z610..controls hide(z611=(91.6758,403.551))z611 and hide(z612=(87.9102,397.672))z612..hide(z613=(87.9102,384.227))z613
+ ..controls hide(z614=(87.9102,372.332))z614 and hide(z615=(88.75,370.477))z615..hide(z616=(96.4453,365.305))z616
+ ..controls hide(z617=(111.211,355.375))z617 and hide(z618=(129.801,353.32))z618..hide(z619=(151.777,359.18))z619
+ ..controls hide(z620=(165.77,362.91))z620 and hide(z621=(169.102,367.68))z621..hide(z622=(169.102,383.969))z622
+ ..controls hide(z623=(169.102,398.188))z623 and hide(z624=(166.773,402.285))z624..hide(z625=(155.137,408.543))z625
+ ..controls hide(z626=(147.383,412.719))z626 and hide(z627=(111.504,414.102))z627..cycle;
+ renewcolore;
+ %%%draw PreeditedPath12;
+ %%%dotlabels.rt(610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627);
+ PreeditedPath13 = hide(z628=(151.777,402.477))z628..controls hide(z629=(164.445,395.879))z629 and hide(z630=(167.375,379.109))z630..hide(z631=(157.465,369.902))z631
+ ..controls hide(z632=(151.43,364.293))z632 and hide(z633=(130.574,360.691))z633..hide(z634=(116.871,362.891))z634
+ ..controls hide(z635=(108.34,364.262))z635 and hide(z636=(95.9492,370.898))z636..hide(z637=(95.3984,374.402))z637
+ ..controls hide(z638=(93.8047,384.484))z638 and hide(z639=(94.4102,392.855))z639..hide(z640=(96.9844,396.379))z640
+ ..controls hide(z641=(104.785,407.051))z641 and hide(z642=(136.262,410.555))z642..cycle;
+ renewcolore;
+ %%%draw PreeditedPath13;
+ %%%dotlabels.rt(628,629,630,631,632,633,634,635,636,637,638,639,640,641,642);
+ PreeditedPath14 = hide(z643=(316.613,408.273))z643..controls hide(z644=(312.215,406.977))z644 and hide(z645=(307.352,403.312))z645..hide(z646=(305.621,400))z646
+ ..controls hide(z647=(301.164,391.465))z647 and hide(z648=(299.918,375.328))z648..hide(z649=(303.168,368.195))z649
+ ..controls hide(z650=(306.895,360.008))z650 and hide(z651=(326.051,354.375))z651..hide(z652=(347.25,355.238))z652
+ ..controls hide(z653=(372.074,356.246))z653 and hide(z654=(380.23,362.348))z654..hide(z655=(381.52,380.863))z655
+ ..controls hide(z656=(382.379,393.277))z656 and hide(z657=(381.992,394.16))z657..hide(z658=(371.816,403.012))z658
+ ..controls hide(z659=(365.648,408.371))z659 and hide(z660=(361.602,409.402))z660..hide(z661=(344.535,409.953))z661
+ ..controls hide(z662=(333.418,410.312))z662 and hide(z663=(320.988,409.562))z663..cycle;
+ renewcolore;
+ %%%draw PreeditedPath14;
+ %%%dotlabels.rt(643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663);
+ PreeditedPath15 = hide(z664=(359.664,402.125))z664..controls hide(z665=(373.309,398.008))z665 and hide(z666=(377.633,388.879))z666..hide(z667=(373.41,373.109))z667
+ ..controls hide(z668=(370.441,362.023))z668 and hide(z669=(341.305,357.23))z669..hide(z670=(319.844,364.293))z670
+ ..controls hide(z671=(309.996,367.535))z671 and hide(z672=(305.723,375.176))z672..hide(z673=(307.402,386.555))z673
+ ..controls hide(z674=(309.699,402.117))z674 and hide(z675=(334.84,409.609))z675..cycle;
+ renewcolore;
+ %%%draw PreeditedPath15;
+ %%%dotlabels.rt(664,665,666,667,668,669,670,671,672,673,674,675);
+ PreeditedPath16 = hide(z676=(198.836,254.906))z676..controls hide(z677=(198.25,254.34))z677 and hide(z678=(194.441,253.359))z678..hide(z679=(190.043,252.641))z679
+ ..controls hide(z680=(165.223,248.582))z680 and hide(z681=(155.082,233.176))z681..hide(z682=(168.844,220.43))z682
+ ..controls hide(z683=(180.852,209.305))z683 and hide(z684=(195.473,205.852))z684..hide(z685=(230.121,205.969))z685
+ ..controls hide(z686=(247.961,206.027))z686 and hide(z687=(265.688,206.766))z687..hide(z688=(269.684,207.613))z688
+ ..controls hide(z689=(295.023,213.004))z689 and hide(z690=(306.207,221.254))z690..hide(z691=(303.703,232.707))z691
+ ..controls hide(z692=(301.492,242.828))z692 and hide(z693=(294.762,247.789))z693..hide(z694=(277.957,251.688))z694
+ ..controls hide(z695=(264.254,254.867))z695 and hide(z696=(201.449,257.418))z696..cycle;
+ renewcolore;
+ %%%draw PreeditedPath16;
+ %%%dotlabels.rt(676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696);
+ PreeditedPath17 = hide(z697=(261.148,244.574))z697..controls hide(z698=(294.246,241.137))z698 and hide(z699=(301.031,226.125))z699..hide(z700=(272.785,218.828))z700
+ ..controls hide(z701=(259.723,215.453))z701 and hide(z702=(213.316,215.203))z702..hide(z703=(196.508,218.414))z703
+ ..controls hide(z704=(186.426,220.34))z704 and hide(z705=(175.824,226.34))z705..hide(z706=(175.824,230.121))z706
+ ..controls hide(z707=(175.824,234.188))z707 and hide(z708=(185.906,242.977))z708..hide(z709=(190.82,243.191))z709
+ ..controls hide(z710=(199.352,243.57))z710 and hide(z711=(218.574,246.082))z711..hide(z712=(219.367,246.93))z712
+ ..controls hide(z713=(220.137,247.746))z713 and hide(z714=(243.051,246.457))z714..cycle;
+ renewcolore;
+ %%%draw PreeditedPath17;
+ %%%dotlabels.rt(697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714);
+ PreeditedPath18 = hide(z715=(113.508,390.867))z715..controls hide(z716=(108.598,386.918))z716 and hide(z717=(108.246,385.52))z717..hide(z718=(110.926,380.605))z718
+ ..controls hide(z719=(112.617,377.504))z719 and hide(z720=(114.848,374.797))z720..hide(z721=(115.836,374.652))z721
+ ..controls hide(z722=(134.711,371.871))z722 and hide(z723=(147.383,376.133))z723..hide(z724=(147.383,385.262))z724
+ ..controls hide(z725=(147.383,394.285))z725 and hide(z726=(122.816,398.352))z726..cycle;
+ renewcolore;
+ %%%draw PreeditedPath18;
+ %%%dotlabels.rt(715,716,717,718,719,720,721,722,723,724,725,726);
+ PreeditedPath19 = hide(z727=(325.789,388.312))z727..controls hide(z728=(320.102,383.707))z728 and hide(z729=(320.102,383.707))z729..hide(z730=(325.145,377.504))z730
+ ..controls hide(z731=(334.082,366.508))z731 and hide(z732=(359.402,370.523))z732..hide(z733=(359.402,382.934))z733
+ ..controls hide(z734=(359.402,392.957))z734 and hide(z735=(336.133,396.68))z735..cycle;
+ renewcolore;
+ %%%draw PreeditedPath19;
+ %%%dotlabels.rt(727,728,729,730,731,732,733,734,735);
+ PreeditedPath20 = hide(z736=(209.438,235.988))z736..controls hide(z737=(196.766,234.27))z737 and hide(z738=(194.645,232.738))z738..hide(z739=(200.387,229.457))z739
+ ..controls hide(z740=(203.5,227.68))z740 and hide(z741=(218.227,226.645))z741..hide(z742=(237.363,226.855))z742
+ ..controls hide(z743=(267.098,227.188))z743 and hide(z744=(274.234,228.156))z744..hide(z745=(270.977,231.414))z745
+ ..controls hide(z746=(268.219,234.172))z746 and hide(z747=(221.59,237.637))z747..cycle;
+ renewcolore;
+ %%%draw PreeditedPath20;
+%%%dotlabels.rt(736,737,738,739,740,741,742,743,744,745,746,747);
+ numeric integerindex;
+ for integerindex=1 upto 20:
+ draw PreeditedPath[integerindex] withpen pencircle scaled 1.5mm;
+ endfor;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp b/Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp
new file mode 100644
index 00000000000..2d596680b29
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp
@@ -0,0 +1,53 @@
+% casadopessoal.mp
+% L. Nobre G.
+% 2011
+
+prologues := 1;
+
+numeric u, raio, cc, cp, espa, cpc;
+u = 50mm;
+raio = 0.4u;
+espa = u-2*raio;
+cpc = u;
+cc = 2.16u;
+cp =1.6u;
+
+color pgreen, cblue;
+pgreen = (139,194,52)/255;
+cblue = (12,84,130)/255;
+picture C, P;
+
+def boxpath( expr w, h, r ) =
+ ((w,0)---(w,h-r)...(w-r,h)---(r-w,h)...(-w,h-r)---(-w,r-h)...(r-w,-h)---(w-r,-h)...(w,r-h)---cycle)
+enddef;
+
+def boxdraw( expr W, H, R, coox, cooy, col ) =
+ fill boxpath( W/2, H/2, R ) shifted (coox,cooy) withcolor col
+enddef;
+
+beginfig(2);
+ numeric altur;
+ altur = 2*(cp+espa)+raio;
+ boxdraw(u,cp,raio,-0.5*(cc+espa),0.5*(cp-altur),pgreen);
+ boxdraw(cc,u,raio,0,cp+0.5*(espa-altur),pgreen);
+ boxdraw(u,cp,raio,-0.5*(cc+espa),0.5*(altur-cp)-espa-raio,pgreen);
+ boxdraw(cc,u,raio,0,0.5*(altur-u),pgreen);
+ boxdraw(u,cp,raio,0.5*(cc+espa),0.5*(altur-cp)-espa-raio,pgreen);
+ P = currentpicture;
+endfig;
+
+beginfig(1);
+ boxdraw(u,altur-2*(raio+espa),raio,-0.5*(cc+espa),0,cblue);
+ boxdraw(cc,u,raio,0,0.5*(u-altur),cblue);
+ boxdraw(u,cpc,raio,0.5*(cc+espa),0.5*(altur-cpc)-espa-raio,cblue);
+ boxdraw(cc,u,raio,0,0.5*(altur-u),cblue);
+ boxdraw(u,cpc,raio,0.5*(cc+espa),0.5*(cpc-altur)+espa+raio,cblue);
+ C = currentpicture;
+endfig;
+
+beginfig(3);
+ draw C shifted (-raio-0.5*(cc+3*espa),0);
+ draw P shifted (raio+0.5*(cc+3*espa),0);
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cellevolve.mp b/Master/texmf-dist/doc/metapost/featpost/example/cellevolve.mp
new file mode 100644
index 00000000000..d4988a29422
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/cellevolve.mp
@@ -0,0 +1,72 @@
+% cellevolve.mp
+% L. Nobre G.
+% IYP (2005)
+
+def projectyz( expr theta, phi ) =
+ (cosd(theta)*sind(phi),sind(theta))
+enddef;
+
+def rotatangl( expr ori, rang ) =
+ ( (xpart ori)*cosd(rang)-(ypart ori)*sind(rang),
+ (xpart ori)*sind(rang)+(ypart ori)*cosd(rang))
+enddef;
+
+numeric vertn, horin, grids, thex, they, varx, xcomp;
+numeric ymax, xmax, i, j, size, u, ycomp, theta, phi;
+numeric power, xlim, ylim, frac, vary, allang, shift;
+numeric perang, ampper, npers, velang, displamp, hdk;
+pair actpos, direct, one, two, displvec;
+path cirma, VGAborder;
+color thedark;
+
+u := 0.5mm;
+allang := 15;
+ampper := 20;
+npers := 4;
+velang := 5;
+hdk := 0.6;
+displamp := 8u;
+frac := 1.5;
+power := 0.8;
+vertn := 20;
+horin := 41;
+size := 3u;
+grids := 8u;
+ymax := floor(0.5*(vertn*frac-1));
+xmax := floor(0.5*(horin*frac-1));
+xlim := grids*0.5*horin;
+ylim := grids*0.5*vertn;
+varx := 180/(0.5*(horin-1));
+vary := 90/(0.5*(vertn-1));
+cirma := fullcircle scaled (grids);
+
+ VGAborder := (-xlim,-ylim)-- %
+ ( xlim,-ylim)-- %
+ ( xlim, ylim)-- %
+ (-xlim, ylim)--cycle; %
+
+beginfig(0);
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*rotatangl((i,j),allang);
+ thex:=i*varx;
+ they:=j*vary;
+ theta:=90*cosd(they)*cosd(thex);
+ phi:=60*sind(2*they)*sind(thex);
+ perang := allang+ampper*sind(npers*they);
+ direct:=rotatangl(projectyz(theta,phi),perang);
+ displvec:=dir(velang)*displamp*cosd(npers*they);
+ actpos := actpos+displvec;
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ thedark := (1-hdk*(ypart direct))*white;
+ fill cirma shifted actpos withcolor thedark;
+ draw one--two;
+ endfor;
+ endfor;
+ clip currentpicture to VGAborder;
+ undraw VGAborder;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cinemwork.mp b/Master/texmf-dist/doc/metapost/featpost/example/cinemwork.mp
new file mode 100644
index 00000000000..37af4b547e2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/cinemwork.mp
@@ -0,0 +1,307 @@
+% cinemwork.mp
+% L. Nobre G.
+% Feb2001
+
+verbatimtex \documentclass{article} \begin{document} etex
+
+%%input mp-tool;
+
+def wmg = withcolor mygray enddef;
+
+def resetpic =
+ begingroup
+ tmpicture := currentpicture;
+ currentpicture := nullpicture
+ endgroup
+enddef;
+
+def roundedcornersbox( expr swc, nec, cornerrad ) =
+ begingroup
+ pair swe, swn, nes, new, nwe, nws, sen, sew;
+ numeric lowx, higx, lowy, higy;
+ path returnpath;
+ lowx = xpart swc;
+ higx = xpart nec;
+ lowy = ypart swc;
+ higy = ypart nec;
+ swe = ( lowx+cornerrad, lowy );
+ nwe = ( lowx+cornerrad, higy );
+ new = ( higx-cornerrad, higy );
+ sew = ( higx-cornerrad, lowy );
+ swn = ( lowx, lowy+cornerrad );
+ nws = ( lowx, higy-cornerrad );
+ nes = ( higx, higy-cornerrad );
+ sen = ( higx, lowy+cornerrad );
+ returnpath = nws{up}..{right}nwe--
+ new{right}..{down}nes--
+ sen{down}..{left}sew--
+ swe{left}..{up}swn--cycle;
+ ( returnpath )
+ endgroup
+enddef;
+
+def rectracarea( expr unit, largnumtracs, espesfrac, tangle )=
+ begingroup
+ picture tmpicture, returnpicture;
+ numeric largarea, espesarea, i;
+ pair esquarea, direarea, espessvec;
+ path boxarea, traco;
+ tmpicture = currentpicture;
+ currentpicture := nullpicture;
+ largarea = largnumtracs*unit;
+ espesarea = espesfrac*largarea;
+ esquarea = (-largarea/2,0);
+ direarea = (largarea/2,0);
+ espessvec = (0,espesarea);
+ boxarea = esquarea--direarea--
+ (direarea+espessvec)--(esquarea+espessvec)--cycle;
+ traco = ( origin--( dir( tangle ) ) ) scaled 6in;
+ for i=-largnumtracs upto largnumtracs:
+ draw traco shifted (2*i*unit,0);
+ endfor;
+ clip currentpicture to boxarea;
+ returnpicture = currentpicture;
+ currentpicture := nullpicture;
+ draw tmpicture;
+ ( returnpicture )
+ endgroup
+enddef;
+
+def picketfence =
+ begingroup
+ picture storepicture, returnpicture, minor, major, mtics;
+ path borderbox;
+ numeric rule;
+ storepicture := currentpicture;
+ currentpicture := nullpicture;
+ pickup pencircle scaled 0;
+ borderbox = origin--(136mm,0)--(136mm,45mm)--(0,45mm)--cycle;
+ linecap := butt;
+ pickup pencircle scaled 5mm;
+ draw origin--(0,1cm);
+ resetpic;
+ minor = tmpicture;
+ draw origin--(0,1.5cm);
+ resetpic;
+ mtics = tmpicture;
+ draw origin--(0,3cm);
+ resetpic;
+ major = tmpicture;
+ for rule = -5cm step 1cm until 5cm:
+ draw minor shifted (rule+68mm,0);
+ endfor;
+ for rule = -5cm step 5cm until 5cm:
+ draw major shifted (rule+68mm,0);
+ endfor;
+ for rule = -1 step 2 until 1:
+ draw mtics shifted (rule*5mm+68mm,3cm);
+ endfor;
+ linecap := rounded;
+ pickup pencircle scaled 0;
+ clip currentpicture to borderbox;
+ draw borderbox;
+ returnpicture := currentpicture rotated 180 shifted (136mm,45mm);
+ currentpicture := storepicture;
+ ( returnpicture scaled (1/(136mm)) )
+ endgroup
+enddef;
+
+
+beginfig(1);
+ numeric u, ma, mb, mc, md, me, mf, mg, mh, mi, mj, mk, ml, mq;
+ numeric mn, mo, mp, rangle, xzero, ystart, yzero, yend, mr;
+ numeric magn, xthree, ymed;
+ picture bancada, tmpicture, storepicture;
+ path carro, lwheel, rwheel, zoom;
+ color mygray;
+ ahangle := 30;
+ ahlength := 10pt;
+ u := 1mm;
+ ma := 2u;
+ mb := 150u;
+ mc := 0.25mb;
+ md := mb-mc;
+ me := 8u;
+ mf := 16u;
+ rangle := -angle(md-mc,mf-me);
+ mg := 3u;
+ mh := 7u;
+ mi := 1.2u;
+ mj := 4mi;
+ mk := 0.7mh;
+ ml := 0.16mb;
+ mn := mi+mj;
+ mo := (0.5*mg)+(1.5*ma);
+ mq := 7u;
+ mr := (mf*md-me*mc)/(mf-me);
+ mygray := 0.8white;
+ magn := 2.5;
+ linecap := butt;
+ pickup pencircle scaled ma;
+ draw (0,0)--(mb,0) wmg;
+ draw (0,0.5mg)--(mb,0.5mg);
+ draw (0,-0.5mg)--(mb,-0.5mg);
+ draw (mi,0)--(mi,mh);
+ draw (mb-mi,0)--(mb-mi,mh);
+ draw (mc,0)--(mc,-mf);
+ draw (md,0)--(md,-me);
+ linecap := rounded;
+ draw (-0.5mg,0)--(-mq-2u,0) dashed evenly withpen pencircle scaled 0pt;
+ path angarc;
+ angarc = fullcircle cutafter (origin--1.1*dir(-rangle));
+ angarc := (angarc rotated 180) scaled (2*(mq+mr)) shifted (mr,0);
+ draw angarc dashed evenly withpen pencircle scaled 0pt;
+ label.rt( btex $\theta$ etex scaled magn, point 0.5 of angarc );
+ pickup pencircle scaled 0.67ma;
+ carro := roundedcornersbox( (mn,mo),(mn+ml,mo+mk), 2u );
+ draw carro;
+ lwheel := fullcircle rotated 90 scaled mk shifted (mn+0.2ml,0.5*(mk+mg));
+ rwheel := fullcircle rotated 90 scaled mk shifted (mn+0.8ml,0.5*(mk+mg));
+ pickup pencircle scaled 0.3ma;
+ draw lwheel cutafter carro cutbefore carro;
+ draw rwheel cutbefore carro cutafter carro;
+ draw picketfence scaled 0.8ml shifted (mn+0.1ml,mo+mk);
+
+ xzero := (0.8ml)*52.5/136+mn+(0.5ml);
+ ystart := 3.5*(mo+mk);
+ yzero := 1.05*(mo+mk)+(0.8ml)*45/136;
+ pickup pencircle scaled 0.3ma;
+ drawarrow (xzero,ystart)--(xzero,yzero);
+ label.top( btex $x_0$ etex scaled magn, (xzero,ystart) );
+ zoom := fullcircle scaled (0.5ml) shifted (xzero,mo+mk+(0.8ml)*45/136);
+ storepicture := currentpicture;
+ clip currentpicture to zoom;
+ draw zoom;
+ resetpic;
+ draw storepicture;
+ draw tmpicture scaled 2 shifted (-5cm,5mm);
+
+ xthree := 0.5*(mb+mn+ml);
+ yend := 2mo;
+ drawarrow (xthree,ystart)--(xthree,yend);
+ label.top( btex $x_3$ etex scaled magn, (xthree,ystart) );
+ mp := 0.8*(mb-0.5*(mb+mn+ml));
+ drawarrow (xthree-mp,ystart)--(xthree-mp,yend);
+ label.top( btex $x_1$ etex scaled magn, (xthree-mp,ystart) );
+ drawarrow (xthree+mp,ystart)--(xthree+mp,yend);
+ label.top( btex $x_2$ etex scaled magn, (xthree+mp,ystart) );
+ ymed := 0.5*(ystart+yend);
+ drawdblarrow (xthree-mp,ymed)--(xthree,ymed);
+ drawdblarrow (xthree,ymed)--(xthree+mp,ymed);
+ label.top( btex $D/2$ etex scaled magn, (xthree-(0.5*mp),ymed) );
+ label.top( btex $D/2$ etex scaled magn, (xthree+(0.5*mp),ymed) );
+ resetpic;
+ draw tmpicture shifted (-md,me) rotated rangle shifted (0.25mb,0);
+ bancada := rectracarea( u, 1.2*mb/u, 0.06, 45 ) rotated 180;
+ draw (-0.6mb,0)--(0.6mb,0);
+ draw bancada;
+ resetpic;
+ draw tmpicture shifted (10.5cm, 3cm );
+endfig;
+
+beginfig(2);
+ numeric u, ma, mb, mc, md, me, mf, mg, mh, mi, mj, mk, ml;
+ numeric mn, mo, rangle, xzero, ystart, yzero, yend;
+ numeric magn, xthree, ymed, xphot;
+ picture bancada, tmpicture, storepicture;
+ path carro, lwheel, rwheel, zoom;
+ color mygray;
+ ahangle := 30;
+ ahlength := 10pt;
+ u := 1mm;
+ ma := 2u;
+ mb := 150u;
+ mc := 0.25mb;
+ md := 3mc;
+ me := 8u;
+ mf := 11u;
+ rangle := -angle(md-mc,mf-me);
+ mg := 3u;
+ mh := 7u;
+ mi := 1.2u;
+ mj := 4mi;
+ mk := 0.7mh;
+ ml := 0.16mb;
+ mn := mi+mj;
+ mo := (0.5*mg)+(1.5*ma);
+ drawoptions( withcolor 0.6white );
+ linecap := rounded;
+ pickup pencircle scaled 0.67ma;
+ carro := roundedcornersbox( (mn,mo),(mn+ml,mo+mk), 2u );
+ draw carro;
+ lwheel := fullcircle rotated 90 scaled mk shifted (mn+0.2ml,0.5*(mk+mg));
+ rwheel := fullcircle rotated 90 scaled mk shifted (mn+0.8ml,0.5*(mk+mg));
+ pickup pencircle scaled 0.3ma;
+ draw lwheel cutafter carro cutbefore carro;
+ draw rwheel cutbefore carro cutafter carro;
+ draw picketfence scaled 0.8ml shifted (mn+0.1ml,mo+mk);
+ drawoptions();
+ mygray := 0.8white;
+ linecap := butt;
+ pickup pencircle scaled ma;
+ draw (0,0)--(mb,0) wmg;
+ draw (0,0.5mg)--(mb,0.5mg);
+ draw (0,-0.5mg)--(mb,-0.5mg);
+ draw (mi,0)--(mi,mh);
+ draw (mb-mi,0)--(mb-mi,mh);
+ draw (mc,0)--(mc,-mf);
+ draw (md,0)--(md,-me);
+
+ xzero := (0.8ml)*52.5/136+mn+(0.5ml);
+ ystart := 3.5*(mo+mk);
+ yzero := 1.05*(mo+mk)+(0.8ml)*45/136;
+ yend := 2mo;
+ ymed := 0.5*(ystart+yend);
+ magn := 2.5;
+ pickup pencircle scaled 0.3ma;
+ drawarrow (xzero,ystart)--(xzero,yzero);
+ label.top( btex $x_0$ etex scaled magn, (xzero,ystart) );
+
+ pickup pencircle scaled 0.67ma;
+ carro := roundedcornersbox( (mn+0.5*mb,mo),(mn+ml+0.5*mb,mo+mk), 2u );
+ draw carro;
+ lwheel := fullcircle rotated 90 scaled mk;
+ lwheel := lwheel shifted (mn+0.2ml+0.5*mb,0.5*(mk+mg));
+ rwheel := fullcircle rotated 90 scaled mk;
+ rwheel := rwheel shifted (mn+0.8ml+0.5*mb,0.5*(mk+mg));
+ pickup pencircle scaled 0.3ma;
+ draw lwheel cutafter carro cutbefore carro;
+ draw rwheel cutbefore carro cutafter carro;
+ draw picketfence scaled 0.8ml shifted (mn+0.1ml+0.5*mb,mo+mk);
+
+ pickup pencircle scaled 0;
+ ahlength := 2pt;
+ xzero := (0.8ml)*47.5/136+mn+(0.5ml)+0.5*mb;
+ xphot := (0.8ml)*42.5/136+mn+(0.5ml)+0.5*mb;
+ magn := 0.625;
+ drawarrow (xzero,ymed)--(xzero,yzero);
+ label.rt( btex $x$ etex scaled magn, (xzero,ymed) );
+ drawarrow (xphot,ymed)--(xphot,yzero);
+ label.lft( btex $x_1$ etex scaled magn, (xphot,ymed) );
+ drawarrow (xphot-0.1ml,0.5[ymed,yzero])--(xphot,0.5[ymed,yzero]);
+ draw (xphot,0.5[ymed,yzero])--(xzero,0.5[ymed,yzero]);
+ drawarrow (xzero+0.1ml,0.5[ymed,yzero])--(xzero,0.5[ymed,yzero]);
+ label.rt( btex $D/2$ etex scaled magn, (xzero+0.1ml,0.5[ymed,yzero]) );
+
+ zoom := fullcircle scaled (0.7ml);
+ zoom := zoom shifted (xzero,mo+mk+(0.8ml)*45/136);
+ storepicture := currentpicture;
+ clip currentpicture to zoom;
+ draw zoom;
+ resetpic;
+ draw storepicture;
+ draw tmpicture scaled 4 shifted (-31cm,5mm);
+
+ resetpic;
+ draw tmpicture shifted (-md,me) rotated rangle shifted (0.25mb,0);
+ pickup pencircle scaled 0.3ma;
+ bancada := rectracarea( u, 1.2*mb/u, 0.06, 45 ) rotated 180;
+ draw (-0.6mb,0)--(0.6mb,0);
+ draw bancada;
+ resetpic;
+ draw tmpicture shifted (10.5cm, 3cm );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/convergingspirals.mp b/Master/texmf-dist/doc/metapost/featpost/example/convergingspirals.mp
new file mode 100644
index 00000000000..f3498720411
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/convergingspirals.mp
@@ -0,0 +1,361 @@
+% convergingspirals.mp
+% L. Nobre G. - a twisted mind...
+% 2007
+
+prologues := 1;
+
+vardef oper( expr Valu, Slop ) =
+ (Valu*Slop)
+enddef;
+
+vardef hiperspiral( expr Val, Phi, Pitch ) =
+ dir(57.29578*Val*(Pitch**2)+Phi)/oper(Val,Pitch)
+enddef;
+
+beginfig(5); %%%%%%%%%%%%%% This figure has one very small bug... %%%%%%%
+ boolean adddepth;
+ adddepth = true;
+ pi = 3.14159;
+ co = 180/pi;
+ mar = 0.20cm;
+ prmax = 6cm;
+ prmin = 0.85cm;
+ hrmax = 7cm;
+ ptmax = 1.699*pi;
+ pstpnum = 100;
+ numarquid = 5;
+ multipl = 5; %%%%%%%%%%%%%%% must be odd for checkerboard %%%%%%%%%%%%%%
+ checkerdepth = multipl+3;
+ fac = hrmax/prmax;
+ alfa = 2*pi/numarquid;
+ pitcha = prmax/ptmax;
+ pitchb = prmax/(ptmax-alfa);
+ numhiperb = numarquid*multipl;
+ ptstp = ptmax/pstpnum;
+ ptstb = (ptmax-alfa)/pstpnum;
+ umin = prmax/10;
+ vmin = prmax/20;
+ ustp = (hrmax-umin)/pstpnum;
+ vstp = (hrmax-vmin)/pstpnum;
+
+ path n[]m[], c[], cutter;
+ cutter = fullcircle rotated 180 scaled (2prmin);
+ for i=1 upto 8:
+ n0m[i] = origin;
+ endfor;
+ for i=1 upto pstpnum:
+ tp := i*ptstp;
+ tb := i*ptstb;
+ pu := umin+i*ustp;
+ vu := vmin+i*vstp;
+ n0m1 := n0m1--dir(co*tp)*(pitcha*tp+mar);
+ n0m2 := n0m2--dir(co*tp)*pitcha*tp;
+ n0m3 := n0m3--dir(co*(tb+alfa))*pitchb*tb;
+ n0m4 := n0m4--dir(co*(tb+alfa))*(pitchb*tb-mar);
+ n0m5 := n0m5--dir(co*pitcha/pu)*(pu-fac*mar);
+ n0m6 := n0m6--dir(co*pitcha/pu)*pu;
+ n0m7 := n0m7--dir(co*pitchb/vu)*vu;
+ n0m8 := n0m8--dir(co*pitchb/vu)*(vu+fac*mar);
+ endfor;
+ pair flast, hlast;
+ flast = point pstpnum of n0m6;
+ hlast = point pstpnum of n0m8;
+ adif = angle( hlast ) - angle( flast );
+ n0m5 := n0m5 rotated adif;
+ n0m6 := n0m6 rotated adif;
+ for i=1 upto 8:
+ n0m[i] := (reverse n0m[i]) cutafter cutter ;
+ endfor;
+ for j=1 upto numarquid:
+ for i=1 upto 4:
+ n[j]m[i] := n0m[i] rotated (j*alfa*co);
+% draw n[j]m[i];
+ endfor;
+ endfor;
+ for j=1 upto numhiperb:
+ for i=5 upto 8:
+ n[j]m[i] := n0m[i] rotated (j*360/numhiperb);
+% draw n[j]m[i];
+ endfor;
+ endfor;
+ distance = pstpnum;
+ actualspik = 0;
+ boolean intersectexists;
+ pair itstm;
+ for i=1 upto numhiperb:
+ itstm := n1m2 intersectiontimes n[i]m6;
+ intersectexists := ( itstm dotprod (-1,1) ) <> 0;
+ if intersectexists:
+ if ( (xpart itstm) < distance ):
+ distance := xpart itstm;
+ actualspik := i;
+ fi;
+ fi;
+ endfor;
+ numeric seq[];
+ seq0 = actualspik;
+ for i=1 upto 2checkerdepth:
+ if (seq[i-1]-1<1):
+ seq[i] := numhiperb;
+ else:
+ seq[i]=seq[i-1]-1;
+ fi;
+ endfor;
+ path ca, cb;
+ ca = (reverse n1m3)--n1m2;
+ cb = (reverse n[seq1]m7)--n[seq1]m6;
+ c0 = buildcycle( cb, reverse n1m1 ); %%%%% may reverse
+ c1 = buildcycle( ca, n[seq0]m8 );
+ for i=2 step 2 until 2checkerdepth:
+ if i < 2*multipl-1 :
+ ca := (reverse n[seq[i-2]]m6)--n[seq[i-2]]m7;
+ c[i] := buildcycle( ca, n2m1 );
+ else:
+ c[i]:=buildcycle(n[seq[i-2]]m7,n2m1,reverse n[seq[i-2]]m6,reverse n0m4);
+ fi;
+ c[i+1]:=buildcycle(n[seq[i-2]]m5,n1m3,reverse n[seq[i]]m8,reverse n1m2);
+ endfor;
+ if adddepth:
+ depthadded = 1;
+ else:
+ depthadded = 0;
+ fi;
+ for i=1 step 2 until 2*checkerdepth+depthadded:
+ for j=1 upto numarquid:
+ fill c[i-1] rotated (j*alfa*co) withcolor 0.85*(red+green);
+ fill c[i] rotated (j*alfa*co) withcolor 0.7*green;
+ endfor;
+ endfor;
+ if not (multipl <> 5):
+ cb := (reverse n[seq3]m7)--n[seq3]m6;
+ ca := buildcycle( cb, reverse n1m1 ); %%%%% may reverse
+ for j=1 upto numarquid:
+ fill ca rotated (j*alfa*co) withcolor 0.85*(red+green);
+ endfor;
+ fi;
+endfig;
+
+beginfig(4);
+ numeric pstpnum, prmax, i, j, pi, ptmax, ptstp, th, co, mar;
+ numeric numarquid, numhiperb, multipl, pitcha, pitchb, alfa;
+ path a, b, c, d, e, f, g, h;
+ numeric ptstb, hrmax, fac, sn, sm, rn, rm;
+ pi = 3.14159;
+ co = 180/pi;
+ mar = 0.16mm;
+ prmax = 5mm;
+ hrmax = 7mm;
+ ptmax = 1.05*pi;
+ pstpnum = 100;
+ numarquid = 5;
+ multipl = 1;
+ rn = 4;
+ rm = 2;
+ sn = 8;
+ sm = 6;
+ fac = hrmax/prmax;
+ alfa = 2*pi/numarquid;
+ pitcha = prmax/ptmax;
+ pitchb = prmax/(ptmax-alfa);
+ numhiperb = numarquid*multipl;
+ ptstp = ptmax/pstpnum;
+ ptstb = (ptmax-alfa)/pstpnum;
+ a = origin;
+ b = origin;
+ c = origin;
+ d = origin;
+ for i=1 upto pstpnum:
+ th := i*ptstp;
+ a := a--dir(co*th)*pitcha*th;
+ b := b--dir(co*th)*(pitcha*th+mar);
+ endfor;
+ for i=1 upto pstpnum:
+ th := i*ptstb;
+ c := c--dir(co*(th+alfa))*pitchb*th;
+ d := d--dir(co*(th+alfa))*(pitchb*th-mar);
+ endfor;
+ for i=1 upto numarquid:
+% unfill buildcycle( b , reverse d ) rotated (i*alfa*co);
+ fill a--reverse c--cycle rotated (i*alfa*co);
+% draw a rotated (i*alfa*co) withcolor red+green;
+% draw b rotated (i*alfa*co) withcolor red;
+% draw c rotated (i*alfa*co) withcolor green;
+% draw d rotated (i*alfa*co) withcolor blue;
+ endfor;
+ numeric umin, vmin, ustp, vstp, pu, pv;
+ umin = prmax/20;
+ vmin = prmax/20;
+ ustp = (hrmax-umin)/pstpnum;
+ vstp = (hrmax-vmin)/pstpnum;
+ e = origin;
+ f = origin;
+ g = origin;
+ h = origin;
+ for i=1 upto pstpnum:
+ pu := umin+i*ustp;
+ e := e--dir(co*pitcha/pu)*(pu-((fac*mar)**2));
+ f := f--dir(co*pitcha/pu)*pu;
+ vu := vmin+i*vstp;
+ g := g--dir(co*pitchb/vu)*(vu+sqrt(fac*mar));
+ h := h--dir(co*pitchb/vu)*vu;
+ endfor;
+ pair flast, hlast;
+ numeric adif;
+ path hiperbolio, hiperbolic;
+ flast = point pstpnum of f;
+ hlast = point pstpnum of h;
+ adif = angle( hlast ) - angle( flast );
+% draw e withcolor red+blue;
+% draw f withcolor red+blue;
+% draw g rotated (-adif) withcolor green+blue;
+% draw h rotated (-adif) withcolor green+blue;
+ hiperbolio = (subpath (rn,pstpnum) of g rotated (-adif))...
+ (subpath (pstpnum,rm) of e)..cycle;
+ hiperbolic = (subpath (sn,pstpnum) of h rotated (-adif))...
+ (subpath (pstpnum,sm) of f)..cycle;
+ for i=1 upto numhiperb:
+ unfill hiperbolio rotated (i*360/numhiperb);
+ endfor;
+ for i=1 upto numhiperb:
+ fill hiperbolic rotated (i*360/numhiperb) withcolor 0.4*red+0.2*blue;
+ endfor;
+ picture storepic;
+ storepic = currentpicture;
+ currentpicture := nullpicture;
+ draw storepic scaled 12;
+endfig;
+
+beginfig(3);
+ numeric pstpnum, prmax, i, j, pi, ptmax, ptstp, th, co, mar;
+ numeric numarquid, numhiperb, multipl, pitcha, pitchb, alfa;
+ path a, b, c, d;
+ pi = 3.14159;
+ co = 180/pi;
+ mar = 0.32;
+ prmax = 5;
+ ptmax = 4*pi;
+ pstpnum = 100;
+ multipl = 3;
+ numarquid = 3;
+ alfa = 2*pi/numarquid;
+ pitcha = prmax/ptmax;
+ pitchb = prmax/(ptmax-alfa);
+ numhiperb = numarquid*multipl;
+ ptstp = ptmax/pstpnum;
+ a = origin;
+ b = origin;
+ c = origin;
+ d = origin;
+ for i=1 upto pstpnum:
+ th := i*ptstp;
+ a := a...dir(co*th)*pitcha*th;
+ b := b...dir(co*th)*(pitcha*th-mar);
+ c := c...dir(co*(th+alfa))*pitchb*th;
+ d := d...dir(co*(th+alfa))*(pitchb*th+mar);
+ endfor;
+ for i=1 upto numarquid:
+ drawoptions( rotated (i*alfa*co) scaled 1000 withpen pencircle scaled 0pt);
+ draw a;
+ draw b;
+ draw c;
+ draw d;
+ endfor;
+ %%%%%%%%%%%%%%%%%%%%%%%% A very nice case of knitting Bezier splines...
+endfig;
+
+beginfig(2);
+ numeric u, numb, faca, numa, numc, rmin, rmax, i, j, pitch, phi;
+ numeric petch, startang, angstep, ampi, ampe, arcstep, paperfactor;
+ path b[], base, a[], alto;
+ numeric valmax, valmin, valstep, valhmin, valhmax;
+ u = 15mm;
+ numb = 2; % start at one
+ faca = 7;
+ numc = 9;
+ rmin = 0.3;
+ rmax = 1.5;
+ paperfactor = 0.25*u/rmin;
+ angstep = 1/30;
+ valstep = 0.017;
+ numa = numb*faca;
+ startang = 1/numb;
+ arcstep = 1/numa;
+ ampi = numc/faca;
+ ampe = ampi-startang;
+ pitch = (rmax-rmin)/ampi; %show pitch;
+ petch = (rmax-rmin)/ampe; %show petch;
+ valmin = 1/oper(rmax,pitch);
+ valmax = 1/oper(rmin,pitch);
+ valhmin = 1/oper(rmax,petch);
+ valhmax = 1/oper(rmin,petch);
+ for i=1 step 2 until 2*numb:
+ phi := 0.5*i/numb;
+ b[i-1] = dir(phi*360)*rmin for j=angstep step angstep until ampi:
+ ...dir((phi+j)*360)*(rmin+pitch*j)
+ endfor;
+ b[i] = dir((phi+startang)*360)*rmin for j=angstep step angstep until ampe:
+ ...dir((phi+startang+j)*360)*(rmin+petch*j)
+ endfor;
+ endfor;
+ base = for i=1 step 2 until 2*numb: b[i-1]...reverse b[i]-- endfor cycle;
+ fill base scaled paperfactor;
+ for i=1 step 2 until 2*numa:
+ phi := 0.5*(i-1)*arcstep*360;
+ a[i-1] = hiperspiral(valmin,phi,pitch)
+ for j=valmin+valstep step valstep until valmax:
+ ...hiperspiral(j,phi,pitch)
+ endfor;
+ draw a[i-1] scaled paperfactor withcolor red+green;
+ phi := 0.5*i*arcstep*360;
+ a[i] = hiperspiral(valhmin,phi,petch)
+ for j=valhmin+valstep step valstep until valhmax:
+ ...hiperspiral(j,phi,petch)
+ endfor;
+ draw a[i] scaled paperfactor withcolor red;
+ endfor;
+endfig;
+
+beginfig(1);
+ numeric u, numb, faca, numa, numc, rmin, rmax, i, j, pitch, phi;
+ numeric petch, startang, angstep, ampi, ampe, arcstep;
+ path b[], base, a[], alto;
+ u = 15mm;
+ numb = 3; % start at one
+ faca = 3;
+ numc = 5;
+ rmin = 2u;
+ rmax = 10u;
+ angstep = 1/90; % If too big, the figure may be broken...
+ numa = numb*faca;
+ ampi = numc/faca;
+ pitch = (rmax-rmin)/ampi;
+ startang = 1/numb;
+ arcstep = 1/numa;
+ ampe = numc/faca-startang;
+ petch = (rmax-rmin)/ampe;
+ for i=1 step 2 until 2*numb:
+ phi := 0.5*i/numb;
+ b[i-1] = dir(phi*360)*rmin for j=angstep step angstep until ampi:
+ ...dir((phi+j)*360)*(rmin+pitch*j)
+ endfor;
+ b[i] = dir((phi+startang)*360)*rmin for j=angstep step angstep until ampe:
+ ...dir((phi+startang+j)*360)*(rmin+petch*j)
+ endfor;
+ endfor;
+ base = for i=1 step 2 until 2*numb: b[i-1]...reverse b[i]-- endfor cycle;
+ fill base withcolor red;
+ for i=1 step 2 until 2*numa:
+ phi := 0.5*i/numa;
+ a[i-1] = dir(phi*360)*rmin for j=angstep step angstep until 0.5:
+ ...dir(-(phi+j)*360)*(rmin+2*(rmax-rmin)*j)
+ endfor;
+ a[i] = dir((phi+arcstep)*360)*rmin
+ for j=angstep step angstep until 0.5-arcstep:
+ ...dir(-(phi+arcstep+j)*360)*(rmin+(rmax-rmin)/(0.5-arcstep)*j)
+ endfor;
+ endfor;
+ alto = for i=1 step 2 until 2*numa: a[i-1]...reverse a[i]-- endfor cycle;
+ fill alto withcolor green+blue;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cruztuga.mp b/Master/texmf-dist/doc/metapost/featpost/example/cruztuga.mp
new file mode 100644
index 00000000000..2cf8513d4ed
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/cruztuga.mp
@@ -0,0 +1,37 @@
+% cruztuga.mp
+% L. Nobre G.
+% 2007
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, da, db;
+ u = 1cm;
+ da = 1-1/sqrt(2);
+ db = 3/sqrt(2)-2;
+ z1 = u*(1.5,0.5);
+ z2 = u*(1.5,2.5-da);
+ z3 = u*(3.5+da,4.5);
+ z4 = u*(-3.5-da,4.5);
+ z5 = u*(db-1.5,3.5);
+ z6 = u*(1.5-db,3.5);
+ z7 = u*(0.5,2.5+db);
+ z8 = 0.5u*(1,1);
+ z10= 6u*(1,1);
+ z11= 6u*(-1,1);
+ z12= 6u*(-1,-1);
+ z13= 6u*(1,-1);
+ path octave;
+ picture tmppic;
+ octave = z1--z2--z3--z4--z5--z6--z7--z8--cycle;
+ fill octave withcolor red;
+ draw currentpicture xscaled -1;
+ draw currentpicture rotated 90;
+ draw currentpicture rotated 180;
+ tmppic = currentpicture;
+ currentpicture := nullpicture;
+ fill z10--z11--z12--z13--cycle;
+ draw tmppic;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/decorstatement.mp b/Master/texmf-dist/doc/metapost/featpost/example/decorstatement.mp
new file mode 100644
index 00000000000..099c11d3296
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/decorstatement.mp
@@ -0,0 +1,29 @@
+verbatimtex
+\documentclass{article}
+\usepackage{bookman}
+\pagestyle{empty}
+\begin{document}
+etex
+
+input boxes;
+
+beginfig(0);
+ picture thestatement;
+ thestatement = thelabel( btex
+ \begin{tabular}{c}
+ Pictures \\
+ from \\
+ Out There
+ \end{tabular}
+ etex, origin);
+ circleit.state( thestatement );
+ state.dx = state.dy;
+ pickup pencircle scaled 1pt;
+ fill bpath.state withcolor (0.25,0.33,0.75);
+ draw bpath.state;
+ draw thestatement;
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/defaultcmr.mp b/Master/texmf-dist/doc/metapost/featpost/example/defaultcmr.mp
new file mode 100644
index 00000000000..01371bc9255
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/defaultcmr.mp
@@ -0,0 +1,32 @@
+% defaultcmr.mp
+% use dvips -Pcmz
+
+beginfig(0);
+ picture sent[];
+ numeric xCoord, i;
+ color one, two, thr, fur;
+ one = (0.13333,0.54510,0.13334);
+ two = (0.74118,0.71764,0.41961);
+ thr = (0.80000,0.20000,0.20000);
+ fur = (0.00000,0.85000,1.00000);
+ xCoord = 3in;
+
+ defaultfont := "cmbx12";
+ defaultscale := 6.5;
+
+ sent1 = thelabel( " ", (xCoord, 6in) );
+ sent2 = thelabel( "Be", (xCoord, 5in) );
+ sent3 = thelabel( "Aware", (xCoord, 4in) );
+ sent4 = thelabel( "of", (xCoord, 3in) );
+ sent5 = thelabel( "Technical", (xCoord, 2in) );
+ sent6 = thelabel( "Arrogance.", (xCoord, 1in) );
+ for i = 1 upto 4:
+ draw sent[i] withcolor two;
+ endfor;
+ for i = 5 upto 6:
+ draw sent[i] withcolor thr;
+ endfor;
+endfig;
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/derivondatriang.mp b/Master/texmf-dist/doc/metapost/featpost/example/derivondatriang.mp
new file mode 100644
index 00000000000..7081d590437
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/derivondatriang.mp
@@ -0,0 +1,82 @@
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+def marktic( expr Where, IsVertical, Size ) =
+ begingroup
+ pair low, hig;
+ if IsVertical:
+ low = ( xpart Where, (ypart Where) - 0.5*Size );
+ hig = ( xpart Where, (ypart Where) + 0.5*Size );
+ else:
+ low = ( (xpart Where) - 0.5*Size, ypart Where );
+ hig = ( (xpart Where) + 0.5*Size, ypart Where );
+ fi;
+ draw low--hig
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric u, xsize, ysize, ticlen, xstep, yamp, yshift;
+ path o.dtriang, xax, yax;
+ picture previouspic;
+ u = 8mm;
+ xsize = 9u;
+ ysize = 2.7u;
+ ticlen = 0.2u;
+ yamp = 1.8u;
+ xstep = 1.6u;
+ yshift = 6.0u;
+ z0 = origin;
+ z1 = ( xsize, 0 );
+ xax = z0--z1;
+ z2 = ( 0, -ysize );
+ z3 = ( 0, ysize );
+ yax = z2--z3;
+ z4 = ( 0, -yamp );
+ z40 = ( 0, yamp );
+ z5 = ( xstep, yamp );
+ z50 = ( xstep, 0 );
+ z6 = ( 2*xstep, -yamp );
+ z60 = ( 2*xstep, 0 );
+ z7 = ( 3*xstep, yamp );
+ z70 = ( 3*xstep, 0 );
+ z8 = ( 4*xstep, -yamp );
+ z80 = ( 4*xstep, 0 );
+ z9 = ( 5*xstep, yamp );
+ z90 = ( 5*xstep, 0 );
+ o.dtriang = z4--z5--z6--z7--z8--z9;
+ drawarrow xax;
+ drawarrow yax;
+ marktic( z4, false, ticlen );
+ marktic( z40, false, ticlen );
+ marktic( z50, true, ticlen );
+ marktic( z60, true, ticlen );
+ marktic( z70, true, ticlen );
+ marktic( z80, true, ticlen );
+ marktic( z90, true, ticlen );
+ label.bot( btex $x$ etex, z1 );
+ label.bot( btex 1 etex, z50 );
+ label.bot( btex 2 etex, z60 );
+ label.bot( btex 3 etex, z70 );
+ label.bot( btex 4 etex, z80 );
+ label.bot( btex 5 etex, z90 );
+ previouspic = currentpicture;
+ draw previouspic shifted (0,-yshift);
+ label.lft( btex $\frac{d\, f}{d\, x}$ etex scaled 1.35, (0,ysize-yshift) );
+ label.lft( btex $f$ etex, z3 );
+ draw o.dtriang withpen pencircle scaled 2pt;
+ label.lft( btex 2 etex, z40 );
+ label.lft( btex -2 etex, z4 );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/diameters.mp b/Master/texmf-dist/doc/metapost/featpost/example/diameters.mp
new file mode 100644
index 00000000000..82bae329765
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/diameters.mp
@@ -0,0 +1,36 @@
+
+beginfig(1);
+ pair po, pa, pb, pc, pd, pe, pf, pg;
+ numeric u, ang, bigray, smaray, i;
+ path smacirc, heigray;
+ u = 0.2mm;
+ ang = 40;
+ bigray = 250u;
+ smaray = 205u;
+ po = (105mm,145mm);
+ pa = po - bigray*dir( ang );
+ pb = po + (2*smaray-bigray)*dir( ang );
+ pc = po + bigray*dir( ang );
+ pe = po + bigray*dir( ang + 90 );
+ pf = po + (smaray-bigray)*dir( ang );
+ pg = po - bigray*dir( ang + 90 );
+ heigray = po--pe;
+ smacirc = (fullcircle scaled (2*smaray)) shifted pf;
+ pd = heigray intersectionpoint smacirc;
+ draw pg--pe;
+ draw smacirc;
+ draw (fullcircle scaled (2*bigray)) shifted po;
+ draw pc--pa--pd--pb;
+ draw pd--pe withcolor red;
+ draw pb--pc withcolor red;
+ dotlabel.bot( "O", po );
+ dotlabel.llft( "A", pa );
+ dotlabel.bot( "B", pb );
+ dotlabel.urt( "C", pc );
+ dotlabel.top( "D", pd );
+ dotlabel.ulft( "E", pe );
+ dotlabel.top( "F", pf );
+endfig;
+
+end.
+ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/directfonts.mp b/Master/texmf-dist/doc/metapost/featpost/example/directfonts.mp
new file mode 100644
index 00000000000..975aa905e5d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/directfonts.mp
@@ -0,0 +1,20 @@
+% directfonts.mp
+% Check out /usr/share/texmf/fonts/tfm/public/
+% or /usr/TeX/texmf/fonts/tfm/public
+
+prologues := 3;
+
+beginfig(0);
+ numeric xCoord;
+ xCoord = 3in;
+ defaultfont := "bchr8r";
+ label( "QWERTYUIOPasdfghjklZXCVBNM", (xCoord, 4cm) );
+ label( "What gives?", (xCoord, 3cm) );
+ defaultfont := "cmss17";
+ label( "0.123,456,789", (xCoord, 2cm) );
+% defaultfont := "fplmr";
+% label( "áéíóúàèìòùãõçÁÉÍÓÚÀÈÌÒÙÃÕÇ°", (xCoord, 0) );
+endfig;
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/durgayantra.mp b/Master/texmf-dist/doc/metapost/featpost/example/durgayantra.mp
new file mode 100644
index 00000000000..8c729149e6a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/durgayantra.mp
@@ -0,0 +1,174 @@
+% durgayantra.mp
+% L. Nobre G.
+% 2010
+
+prologues := 1;
+
+numeric u, numthings, bang, tang, hei, rb, rt, ro;
+numthings = 8;
+bang = 75;
+tang = 75;
+rb = u+hei;
+rt = rb+hei;
+ro = rt+2.5mm;
+numeric adang, reflen, marlen, sqrlen;
+adang = 19.896;
+reflen = 0.4*ro;
+marlen = ro*sqrt(2)*(sind(45+adang)-0.5*sqrt(2));
+hei = marlen/6;
+ro+marlen+hei = 18mm; % defines u and hei
+color fundo, risco;
+fundo = (15*16+15,14*16+11,12*16+13)/255;
+risco = (11*16-15,3*16-14,15*16-15)/255;
+
+vardef makedurgayantra =
+ path outercircle, firstcircle, seconcircle;
+ draw fullcircle scaled (2*u);
+ draw fullcircle scaled (2*rb);
+ draw fullcircle scaled (2*rt);
+ path pthingb, pthingbr;
+ pthingb = (rt,0){dir(90-bang)}..
+ {dir(180/numthings+90-tang)}(ro*dir(180/numthings));
+ pthingbr = pthingb yscaled (-1);
+ numeric i;
+ for i=1 upto numthings:
+ draw (reverse pthingbr) rotated ((i+0.5)*360/numthings);
+ draw pthingb rotated ((i+0.5)*360/numthings);
+ endfor;
+ z200 = (ro+marlen,0);
+ z201 = (ro+marlen,1.5*reflen);
+ z202 = (ro+0.5*marlen,1.5*reflen);
+ z203 = (ro+0.5*marlen,0.5*reflen);
+ z204 = (ro,0.5*reflen);
+ z205 = (ro,ro);
+ z100 = z200-(hei,0);
+ z101 = z201-(hei,hei);
+ z102 = z202+(hei,-hei);
+ z103 = z203+(hei,-hei);
+ z104 = z204-(hei,hei);
+ z105 = z205-(hei,hei);
+ z300 = z200+(hei,0);
+ z301 = z201+(hei,hei);
+ z302 = z202-(hei,-hei);
+ z303 = z203-(hei,-hei);
+ z304 = z204+(hei,hei);
+ z305 = z205+(hei,hei);
+ path octp[], octpr[];
+ numeric j;
+ octp[1] = z200--z201--z202--z203--z204--z205;
+ octp[0] = z100--z101--z102--z103--z104--z105;
+ octp[2] = z300--z301--z302--z303--z304--z305;
+ for j=0 upto 2:
+ octpr[j] = (reverse octp[j]) yscaled (-1) ;
+ for i=1 upto 4:
+ draw octpr[j] rotated (i*90);
+ draw octp[j] rotated (i*90);
+ endfor;
+ endfor;
+ z1 = (0,-u);
+ z2 = u*0.5*(sqrt(3),1);
+ z3 = u*0.5*(-sqrt(3),1);
+ draw z1--z2--z3--cycle;
+ numeric refang, xr, dr;
+ xr = sqrt(15);
+ dr = (xr-sqrt(3))*u*0.25;
+ refang = angle(xr,1); show refang;
+ z11 = u*0.25*(xr,-1);
+ z12 = 0.5[z2,z3]+dr*dir(60);
+ z13 = 0.5[z2,z3]+dr*dir(120);
+ z14 = u*0.25*(-xr,-1);
+ z15 = 0.5[z1,z3]+dr*dir(-120);
+ z16 = 0.5[z2,z1]+dr*dir(-60);
+% z11 = u*dir(-refang);
+% z12 = u*dir(90-refang);
+% z13 = u*dir(90+refang);
+% z14 = u*dir(refang-180);
+% z15 = u*dir(3*refang-180);
+% z16 = u*dir(-3*refang);
+ draw z11--z12--z15--z16--z13--z14--cycle;
+enddef;
+
+beginfig(1);
+ numeric hs, al, do, m, diamfur, mfur;
+ hs = 20mm;
+ al = 16cm;
+% do = 3mm;
+ do = 0;
+ m = 3.8mm;
+% diamfur = 3mm;
+ mfur = 6mm;
+ z21 = (hs,m-hs);
+ z22 = (hs,al-hs+do-m);
+ z23 = (hs-m,al-hs+do);
+ z24 = (m-hs,al-hs+do);
+ z25 = (-hs,al-hs+do-m);
+ z26 = (-hs,m-hs);
+ z27 = (m-hs,-hs);
+ z28 = (hs-m,-hs);
+ fill z21---z22...z23---z24...z25---z26...z27---z28...cycle withcolor fundo;
+% draw (hs,al-hs)--(-hs,al-hs) dashed evenly;
+% draw fullcircle scaled diamfur shifted (mfur-hs,al-hs-mfur);
+% draw fullcircle scaled diamfur shifted (hs-mfur,al-hs-mfur);
+
+ drawoptions( withpen pencircle scaled 0.3mm withcolor risco );
+ makedurgayantra;
+ drawoptions( withpen pencircle scaled 0.1mm withcolor risco );
+ numeric lettersiz, lr, ls, lh;
+ lettersiz = 1.1mm;
+ lr = 1+0.5*sqrt(2);
+ ls = 0.9mm;
+ lh = lettersiz*lr;
+ path lepa[];
+ pair av, auxa, lc, auxd;
+ numeric lph[], auxb, auxc;
+ auxc = 0.5*lettersiz;
+ lc = (hs-m,0.5*al-hs);
+ av = (auxc,lh);
+ lepa0 = origin--av--(lettersiz,0);
+ lph0 = 0;
+ auxa = (lh-lettersiz)*unitvector(av);
+ lepa7 = auxa--(lettersiz-xpart auxa, ypart auxa);
+ lph7 = 0;
+ lepa1 = origin--(0,lh)---av...(auxc,lh-lettersiz)---(0,lh-lettersiz);
+ lph1 := lettersiz+ls;
+ lepa2 = origin--(0,lh)--(auxc,lh-auxc)--(lettersiz,lh)--(lettersiz,0);
+ lph2 = 2*(lettersiz+ls);
+ auxb = 0.25*lettersiz*sqrt(2);
+ lepa3 = (auxc-auxb,0.5*lh+auxb)--(auxc+auxb,0.5*lh-auxb);
+ lepa13 = (auxc-auxb,0.5*lh-auxb)--(auxc+auxb,0.5*lh+auxb);
+ lph3 = 3*(lettersiz+ls);
+ lph13 = lph3;
+ lepa4 = (0,lh)--origin--(lettersiz,0);
+ lph4 = 4*(lettersiz+ls);
+ lepa5 = origin--(0,lh)--(lettersiz,0)--(lettersiz,lh);
+ lph5 = 5*(lettersiz+ls);
+ lepa6 = (lettersiz,lh-auxc){up}...av...(0,lh-auxc)---(0,auxc)...(auxc,0)...(lettersiz,auxc)--(auxc,auxc);
+ lph6 = 6*(lettersiz+ls);
+ lepa8 = (lettersiz,auxc)--(lettersiz,0);
+ lph8 = lph6;
+ auxd = sqrt(2)*auxc*(1,1);
+ lepa9 = (0,lh-auxc){up}...av...(lettersiz,lh-auxc)...auxd---origin--(lettersiz,0);
+ lph9 = 8*(lettersiz+ls);
+ lepa10 = (0,auxc)---(0,lh-auxc)...av...(lettersiz,lh-auxc)---(lettersiz,auxc)...(auxc,0)...cycle;
+ lph10 = lph9 + lettersiz + ls;
+ lepa11 = (0,lh-ypart auxd)--(xpart auxd,lh)--(xpart auxd,0);
+ lph11 = lph10 + lettersiz + ls;
+ lepa12 = lepa10;
+ lph12 = lph11 + ls + xpart auxd;
+ numeric i;
+ for i=0 upto 13:
+ draw lepa[i] rotated 90 shifted (lc+(0,lph[i]));
+ endfor;
+ picture finalpicture;
+ finalpicture = currentpicture;
+ currentpicture := nullpicture;
+ drawoptions();
+ draw finalpicture rotated (-45);
+endfig;
+
+beginfig(2);
+% drawoptions( withcolor risco );
+ makedurgayantra;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/electrospiral.mp b/Master/texmf-dist/doc/metapost/featpost/example/electrospiral.mp
new file mode 100644
index 00000000000..7ed2200e9f0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/electrospiral.mp
@@ -0,0 +1,50 @@
+% electrospiral.mp
+% L. Nobre G.
+% 2004
+
+numeric turnstep;
+turnstep = 1cm;
+
+def spiral( expr Ang ) =
+ begingroup
+ numeric k, r;
+ k = turnstep/360.0;
+ r = k*Ang;
+ ( r*dir(Ang) )
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric i, angstep, actx, ray, corner, sider;
+ path spir, cutter;
+ pair thispos, sw, nw, ne, se, actpos;
+ angstep = 30;
+ ray = 0.7mm;
+ corner = 4.2;
+ sider = 10.5;
+ spir = origin..
+ for i=angstep step angstep until 4000-1:
+ spiral(i)..
+ endfor
+ spiral(4000);
+ draw spir;
+ actx = 1;
+ forever:
+ thispos := (turnstep*actx,0);
+ for i=1 upto actx:
+ actpos := thispos+ray*normaldeviate*dir(uniformdeviate(359));
+ draw actpos withpen pencircle scaled 1.5mm;
+ endfor;
+ actx := 2*actx;
+ exitif actx > 9;
+ endfor;
+ sw = turnstep*(-corner,-corner);
+ nw = turnstep*(-corner,corner);
+ ne = turnstep*(sider,corner);
+ se = turnstep*(sider,-corner);
+ cutter = sw--nw--ne--se--cycle;
+ clip currentpicture to cutter;
+endfig;
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ellipticextrusionpress.mp b/Master/texmf-dist/doc/metapost/featpost/example/ellipticextrusionpress.mp
new file mode 100644
index 00000000000..ed2b4cbfdb0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ellipticextrusionpress.mp
@@ -0,0 +1,31 @@
+% ellipticextrusionpress.mp
+% L. Nobre G.
+% 2011
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, a, b, i, j, n, angstep, halflen;
+ pair vec[];
+ u = 1cm;
+ a = 8u;
+ b = 2u;
+ n = 40;
+ angstep = 180/n;
+ halflen = a*0.5*3.14159;
+ draw (-halflen,u)--(halflen,u);
+ draw (-u,u)--(-u,0)--(u,0)--(u,u);
+ for i=0 upto n:
+ vec[i] = (a*sind(i*angstep),-b*cosd(i*angstep));
+ draw ((-halflen,a)+vec[i])
+ for j=1 upto n:
+ --((a*j*3.14159/n-halflen,a)+(vec[i] rotated (-j*angstep)))
+ endfor;
+ endfor;
+ draw ((0,a)+(vec[0] rotated (-90)))
+ for j=1 upto n:
+ ..((0,a)+(vec[j] rotated (-90)))
+ endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ellipticproperties.mp b/Master/texmf-dist/doc/metapost/featpost/example/ellipticproperties.mp
new file mode 100644
index 00000000000..48ee6905a2d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ellipticproperties.mp
@@ -0,0 +1,45 @@
+% ellipticproperties.mp
+% L. Nobre G.
+% 2011
+
+prologues := 1;
+
+beginfig(1);
+ numeric b, k, kt, theta, i, ste, N, aux, cp, cm;
+ numeric gamma, gammb, alpha, rhoa, alphb, rhob, fx, fy;
+ pair X, Y, A, B, U, L;
+ path ell;
+ b = 35;
+ k = 0.85;
+ theta = 30;
+ ste = 10;
+ N = 5;
+ X = k*b*right;
+ Y = b*dir(90-theta);
+ ell = for i=ste step ste until 360: (X*cosd(i)+Y*sind(i)).. endfor cycle;
+ draw ell;
+ draw Y--origin--X;
+ alpha = 0.5*angle((k**2)-1,2*k*sind(theta));
+ alphb = 0.5*angle(1-(k**2),2*k*sind(-theta));
+ A = X*cosd(alpha)+Y*sind(alpha);
+ B = X*cosd(alphb)+Y*sind(alphb);
+ draw B--origin--A;
+ rhoa = abs(A);
+ gamma = angle(A);
+ rhob = abs(B);
+ gammb = angle(B);
+ kt = rhoa/rhob;
+ for i=1 upto N:
+ aux := rhoa+(i-0.5)*k*b;
+ fx := aux*cosd(gamma);
+ fy := aux*sind(-gamma);
+ cp := (rhob*fx/kt+fy*((fx/kt)++fy+-+rhob))/(((fx/kt)**2)+(fy**2));
+ cm := (rhob*fx/kt-fy*((fx/kt)++fy+-+rhob))/(((fx/kt)**2)+(fy**2));
+ U := A*cm-B*(1+-+cm);
+ L := A*cp+B*(1+-+cp);
+ draw U--L--(aux,0)--cycle withcolor blue;
+ draw 0.5[U,L];
+ endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/elliptictable.mp b/Master/texmf-dist/doc/metapost/featpost/example/elliptictable.mp
new file mode 100644
index 00000000000..f1ac37c58d8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/elliptictable.mp
@@ -0,0 +1,83 @@
+% elliptictable.mp
+% L. Nobre G.
+% 2006
+
+verbatimtex \documentclass{article} \begin{document} etex
+
+beginfig(1);
+ numeric u, l, mar, h, i, s, ai, bi, ao, bo, d;
+ u = 0.85mm;
+ l = 125u;
+ d = 0.5l;
+ mar = 12.0u;
+ h = 70u;
+ s = 5;
+ z1 = (l-2mar,0);
+ z2 = (l-mar,0);
+ z3 = (l,0);
+ z5 = (l-2mar,d-mar);
+ z6 = (l-2mar,d);
+ z7 = (l-mar,d);
+ z8 = (l,d);
+ z10= (l-2mar-h,d-mar);
+ z11= (l-2mar-h,d);
+ z12= (0,d);
+ z13= (0,d-mar);
+ ai = l-2mar;
+ bi = (d-mar)/(1+-+((l-2mar-h)/ai));
+ z14= (ai+-+bi,0);
+ ao = l-mar;
+ bo = d/(1+-+((l-2mar-h)/ao));
+ z15= (ao+-+bo,0);
+ path ellin, elout, cutpe, cutpb, bordo;
+ ellin = z1 for i=s step s until 90: ..(ai*cosd(i),bi*sind(i)) endfor;
+ elout = z2 for i=s step s until 90: ..(ao*cosd(i),bo*sind(i)) endfor;
+ cutpe = (1.1[z11,z10])--(1.1[z10,z11]);
+ cutpb = z1--z6;
+ bordo = elout cutafter cutpe cutbefore cutpb;
+ z4 = point 0 of bordo;
+ z9 = bordo intersectionpoint (z5--z13);
+ draw z3--z8--z6--z4;
+ draw z5--z9;
+ draw z2--z7;
+ draw ellin--z12--z11--(reverse bordo)--z1;
+ draw z6--z11--z10;
+ draw currentpicture xscaled -1;
+ pen pendot;
+ pendot = pencircle scaled 2u;
+ z22= (l,d-mar*ai/bi);
+ z23= (l-2mar,d-mar*ai/bi);
+% draw z22{up}..z7{left}..{down}z23;
+ z24= z7+down*mar;
+ draw z22--z24--z23;
+ drawoptions( dashed evenly );
+ z17 = (ai,bi)*sqrt(2.0)*0.5;
+ z18 = z17 - h*unitvector((bi,ai));
+ draw z17--z18;
+ z19 = (0,-y18-x18*bi/ai);
+ z20 = z19+whatever*(ai,-bi);
+ z20 = z17-whatever*(bi,ai);
+ z21 = z20-l*unitvector((ai,-bi));
+ draw z20--z21;
+ drawoptions();
+ draw z14 withpen pendot;
+ draw z15 withpen pendot;
+ draw z17 withpen pendot;
+% dotlabels.bot( 17, 18, 20, 21 );
+ picture tmppic;
+ tmppic = currentpicture;
+ currentpicture := nullpicture;
+ z16= (105mm,145mm);
+ draw tmppic rotated 90 shifted z16;
+ draw tmppic rotated -90 shifted z16;
+ label.rt( decimal((x14)/u), z14 rotated 90 shifted z16 );
+ label.lft( decimal((x15)/u), z15 rotated 90 shifted z16 );
+ label.rt( decimal((x17)/u), z17 rotated 90 shifted z16 );
+ tmppic := currentpicture;
+ currentpicture := nullpicture;
+ draw tmppic shifted (-z16) rotated (-90) shifted z16;
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ellipticthing.mp b/Master/texmf-dist/doc/metapost/featpost/example/ellipticthing.mp
new file mode 100644
index 00000000000..d681c99fe4d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ellipticthing.mp
@@ -0,0 +1,47 @@
+% ellipticthing.mp
+% L. Nobre G.
+% 2011
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, a, b, i, n, astep;
+ u = 1cm;
+ a = 5u;
+ b = 3u;
+ n = 24;
+ astep = 360/n;
+ path elli, arcb;
+ elli = (a,0) for i=1 upto (n-1):
+ ..(a*cosd(i*astep),b*sind(i*astep))
+ endfor ..cycle;
+ draw elli;
+ draw fullcircle scaled (2*b);
+ draw fullcircle scaled (a-b) shifted (0.5*(a+b),0);
+ draw fullcircle scaled (a-b) shifted (-0.5*(a+b),0);
+ pair refpoint, refslope, centerpo, focus;
+ refpoint = (a,b)/sqrt(2);
+ refslope = unitvector(b,a);
+ centerpo = refpoint + whatever*refslope;
+ xpart centerpo = 0;
+ draw centerpo--refpoint;
+ draw centerpo--(-xpart refpoint,ypart refpoint);
+ numeric len, ang, lenb, angb;
+ len = abs(refpoint-centerpo);
+ ang = angle(refpoint-centerpo);
+ draw refpoint for i=1 upto n:
+ ..(centerpo+len*dir(2*i*(90-ang)/n+ang))
+ endfor;
+ focus = (4u,0);
+ lenb = abs(focus-centerpo);
+ angb = angle(focus-centerpo);
+ arcb = focus for i=1 upto n:
+ ..(centerpo+lenb*dir(2*i*(90-angb)/n+angb))
+ endfor;
+ draw arcb;
+ draw arcb rotated 180;
+ draw centerpo--focus;
+ draw centerpo--(-xpart focus,ypart focus);
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/equilatrianglelines.mp b/Master/texmf-dist/doc/metapost/featpost/example/equilatrianglelines.mp
new file mode 100644
index 00000000000..c77731e971b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/equilatrianglelines.mp
@@ -0,0 +1,40 @@
+% equilatrianglelines.mp
+% L. Nobre G.
+% 2009
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, factordown, ang, angl, angh, ydown, xl, xh, astep;
+ pen pendot;
+ path uline, rline, dline;
+ pair auxp;
+ u = 2cm;
+ factordown = 2.34;
+ astep = 2.75;
+ xl = -2u;
+ xh = 10u;
+ angl = 7;
+ angh = 38;
+ pendot = pencircle scaled (2.5mm);
+ ydown = -u*factordown;
+ uline = (xl,u)--(xh,u);
+ rline = uline rotated (-60);
+ dline = (xl,ydown)--(xh,ydown);
+ draw uline;
+ draw (xl,0)--(xh,0);
+ draw dline;
+ draw rline;
+ z1 = rline intersectionpoint dline;
+ draw z1 withpen pendot;
+ draw origin withpen pendot;
+ for ang=angl step astep until angh:
+ pair uapex;
+ ypart uapex = u;
+ uapex = whatever*dir(ang);
+ auxp := uapex+abs(uapex)*dir(ang-120);
+ draw origin--uapex--auxp--cycle;
+ endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/esteveslogo.mp b/Master/texmf-dist/doc/metapost/featpost/example/esteveslogo.mp
new file mode 100644
index 00000000000..3525e4fc059
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/esteveslogo.mp
@@ -0,0 +1,52 @@
+
+prologues:=1;
+
+numeric u;
+1u = 1mm;
+
+
+beginfig (1);
+
+ a = 40u;
+ g = 90;
+
+ z1 = right rotated g scaled a;
+ z2 = z1 rotated 120;
+ z3 = z1 rotated 240;
+
+ path c[];
+ c1 = fullcircle rotated g scaled 1/2a;
+ for k = 2 upto 4:
+ c[k] = c1 scaled k;
+ endfor
+
+ p = 2q;
+ p + q = 1/4a;
+ d = 2q;
+
+ path r[], s[], s[]';
+ for k = 1 upto 3:
+ r[k] = (0,0)--z[k];
+ s[k] = r[k] shifted (down scaled (p/2+d) rotated angle z[k]);
+ s[k]' = r[k] shifted (up scaled (p/2+d) rotated angle z[k]);
+ endfor
+
+ pen rpen, cpen;
+ cpen := pencircle scaled p;
+ rpen := pencircle scaled p;
+
+ pickup cpen;
+ filldraw c1 withcolor 0.75 red;
+
+ linecap := rounded;
+ draw c2 cutbefore s1' cutafter s1;
+ draw c3 cutbefore s1' cutafter s2;
+ draw c3 cutbefore s2' cutafter s1;
+ draw c4 cutbefore s1' cutafter s2;
+ draw c4 cutbefore s2' cutafter s3;
+ draw c4 cutbefore s3' cutafter s1;
+
+endfig;
+
+
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/experimental2Dsetup.mp b/Master/texmf-dist/doc/metapost/featpost/example/experimental2Dsetup.mp
new file mode 100644
index 00000000000..d922453286e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/experimental2Dsetup.mp
@@ -0,0 +1,175 @@
+% experimental2Dsetup.mp
+% L. Nobre G.
+% 2002
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+% linecap := squared;
+
+ numeric salto, shif, rotang, cfac, posang;
+ numeric innerray, outerray, midleray, thebiray, otherray;
+ numeric midmidcir, midotharc, lblfac, wavecray, midwavarc;
+ path loricir, roricir, baserec, sampleh, wavecarc;
+ path innercirc, outercirc, midlecirc, otherarch;
+ path oridirh, oridirn, oridirp, oridirv, oridire;
+ path dirhoriz, dirnegat, dirposit, dirverti, direff;
+ path lowcut, higcut, glassre, wavecarch, field;
+ pair midmidcirpos, midotharcpos, midwavarcpos, mideffcirpos;
+ pen thickpen;
+ color samplecolor, magnetcolor, samplebordercolor;
+ picture lblpiplu, lblalpha, lblwavec, lblqu, lblno, lblfield;
+ numeric hei, wid, thi, pro, pol, mar;
+ path themagnet, effcirc, diry, oridiry;
+ numeric circleray, squareray, glasssize, effang, effraya, effrayb;
+ picture lblx, lbly, lbleff;
+ numeric mideffcir, yray;
+ pair lastoridire;
+
+ pickup pencircle scaled 0.15mm;
+ thickpen = pencircle scaled 1.7bp;
+
+ samplecolor = 0.88white;
+ magnetcolor = 0.37white;
+ samplebordercolor = 0.1white;
+% samplecolor = (0.85,0.9,0.8);
+% magnetcolor = (0.2,0.27,0.58);
+% samplebordercolor = blue;
+ salto = 1mm;
+ rotang = 7;
+ posang = -28;
+ effang = -20;
+ shif = 50salto;
+ thi = 5salto;
+ pol = 25salto;
+ pro = 8salto;
+ wid = 58salto;
+ cfac = 0.5;
+ lblfac = 1.5;
+ innerray = 27salto;
+ circleray = 0.93innerray;
+ squareray = 0.93circleray;
+ glasssize = 0.42squareray;
+ outerray = 60salto;
+ midleray = 55salto;
+ yray = 53salto;
+ thebiray = 145salto;
+ otherray = 115salto;
+ wavecray = 0.5*(thebiray+otherray);
+ effraya = 0.45*(midleray+otherray);
+ effrayb = 0.56*(midleray+otherray);
+ innercirc = fullcircle scaled innerray;
+ outercirc = fullcircle scaled outerray;
+ midlecirc = (halfcircle cutbefore (origin--dir(90+posang)))
+ scaled midleray;
+ midmidcir = 0.5*length midlecirc;
+ midmidcirpos = point midmidcir of midlecirc;
+ effcirc = ((halfcircle cutbefore (origin--dir(90+effang)))
+ cutafter (origin--up))
+ scaled effraya;
+ mideffcir = 0.5*length effcirc;
+ mideffcirpos = point mideffcir of effcirc;
+ otherarch = ((halfcircle cutbefore (origin--dir(90+posang)))
+ cutafter (origin--up))
+ scaled otherray;
+ midotharc = 0.5*length otherarch;
+ midotharcpos = point midotharc of otherarch;
+ wavecarch = ((halfcircle cutafter (origin--dir(90+rotang)))
+ cutbefore (origin--up))
+ scaled wavecray;
+ midwavarc = 0.5*length wavecarch;
+ midwavarcpos = point midwavarc of wavecarch;
+ oridirh = origin--0.5*outerray*left;
+ oridirv = origin--0.5*thebiray*up;
+ oridirn = origin--0.5*thebiray*dir(90+rotang);
+ oridirp = origin--0.5*wavecray*dir(90+posang);
+ oridiry = origin--0.5*yray*dir(180+posang);
+ lastoridire = 0.5*effrayb*dir(90+effang);
+ oridire = origin--lastoridire;
+ dirhoriz = oridirh cutbefore innercirc;
+ dirverti = oridirv cutbefore innercirc;
+ dirnegat = oridirn cutbefore innercirc;
+ dirposit = oridirp cutbefore innercirc;
+ direff = oridire cutbefore innercirc;
+ diry = oridiry cutbefore innercirc;
+ field = (0.5innerray,0)--(0.5wid-salto,0);
+ loricir = halfcircle scaled circleray rotated 90;
+ roricir = halfcircle scaled circleray rotated 270;
+ baserec = (unitsquare shifted (-0.5*(1,1)))
+ xscaled 2
+ scaled squareray;
+ glassre = (unitsquare shifted (-0.5*(1,1)))
+ yscaled (13.0/6.0)
+ scaled glasssize;
+ lowcut = subpath (0,1) of baserec;
+ higcut = subpath (2,3) of baserec;
+ sampleh = buildcycle( higcut, loricir, reverse lowcut, roricir );
+ draw glassre rotated 90 dashed evenly withcolor (cfac*white);
+% draw glassre rotated rotang dashed evenly withcolor (cfac*(white-blue));
+ fill glassre rotated posang withcolor samplecolor;
+ draw glassre rotated posang withcolor samplebordercolor;
+ draw sampleh rotated posang withpen thickpen withcolor blue;
+ drawarrow reverse midlecirc;
+ drawarrow reverse otherarch;
+ drawarrow wavecarch;
+ drawarrow reverse effcirc;
+ draw dirhoriz dashed evenly scaled 2;
+ draw dirverti dashed evenly scaled 2;
+ drawarrow dirnegat withpen thickpen;
+ drawarrow dirposit withpen thickpen;
+ drawarrow direff withpen thickpen;
+ drawarrow reverse field withpen thickpen;
+ drawarrow direff withpen thickpen;
+ drawarrow diry withpen thickpen;
+ lblpiplu = btex $\alpha = \frac{\pi}{2}+\beta$ etex scaled lblfac;
+ lblalpha = btex $\beta$ etex scaled lblfac;
+ lblwavec = btex $\Psi$ etex scaled lblfac;
+ lblqu = btex $\vec{q}\,$ etex scaled lblfac;
+ lblno = btex $\vec{n}_0$ etex scaled lblfac;
+ lblfield = btex $\vec{B}$ etex scaled lblfac;
+ lblx = btex $x$ etex scaled lblfac;
+ lbly = btex $y$ etex scaled lblfac;
+ lbleff = btex $\beta_{\mbox{\small eff}}$ etex scaled lblfac;
+ label.ulft( lblpiplu, midmidcirpos );
+ label.top( lblalpha, midotharcpos );
+ label.top( lblwavec, midwavarcpos );
+ label.llft( lblqu, point 0.7 of dirnegat );
+ label.lrt( lblx, point 0.7 of dirposit );
+ label.top( lblfield, point 0.5 of field );
+ label.llft( lbly, point 0.5 of diry );
+ label.top( lbleff, mideffcirpos );
+ label.top( lblno, lastoridire );
+ hei = pol+4thi;
+ mar = (hei-2*thi-pol)*0.5;
+ z100 = (pro,mar);
+ z0 = (wid,pol)*0.5;
+ z1 = z0 + z100;
+ z2 = z1 + (thi,0);
+ z3 = (xpart z2, pol*0.5+mar-hei);
+ z4 = (-xpart z2, ypart z3);
+ z5 = (-xpart z2, ypart z2);
+ z6 = (-xpart z1, ypart z1);
+ z7 = (-xpart z0, ypart z0);
+ z8 = (xpart z7, -pol*0.5);
+ z9 = z8 - z100;
+ z10 = z9 - (0,thi);
+ z11= (xpart z1, ypart z10);
+ z12= z11+ (0,thi);
+ z13= (xpart z0, -ypart z0);
+ themagnet = z0--z1--z2--z3--z4--z5--z6--z7--
+ z8--z9--z10--z11--z12--z13--cycle;
+ fill themagnet withcolor magnetcolor;
+ draw themagnet withpen thickpen;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/f1aula03.mp b/Master/texmf-dist/doc/metapost/featpost/example/f1aula03.mp
new file mode 100644
index 00000000000..2b82f4af231
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/f1aula03.mp
@@ -0,0 +1,104 @@
+% f1aula03.mp
+% L. Nobre G.
+% 2010 removed package icomma
+
+verbatimtex
+\documentclass{beamer}
+\usepackage{amsmath,amssymb}
+\usepackage[squaren]{SIunits}
+\usepackage[latin1]{inputenc}
+\usepackage[portuges]{babel}
+\newcommand{\veri}{\ensuremath{\hat{\text{i}}}}
+\newcommand{\verj}{\ensuremath{\hat{\text{j}}}}
+\newcommand{\verk}{\ensuremath{\hat{\text{k}}}}
+\newcommand{\veru}{\ensuremath{\hat{\text{u}}}}
+\newcommand{\emf}{\ensuremath{\mathcal{E}}}
+\newcommand{\vecnorm}[1]{\left|\left|\vec{#1}\right|\right|}
+\renewcommand{\arraystretch}{1.45}
+\begin{document}
+\frame{
+etex
+
+ahangle := 36;
+ahlength := 3.5mm;
+labeloffset := 3.5mm;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {} []
+beginfig(1);
+ pen basepen, vecpen;
+ basepen = pencircle scaled 0.5mm;
+ vecpen = pencircle scaled 1.15mm;
+ path mainaxe;
+ numeric malen, mastep, matic, lscale;
+ malen = 10cm;
+ mastep = 5mm;
+ matic = 2mm;
+ lscale = 2.5;
+ mainaxe = origin--(malen,0);
+ drawarrow mainaxe withpen basepen;
+ label.bot( btex $x$ etex scaled lscale, (malen,0) );
+ pair refpa, refpb, refpc;
+ refpa = (6mastep,0);
+ refpb = (12mastep,0);
+ refpc = (14mastep,0);
+ drawarrow refpb--refpa withpen vecpen withcolor red;
+ label.top( btex $\vec{v}$ etex scaled lscale, 0.5[refpa,refpb] );
+ drawarrow refpb--refpc withpen vecpen withcolor blue;
+ label.top( btex \veri etex scaled lscale, 0.5[refpc,refpb] );
+ numeric i;
+ for i=mastep step 2mastep until malen-2mastep:
+ draw (i,-0.5matic)--(i,0.5matic) withpen basepen;
+ draw (i+mastep,-matic)--(i+mastep,matic) withpen basepen;
+ endfor;
+ label.bot( btex -3 etex scaled lscale, refpa );
+ label.bot( btex 0 etex scaled lscale, refpb );
+ label.bot( btex 1 etex scaled lscale, refpc );
+endfig;
+
+beginfig(2);
+ drawarrow mainaxe withpen basepen;
+ label.bot( btex $x$ etex scaled lscale, (malen,0) );
+ drawarrow refpb--refpa withpen vecpen withcolor red;
+ label.top( btex $\Delta x$ etex scaled lscale, 0.5[refpa,refpb] );
+ draw (6mastep,-matic)--(6mastep,matic) withpen basepen;
+ draw (12mastep,-matic)--(12mastep,matic) withpen basepen;
+ label.bot( btex fim etex scaled lscale, refpa );
+ label.bot( btex início etex scaled lscale, refpb );
+endfig;
+
+beginfig(3);
+ pair refpd;
+ refpd = (malen,-6mastep);
+ drawarrow refpb--refpa withpen vecpen withcolor red;
+ drawarrow refpd--refpa withpen basepen;
+ drawarrow refpd--refpb withpen basepen;
+ label.top( btex $\Delta \vec{x}$ etex scaled lscale, 0.5[refpa,refpb] );
+ label.llft( btex $\vec{x}_2$ etex scaled lscale, 0.5[refpd,refpa] );
+ label.urt( btex $\vec{x}_1$ etex scaled lscale, 0.5[refpd,refpb] );
+endfig;
+
+beginfig(4)
+ numeric an;
+ an = angle(refpd);
+ path angpa, cutp, calfa, cbeta;
+ angpa = refpd--origin--(malen,0);
+ cutp = origin--(28*mastep*dir(-an));
+ calfa = halfcircle scaled (24mastep);
+ calfa := calfa cutafter cutp;
+ cbeta = halfcircle scaled (28mastep);
+ cbeta := cbeta cutafter cutp;
+ drawoptions( withpen basepen );
+ drawarrow angpa;
+ drawarrow fullcircle scaled (12mastep) cutafter angpa;
+ drawarrow calfa rotated an;
+ drawarrow reverse (cbeta rotated an);
+ label.bot( btex $\theta$ etex scaled lscale, (0,-6mastep) );
+ label.llft( btex $\alpha$ etex scaled lscale, refpb );
+ label.lrt( btex $\beta$ etex scaled lscale, refpc );
+endfig;
+
+verbatimtex
+}
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/f1aula05.mp b/Master/texmf-dist/doc/metapost/featpost/example/f1aula05.mp
new file mode 100644
index 00000000000..00b14ba67c8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/f1aula05.mp
@@ -0,0 +1,98 @@
+% f1aula05.mp
+% L. Nobre G.
+% 2007
+
+verbatimtex
+\documentclass{beamer}
+\usepackage{amsmath,amssymb}
+\usepackage[squaren]{SIunits}
+\usepackage[latin1]{inputenc}
+\usepackage[portuges]{babel}
+\newcommand{\veri}{\ensuremath{\hat{\text{i}}}}
+\newcommand{\verj}{\ensuremath{\hat{\text{j}}}}
+\newcommand{\verk}{\ensuremath{\hat{\text{k}}}}
+\newcommand{\veru}{\ensuremath{\hat{\text{u}}}}
+\newcommand{\emf}{\ensuremath{\mathcal{E}}}
+\newcommand{\vecnorm}[1]{\left|\left|\vec{#1}\right|\right|}
+\renewcommand{\arraystretch}{1.45}
+\begin{document}
+\frame{
+etex
+
+ahangle := 29;
+ahlength := 4.7mm;
+labeloffset := 3.5mm;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% {} []
+beginfig(1);
+ pen basepen, vecpen;
+ basepen = pencircle scaled 0.5mm;
+ vecpen = pencircle scaled 1.15mm;
+ numeric ray, lscale, ang, stepang, rang, actang;
+ ray = 5cm;
+ lscale = 2.5;
+ rang = -9;
+ stepang = 18;
+ path thearc;
+ thearc = halfcircle scaled 2ray rotated rang;
+ for ang=0 step stepang until 180+rang:
+ drawarrow origin--(ray*dir(ang)) withpen vecpen;
+ actang := ang;
+ endfor;
+ draw thearc withpen basepen withcolor red;
+ label.llft( btex $\vec{r}$ etex scaled lscale, 0.5*ray*dir(actang) );
+ for ang=0 step stepang until 180+rang:
+ drawarrow (ray,0)--(ray*dir(ang)) withpen vecpen withcolor blue;
+ endfor;
+ label.bot( btex $\vec{r}_0$ etex scaled lscale, (0.5ray,0) );
+ picture colabel;
+ colabel = thelabel.urt(
+ btex $\Delta\vec{r}\rightarrow d\vec{r}\parallel\vec{v}\perp\vec{r}_0$ etex
+ scaled lscale, (ray,0) );
+ draw colabel withcolor blue;
+endfig;
+
+beginfig(2);
+ pen basepen, vecpen;
+ basepen = pencircle scaled 0.5mm;
+ vecpen = pencircle scaled 1.15mm;
+ numeric ray, lscale, ang, stepang, rang, actang, fac;
+ ray = 5cm;
+ lscale = 2.5;
+ rang = -9;
+ stepang = 18;
+ fac = 0.7;
+ path thearc, actv;
+ thearc = halfcircle scaled 2ray rotated rang;
+ for ang=0 step stepang until 180+rang:
+ drawarrow (ray,0)--((ray,0)+fac*ray*dir(ang+90)) withpen vecpen
+ withcolor green;
+ actv := ((ray*dir(ang))--(ray*(dir(ang)+fac*dir(ang+90))));
+ drawarrow actv withpen basepen;
+ actang := ang;
+ endfor;
+ draw thearc withpen basepen withcolor red;
+ label.lrt( btex $\vec{v}$ etex scaled lscale, point 0.5 of actv );
+ for ang=0 step stepang until 180+rang:
+ drawarrow (ray,fac*ray)--((ray,0)+fac*ray*dir(ang+90)) withpen vecpen
+ withcolor blue;
+ endfor;
+ label.rt( btex $\vec{v}_0$ etex scaled lscale, (ray,0.5*fac*ray) );
+ picture colabel, relabel;
+ colabel = thelabel.rt(
+ btex $\Delta\vec{v}\rightarrow d\vec{v}\parallel\vec{a}\perp\vec{v}_0$ etex
+ scaled lscale, (ray,fac*ray) );
+ draw colabel withcolor blue;
+% drawarrow ((0,fac*ray)--(fac*ray*dir(stepang+90))) shifted (ray,-fac*ray)
+% withpen vecpen withcolor blue+green;
+% relabel = thelabel.rt(
+% btex $\Delta\vec{v}\parallel\vec{a}$ etex scaled lscale, (ray,0) );
+% draw relabel withcolor blue+green;
+endfig;
+
+
+verbatimtex
+}
+\end{document}
+etex
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/fis3prex7.mp b/Master/texmf-dist/doc/metapost/featpost/example/fis3prex7.mp
new file mode 100644
index 00000000000..7fb22aad223
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/fis3prex7.mp
@@ -0,0 +1,47 @@
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+beginfig(7);
+ path bobine, bobina, Right, Up, Left, Down;
+ numeric scal, outeray, inneray, rotange, rotanga, tens, dist;
+ pen grossa;
+ scal = 15;
+ inneray = 0.5;
+ outeray = 2.1;
+ rotange = 0;
+ rotanga = 12;
+ tens = 3.6;
+ grossa = pencircle scaled 1pt;
+ dist = scal*0.35*(inneray+outeray);
+ Right = (inneray*scal*right)--(outeray*scal*right);
+ Up = (outeray*scal*up)--(inneray*scal*up);
+ Left = (inneray*scal*left)--(outeray*scal*left);
+ Down = (outeray*scal*down)--(inneray*scal*down);
+ bobine = (Right..tension tens..Up..Left..tension tens..Down..cycle)
+ rotated rotange;
+ bobina = bobine rotated rotanga;
+ draw Right;
+ draw Up;
+ draw Left;
+ draw Down;
+ draw fullcircle scaled (2*inneray*scal);
+ draw fullcircle scaled (2*outeray*scal);
+% draw bobine dashed evenly withpen grossa;
+ draw bobina withpen grossa;
+ z1 = dist*(right+up);
+ z2 = z1 rotated 90;
+ z3 = z1 rotated 180;
+ z4 = z1 rotated -90;
+ label( btex N etex, z1 );
+ label( btex S etex, z2 );
+ label( btex N etex, z3 );
+ label( btex S etex, z4 );
+endfig;
+verbatimtex
+\end{document}
+etex
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/gnupost.mp b/Master/texmf-dist/doc/metapost/featpost/example/gnupost.mp
new file mode 100644
index 00000000000..9ee7d1d4328
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/gnupost.mp
@@ -0,0 +1,110 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2003 Wolfgang Glunz <wglunz@pstoedit.net>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+% Modified by L. Nobre G's Lex scanner %%%%%%%%%%%
+
+beginfig(1);
+ path PreeditedPath[];
+ color bluecolor;
+ bluecolor = (0.607845,0.61569,0.823535);
+
+ linecap := butt;
+ linejoin := mitered;
+
+ PreeditedPath1 = hide(z1=(26.4846,113.11))z1..controls hide(z2=(47.8035,130.71))z2 and hide(z3=(67.1843,138.71))z3..hide(z4=(82.689,138.71))z4
+ ..controls hide(z5=(98.1936,138.71))z5 and hide(z6=(123.389,117.91))z6..hide(z7=(144.708,117.91))z7
+ ..controls hide(z8=(164.088,117.91))z8 and hide(z9=(173.719,138.71))z9..hide(z10=(204.788,138.71))z10
+ ..controls hide(z11=(233.859,138.71))z11 and hide(z12=(241.615,116.244))z12..hide(z13=(290.064,117.91))z13
+ ..controls hide(z14=(336.578,119.51))z14 and hide(z15=(342.304,140.311))z15..hide(z16=(363.711,140.311))z16
+ ..controls hide(z17=(385.03,140.311))z17 and hide(z18=(408.181,129.21))z18..hide(z19=(419.916,111.51))z19
+ ..controls hide(z20=(400.535,125.91))z20 and hide(z21=(376.046,119.227))z21..hide(z22=(354.021,109.91))z22
+ ..controls hide(z23=(328.981,99.3196))z23 and hide(z24=(295.878,85.9104))z24..hide(z25=(268.745,95.5105))z25
+ ..controls hide(z26=(241.612,105.11))z26 and hide(z27=(214.479,109.91))z27..hide(z28=(191.222,101.91))z28
+ ..controls hide(z29=(167.965,93.9104))z29 and hide(z30=(127.265,85.9104))z30..hide(z31=(100.132,101.91))z31
+ ..controls hide(z32=(72.9985,117.91))z32 and hide(z33=(55.5559,121.11))z33..cycle;
+
+ filldraw PreeditedPath1 withcolor bluecolor;
+
+ PreeditedPath3 = hide(z67=(101.492,205.833))z67..controls hide(z68=(114.075,219.402))z68 and hide(z69=(125.514,225.569))z69..hide(z70=(134.666,225.569))z70
+ ..controls hide(z71=(143.817,225.569))z71 and hide(z72=(158.688,209.533))z72..hide(z73=(171.271,209.533))z73
+ ..controls hide(z74=(182.71,209.533))z74 and hide(z75=(188.394,225.569))z75..hide(z76=(206.733,225.569))z76
+ ..controls hide(z77=(223.892,225.569))z77 and hide(z78=(228.469,208.249))z78..hide(z79=(257.065,209.533))z79
+ ..controls hide(z80=(284.52,210.767))z80 and hide(z81=(287.899,226.803))z81..hide(z82=(300.535,226.803))z82
+ ..controls hide(z83=(313.118,226.803))z83 and hide(z84=(326.782,218.245))z84..hide(z85=(333.708,204.599))z85
+ ..controls hide(z86=(322.269,215.701))z86 and hide(z87=(307.815,210.548))z87..hide(z88=(294.815,203.366))z88
+ ..controls hide(z89=(280.036,195.201))z89 and hide(z90=(260.497,184.863))z90..hide(z91=(244.482,192.264))z91
+ ..controls hide(z92=(228.467,199.665))z92 and hide(z93=(212.452,203.366))z93..hide(z94=(198.725,197.198))z94
+ ..controls hide(z95=(184.998,191.031))z95 and hide(z96=(160.976,184.863))z96..hide(z97=(144.961,197.198))z97
+ ..controls hide(z98=(128.946,209.533))z98 and hide(z99=(118.651,212))z99..cycle;
+
+ filldraw PreeditedPath3 withcolor bluecolor;
+
+ PreeditedPath4 = hide(z166=(217.85,207.797))z166
+ ..controls hide(z167=(236.119,207.797))z167 and hide(z168=(249.691,188.745))z168..hide(z169=(249.691,162.646))z169
+ ..controls hide(z170=(249.691,137.069))z170 and hide(z171=(236.38,119.583))z171..hide(z172=(217.328,119.583))z172
+ ..controls hide(z173=(200.103,119.583))z173 and hide(z174=(188.097,137.069))z174..hide(z175=(188.097,162.646))z175
+ ..controls hide(z176=(188.097,189.267))z176 and hide(z177=(200.103,207.797))z177..cycle;
+
+ clip currentpicture to PreeditedPath4;
+ picture gthrough;
+ gthrough = currentpicture;
+ filldraw PreeditedPath1 withcolor bluecolor;
+ filldraw PreeditedPath3 withcolor bluecolor;
+
+ PreeditedPath5 = hide(z133=(249.169,235.984))z133--hide(z134=(249.169,214.322))z134..controls hide(z135=(238.207,231.025))z135 and hide(z136=(226.201,238.333))z136..hide(z137=(210.02,238.333))z137
+ ..controls hide(z138=(176.614,238.333))z138 and hide(z139=(151.558,205.709))z139..hide(z140=(151.558,162.124))z140
+ ..controls hide(z141=(151.558,118.278))z141 and hide(z142=(174.526,89.0466))z142..hide(z143=(209.237,89.0466))z143
+ ..controls hide(z144=(225.679,89.0466))z144 and hide(z145=(235.597,94.0056))z145..hide(z146=(249.169,109.404))z146
+ --hide(z147=(249.169,90.3516))z147..controls hide(z148=(249.169,73.3872))z148 and hide(z149=(236.38,61.6428))z149..hide(z150=(218.111,61.6428))z150
+ ..controls hide(z151=(204.278,61.6428))z151 and hide(z152=(195.144,67.3845))z152..hide(z153=(192.273,78.0852))z153
+ --hide(z154=(154.429,78.0852))z154..controls hide(z155=(154.69,67.1235))z155 and hide(z156=(158.866,59.5549))z156..hide(z157=(168.262,51.7251))z157
+ ..controls hide(z158=(179.484,42.5906))z158 and hide(z159=(195.144,38.1536))z159..hide(z160=(216.806,38.1536))z160
+ ..controls hide(z161=(259.347,38.1536))z161 and hide(z162=(283.88,57.2061))z162..hide(z163=(283.88,90.3516))z163
+ --hide(z164=(283.88,235.984))z164--hide(z165=(249.169,235.984))z165--cycle;
+
+ filldraw PreeditedPath5;
+
+ unfill PreeditedPath4;
+ draw gthrough;
+
+ PreeditedPath6 = hide(z178=(58.4002,162.71))z178..controls hide(z179=(76,180.311))z179 and hide(z180=(92,188.311))z180..hide(z181=(104.8,188.311))z181
+ ..controls hide(z182=(117.6,188.311))z182 and hide(z183=(138.4,167.51))z183..hide(z184=(156,167.51))z184
+ ..controls hide(z185=(172,167.51))z185 and hide(z186=(179.95,188.311))z186..hide(z187=(205.6,188.311))z187
+ ..controls hide(z188=(229.6,188.311))z188 and hide(z189=(236.003,165.844))z189..hide(z190=(276,167.51))z190
+ ..controls hide(z191=(314.4,169.11))z191 and hide(z192=(319.127,189.91))z192..hide(z193=(336.8,189.91))z193
+ ..controls hide(z194=(354.4,189.91))z194 and hide(z195=(373.512,178.81))z195..hide(z196=(383.2,161.11))z196
+ ..controls hide(z197=(367.2,175.51))z197 and hide(z198=(346.983,168.826))z198..hide(z199=(328.8,159.51))z199
+ ..controls hide(z200=(308.128,148.92))z200 and hide(z201=(280.8,135.51))z201..hide(z202=(258.4,145.11))z202
+ ..controls hide(z203=(236,154.71))z203 and hide(z204=(213.6,159.51))z204..hide(z205=(194.4,151.51))z205
+ ..controls hide(z206=(175.2,143.51))z206 and hide(z207=(141.6,135.51))z207..hide(z208=(119.2,151.51))z208
+ ..controls hide(z209=(96.8001,167.51))z209 and hide(z210=(82.4002,170.71))z210..cycle;
+
+ filldraw PreeditedPath6 withcolor bluecolor;
+
+ PreeditedPath8 = hide(z244=(76,61.8328))z244..controls hide(z245=(93.6001,75.4011))z245 and hide(z246=(109.6,81.5686))z246..hide(z247=(122.4,81.5686))z247
+ ..controls hide(z248=(135.2,81.5686))z248 and hide(z249=(156,65.5332))z249..hide(z250=(173.6,65.5332))z250
+ ..controls hide(z251=(189.6,65.5332))z251 and hide(z252=(197.55,81.5686))z252..hide(z253=(223.2,81.5686))z253
+ ..controls hide(z254=(247.2,81.5686))z254 and hide(z255=(253.603,64.2485))z255..hide(z256=(293.6,65.5332))z256
+ ..controls hide(z257=(332,66.7668))z257 and hide(z258=(336.728,82.802))z258..hide(z259=(354.4,82.802))z259
+ ..controls hide(z260=(372,82.802))z260 and hide(z261=(391.112,74.2446))z261..hide(z262=(400.8,60.5994))z262
+ ..controls hide(z263=(384.8,71.7007))z263 and hide(z264=(364.583,66.5479))z264..hide(z265=(346.4,59.366))z265
+ ..controls hide(z266=(325.728,51.2012))z266 and hide(z267=(298.4,40.8635))z267..hide(z268=(276,48.2644))z268
+ ..controls hide(z269=(253.6,55.6653))z269 and hide(z270=(231.2,59.366))z270..hide(z271=(212,53.1985))z271
+ ..controls hide(z272=(192.8,47.031))z272 and hide(z273=(159.2,40.8635))z273..hide(z274=(136.8,53.1985))z274
+ ..controls hide(z275=(114.4,65.5332))z275 and hide(z276=(100,68.0002))z276..cycle;
+
+ filldraw PreeditedPath8 withcolor bluecolor;
+
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/goldenellipse.mp b/Master/texmf-dist/doc/metapost/featpost/example/goldenellipse.mp
new file mode 100644
index 00000000000..84bf24fc5f9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/goldenellipse.mp
@@ -0,0 +1,57 @@
+% goldenellipse.mp
+% L. Nobre G.
+% 2012
+
+beginfig(1);
+ numeric u, phi, i, dstep, goldang;
+ pen thepen;
+ path ellia, ellib, ellic, ellid, ellip;
+ path evola, evolb, evolc, evold, evolu;
+ path squar;
+ pair paira, pairb, pairc, paird;
+ pair ellfa, squab, ellfc, squad;
+ pair goldp;
+ u = 5cm;
+ phi = 0.5*(1+sqrt(5));
+ dstep = 5;
+ goldang = angle(1,1/phi);
+ thepen = pencircle scaled 0.05u;
+ paira = (phi,0);
+ pairb = (0,1);
+ pairc = (-phi,0);
+ paird = (0,-1);
+ ellfa = (1,0);
+ squab = (0,-phi);
+ ellfc = (-1,0);
+ squad = (0,phi);
+ goldp = (phi*cosd(goldang),sind(goldang));
+ ellia = (phi*cosd(dstep),sind(dstep))
+ for i=2dstep step dstep until 90-dstep:
+ ..(phi*cosd(i),sind(i))
+ endfor;
+ ellib = reverse ellia xscaled -1;
+ ellic = ellia scaled -1;
+ ellid = reverse ellia yscaled -1;
+ ellip = paira--ellia--pairb--ellib--pairc--ellic--paird--ellid--cycle;
+ evola = (cosd(dstep)**3,-phi*(sind(dstep)**3))
+ for i=2dstep step dstep until 90-dstep:
+ ..(cosd(i)**3,-phi*(sind(i)**3))
+ endfor;
+ evolb = reverse evola xscaled -1;
+ evolc = evola scaled -1;
+ evold = reverse evola yscaled -1;
+ evolu = ellfa--evola--squab--evolb--ellfc--evolc--squad--evold--cycle;
+ squar = paira--squab--pairc--squad--cycle;
+ z1 = goldp+whatever*(1,-1);
+ y1 = 0;
+ fill (x1,0)--(0,x1)--(-x1,0)--(0,-x1)--cycle withcolor blue;
+ fill squar withcolor red;
+ fill ellip;
+ fill ellfa--pairb--ellfc--paird--cycle withcolor red;
+ draw evolu withcolor blue;
+ picture tmp;
+ tmp = currentpicture;
+ currentpicture := nullpicture;
+ draw tmp rotated 45 scaled u shifted (10.5cm,14cm) withpen thepen;
+endfig;
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/graphs.mp b/Master/texmf-dist/doc/metapost/featpost/example/graphs.mp
new file mode 100644
index 00000000000..b5c4dbb981d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/graphs.mp
@@ -0,0 +1,65 @@
+% graphs.mp
+% L. Nobre G.
+% 2007
+
+verbatimtex
+\documentclass{article}
+\usepackage{color,SIunits}
+\begin{document}
+etex
+
+input graph;
+
+beginfig(1);
+ picture thegraph, thedash, thestar;
+ path thecurve;
+ pen thepen;
+ numeric theu;
+ theu = 1.7cm;
+ z1 = (1,2);
+ z2 = (3,8);
+ z3 = (4,8);
+ z4 = (2,8);
+ z5 = (5,1);
+ z6 = (9,1);
+ z7 = (8,2);
+ z8 = (7,3);
+ z9 = (6,4);
+ thestar = btex $\star$ etex scaled (3.5theu/in);
+ thestar := thestar shifted -(center thestar);
+ thepen = pencircle scaled 2mm;
+ thedash = dashpattern( off 3mm on 1mm off 4mm on 2mm );
+ thecurve = z1..z2..z3..z4..z5..z6..z7..z8..z9;
+ thegraph = begingraph(6theu,4theu);
+ glabel.bot( btex $\unit{t}{/\;\second}$ etex, OUT );
+ glabel.lft( btex $\unit{v}{/\;\metre\per\second}$ etex, OUT );
+ gdraw thecurve withpen thepen withcolor blue dashed thedash;
+ gdraw thecurve plot thestar;
+ autogrid(grid.bot,grid.lft) withcolor red dashed evenly;
+ endgraph;
+ draw thegraph;
+endfig;
+
+beginfig(2);
+ draw begingraph(7cm,5cm);
+ pickup pencircle scaled 1pt;
+ path p;
+ for x = -20 step 0.2 until -0.2:
+ augment.p (x, sind(x*180/3.14159)/x);
+ endfor
+ augment.p (0, 1);
+ for x = 0.2 step 0.2 until 20:
+ augment.p (x, sind(x*180/3.14159)/x);
+ endfor
+ glabel.lrt (btex $\frac{\sin(x)}{x}$ etex, (-20,1));
+ gdraw p;
+ endgraph;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/hap.mp b/Master/texmf-dist/doc/metapost/featpost/example/hap.mp
new file mode 100644
index 00000000000..269cc6ab682
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/hap.mp
@@ -0,0 +1,137 @@
+% hap.mp
+% L. Nobre G.
+% IYP (2005)
+
+numeric HalfSideLength;
+numeric ThicknesFactor, BorderThFactor;
+
+HalfSideLength = 6mm;
+ThicknesFactor = 0.5;
+BorderThFactor = 1.85; % Borders over TraceThickness
+
+def PickInteger( expr MaxNum ) = floor( uniformdeviate( MaxNum+1 ) ) enddef;
+
+def PickColor =
+ begingroup
+ numeric c[], i, min, max, ref;
+ ref = 0.76;
+ for i=1 upto 3:
+ c[i] = uniformdeviate(1);
+ endfor;
+ min = c1;
+ max = c1;
+ for i=2 upto 3:
+ if c[i] < min: min := c[i]; fi;
+ if c[i] > max: max := c[i]; fi;
+ endfor;
+ for i=1 upto 3:
+ c[i] := ref+(0.94-ref)*(c[i]-min)/(max-min);
+ endfor;
+ ( ( c1 , c2, c3 ) )
+ endgroup
+enddef;
+
+vardef LocateIndex[] =
+ dotlabel.urt( str @, z@ )
+enddef;
+
+beginfig(1);
+ numeric tracethickness, i, j, hexconst, angaux, cou, nupersi;
+ numeric ThisInd, ThatInd, dist[], ang[];
+ color TheColor;
+ pen tracepen, bordepen;
+ path hexpath, ActualPath, FinalCut;
+ pair corn[], nco, aco, vec, Dir[], urCorner, ulCorner, llCorner, lrCorner;
+ boolean Filled[];
+ picture Tile[];
+ hexconst = sqrt(3)/2;
+ nupersi = PickInteger( 2 );
+ tracethickness = ThicknesFactor*
+ (0.5+uniformdeviate(0.5))*
+ HalfSideLength/(nupersi+1);
+ TheColor = PickColor;
+ tracepen = pencircle scaled tracethickness;
+ bordepen = tracepen scaled BorderThFactor;
+ for i=0 upto 6:
+ corn[i] = 2*HalfSideLength*dir(i*60);
+ endfor;
+ hexpath = corn0--corn1--corn2--corn3--corn4--corn5--cycle;
+ dist0 = 0;
+ ang0 = 40+uniformdeviate( 100 );
+ for i=1 upto nupersi:
+ dist[i] = dist[i-1]+(0.7+uniformdeviate(0.45))*HalfSideLength/(nupersi+1);
+ angaux := 40+20*i/nupersi;
+ ang[i] = angaux + uniformdeviate( 180-2*angaux );
+ endfor;
+ for i=0 upto 5:
+ aco := corn[i];
+ nco := corn[1+i];
+ vec := nco-aco;
+ z[i] = aco+0.5*vec;
+ Dir[i] = dir(angle(vec)+ang0);
+ Filled[i] = false;
+ endfor;
+ cou = 5;
+ for i=0 upto 5:
+ aco := corn[i];
+ nco := corn[i+1];
+ vec := unitvector(nco-aco);
+ for j=1 upto nupersi:
+ cou := incr( cou );
+ z[cou] = 0.5[aco,nco]+dist[j]*vec;
+ Dir[cou] = dir(angle(vec)+ang[j]);
+ Filled[cou] = false;
+ cou := incr( cou );
+ z[cou] = 0.5[aco,nco]-dist[j]*vec;
+ Dir[cou] = dir(angle(vec)+ang[j]);
+ Filled[cou] = false;
+ endfor;
+ endfor;
+% for i=0 upto cou:
+% LocateIndex[i];
+% endfor;
+ for i=1 step 2 until cou:
+ forever:
+ ThisInd := PickInteger( cou );
+ exitunless Filled[ThisInd];
+ endfor;
+ Filled[ThisInd] := true;
+ forever:
+ ThatInd := PickInteger( cou );
+ exitunless Filled[ThatInd];
+ endfor;
+ Filled[ThatInd] := true;
+ ActualPath := z[ThisInd]{Dir[ThisInd]}
+ ...z[ThatInd]{-Dir[ThatInd]};
+ draw ActualPath withcolor background withpen bordepen;
+ draw ActualPath withcolor TheColor withpen tracepen;
+ endfor;
+ clip currentpicture to hexpath;
+ urCorner = ( 8.13in, 11.533in );
+ llCorner = ( 0.118in, 35.5bp );
+ ulCorner = ( xpart llCorner, ypart urCorner );
+ lrCorner = ( xpart urCorner, ypart llCorner );
+ FinalCut = urCorner--ulCorner--llCorner--lrCorner--cycle;
+ for i=0 upto 5:
+ Tile[i] = currentpicture rotated (i*60);
+ endfor;
+ currentpicture := nullpicture;
+ numeric j, horizo, vertic, vertigo;
+ horizo = ( xpart urCorner ) + 2HalfSideLength;
+ vertic = ( ypart urCorner ) + 2HalfSideLength;
+ vertigo = 0.5*horizo;
+ pair paird, pairv;
+ pairv = up*4*HalfSideLength*hexconst;
+ paird = dir(30)*4*HalfSideLength*hexconst;
+ numeric numd, numv;
+ numv = (vertic+2*vertigo)/(4*HalfSideLength*hexconst);
+ numd = horizo/(3*HalfSideLength);
+ for i = 0 upto numd:
+ for j = 0 upto numv:
+ draw Tile[PickInteger( 5 )] shifted ( (0,-vertigo) + i*paird + j*pairv );
+ endfor;
+ endfor;
+ clip currentpicture to FinalCut;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/heatfromroom.mp b/Master/texmf-dist/doc/metapost/featpost/example/heatfromroom.mp
new file mode 100644
index 00000000000..a2ba917dc85
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/heatfromroom.mp
@@ -0,0 +1,90 @@
+% heatfromroom.mp
+% L. Nobre G.
+% 2006
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino,mathpazo}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric l, gang;
+ path longp, shorp, roomp;
+ picture sp[];
+ pen isol;
+ color mygrey;
+ mygrey = 0.75white;
+ gang = -angle( (3.5,1) );
+ l = 1cm;
+ isol = pensquare scaled 2.2pt rotated gang;
+ z1 = (0,-l) rotated gang;
+ z2 = (l,-l) rotated gang;
+ z3 = (l,2*l) rotated gang;
+ z4 = (0,2*l) rotated gang;
+ z5 = (-3*l,l) rotated gang;
+ z6 = (-3*l,0) rotated gang;
+ z7 = (3*l,0) rotated gang;
+ z8 = (3*l,l) rotated gang;
+ z9 = (l,l) rotated gang;
+ z10 = (0,l) rotated gang;
+ z11 = (l,0) rotated gang;
+ z12 = (2*l,0.5*l) rotated gang;
+ z13 = (0.5*l,1.5*l) rotated gang;
+ z14 = (-1.5*l,0.5*l) rotated gang;
+ z15 = (0.5*l,-0.5*l) rotated gang;
+ z16 = (l,-0.5*l) rotated gang;
+ z17 = (2*l,l) rotated gang;
+ z18 = (0,1.5*l) rotated gang;
+ z19 = (-1.5*l,0) rotated gang;
+ z20 = (0.5*l,-l) rotated gang;
+ z21 = (3*l,0.5*l) rotated gang;
+ z22 = (0.5*l,2*l) rotated gang;
+ z23 = (-3*l,0.5*l) rotated gang;
+ z24 = (0.5*l,0.5*l) rotated gang;
+ longp = z5--z6--z7--z8--cycle;
+ shorp = z1--z2--z3--z4--cycle;
+ roomp = origin--z11--z9--z10--cycle;
+ fill longp withcolor mygrey;
+ fill shorp withcolor mygrey;
+ unfill roomp;
+ draw longp;
+ draw shorp;
+ drawoptions( withpen isol );
+ draw z1--origin--z6;
+ draw z5--z10--z4;
+ draw z3--z9--z8;
+ draw z7--z11--z2;
+ drawoptions();
+ sp12 = btex C etex;
+ label( sp12, z12 );
+ sp13 = btex B etex;
+ label( sp13, z13 );
+ sp14 = btex A etex;
+ label( sp14, z14 );
+ sp15 = btex D etex;
+ label( sp15, z15 );
+ sp16 = btex $L$ etex;
+ label.rt( sp16, z16 );
+ sp17 = btex $2L$ etex;
+ label.top( sp17, z17 );
+ sp18 = btex $L$ etex;
+ label.lft( sp18, z18 );
+ sp19 = btex $3L$ etex;
+ label.bot( sp19, z19 );
+ sp20 = btex $5^\circ$C etex;
+ label.bot( sp20, z20 );
+ sp21 = btex -$25^\circ$C etex;
+ label.rt( sp21, z21 );
+ sp22 = btex -$5^\circ$C etex;
+ label.top( sp22, z22 );
+ sp23 = btex -$10^\circ$C etex;
+ label.lft( sp23, z23 );
+ sp24 = btex $5^\circ$C etex;
+ label( sp24, z24 );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/hexacylon.mp b/Master/texmf-dist/doc/metapost/featpost/example/hexacylon.mp
new file mode 100644
index 00000000000..ed388b938b0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/hexacylon.mp
@@ -0,0 +1,23 @@
+% hexacylon.mp
+% L. Nobre G.
+% 2006
+
+beginfig(1);
+ numeric i, actang, hexdiam, curvray, myang;
+ path outerp, innerp;
+ hexdiam = 15cm;
+ curvray = 8.5mm;
+ myang = 36;
+ for i=1 upto 6:
+ actang := (i-1)*60-90;
+ z[2*i-1] = 0.5*hexdiam*dir( actang ) + curvray*dir( actang - 120 );
+ z[2*i] = 0.5*hexdiam*dir( actang ) + curvray*dir( actang + 120 );
+ z[20+i] = 0.5[z[2*i-1],z[2*i]] - curvray*dir( actang );
+ endfor;
+ outerp = for i=1 upto 6: z[2*i-1]...z[2*i]--- endfor cycle;
+ innerp = z22---z23{dir(myang+180)}..{dir(myang+180)}z25---
+ z26{dir(myang)}..{dir(myang)}cycle;
+ fill outerp withcolor (0.87,0.12,0.08);
+ fill innerp withcolor (0.08,0.12,0.87);
+endfig;
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/iamsorrykarl.mp b/Master/texmf-dist/doc/metapost/featpost/example/iamsorrykarl.mp
new file mode 100644
index 00000000000..7e233047c44
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/iamsorrykarl.mp
@@ -0,0 +1,94 @@
+% iamsorrykarl.mp
+% 2006
+% L. Nobre G.
+
+%input featpost3Dplus2D;
+
+% bash: export TEX=latex
+% tcsh: setenv TEX latex
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, nstripes, aspecratio, minskip, maxskip, shiftlim, shiftmin;
+ numeric nbreaks, i, j, ymax, shiftx, lefh, righ, actualx, newx;
+ numeric prevlefh, prevrigh, xmax, auxan, auxr, cdiam;
+ path lefp[], rigp[], strp[];
+ pair shif, reflef, refrig, auxa, auxb;
+ boolean exitcondition;
+ u = 1cm;
+ nstripes = 7;
+ aspecratio = 1.7;
+ minskip = 0.5u; % must not be too small
+ maxskip = 4u;
+ shiftlim = 0.7u;
+ shiftmin = 0.25u;
+ cdiam = 0.65u;
+ xmax = (2*nstripes-1)*u;
+ ymax = aspecratio*xmax;
+ prevlefh = ymax;
+ prevrigh = ymax;
+ actualx = u;
+ for i=1 upto nstripes:
+ lefp[i] = ((2*i-1)*u,ymax);
+ rigp[i] = ((2*i-1)*u,ymax)--(2*i*u,ymax);
+ endfor;
+ exitcondition = false;
+ forever:
+ auxr := uniformdeviate(2)-1;
+ if auxr > 0:
+ newx := actualx + shiftmin + (shiftlim-shiftmin)*auxr;
+ else:
+ newx := actualx - shiftmin + (shiftlim-shiftmin)*auxr;
+ fi;
+ lefh := prevlefh - minskip - uniformdeviate(maxskip-minskip);
+ righ := prevrigh - minskip - uniformdeviate(maxskip-minskip);
+ if lefh < minskip:
+ lefh := minskip;
+ exitcondition := true;
+ fi;
+ if righ < minskip:
+ righ := minskip;
+ exitcondition := true;
+ fi;
+ reflef := (newx,lefh);
+ refrig := (newx+xmax,righ);
+ auxan := angle(refrig-reflef);
+ shif := (newx-actualx)*(1,sind(auxan)/cosd(auxan));
+ for i=1 upto nstripes:
+ auxa := point (length lefp[i]) of lefp[i];
+ auxb := point (length rigp[i]) of rigp[i];
+ pair poil, poir;
+ poil = auxa+whatever*down;
+ poil = whatever[reflef,refrig];
+ poir = auxb+whatever*down;
+ poir = whatever[reflef,refrig];
+ lefp[i] := lefp[i]--poil--(poil+shif);
+ rigp[i] := rigp[i]--poir--(poir+shif);
+ endfor;
+ actualx := newx;
+ prevlefh := lefh;
+ prevrigh := righ;
+ exitif exitcondition;
+ endfor;
+ for i=1 upto nstripes:
+ auxa := point (length lefp[i]) of lefp[i];
+ auxb := point (length rigp[i]) of rigp[i];
+ pair poil, poir;
+ poil = auxa+whatever*down;
+ poil = whatever[origin,right];
+ poir = auxb+whatever*down;
+ poir = whatever[origin,right];
+ lefp[i] := lefp[i]--poil--poir;
+ rigp[i] := rigp[i]--poir;
+ strp[i] = buildcycle( lefp[i], reverse rigp[i] );
+ fill strp[i] withcolor red;
+ endfor;
+% for i=nstripes+1 upto nstripes+50:
+% strp[i] = fullcircle scaled cdiam shifted
+% (uniformdeviate(xmax),uniformdeviate(ymax));
+% fill strp[i];
+% endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/jd44.mp b/Master/texmf-dist/doc/metapost/featpost/example/jd44.mp
new file mode 100644
index 00000000000..0ad532a3741
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/jd44.mp
@@ -0,0 +1,172 @@
+% jd44.mp
+% J. Dinis
+% long ago
+% BUG: With MetaPost, version 1.208 (kpathsea version 5.0.0) points z5 and z7
+% (the "elbows") produce wrong figures !!!!
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+% prologues := 2;
+
+
+def drawpoints(expr a, b)=
+ for i=a upto b:
+ label(decimal i, z[i]);
+ endfor
+enddef;
+
+
+def drawtopic expr p = addto pic doublepath p withpen currentpen enddef;
+
+
+vardef climber(expr sc) =
+ clearxy;
+ save a,b,c,d,e,f, pic;
+ picture pic;
+ pic := nullpicture;
+
+ a := .8 sc;
+ b := 1 sc;
+ c := 1.2 sc;
+ d := .8 sc;
+ e := .3 sc;
+ f := .6 sc;
+
+ z4 = z3 + (e,0) rotated 45;
+ z1 = z4 + (c,0) rotated 150;
+ z1 - z2 = z3 - z4;
+ z13 = .5[z1,z2];
+ z5 = z13 + (0,a);
+ z6 = z5 + (0,a);
+ z7 = z2 + (f,0) rotated 45;
+ z8 = z7 + (a,0) rotated 45;
+ z9 = z3 + (b,0);
+ z10 = z9 + (b,0) rotated -45;
+ z11 = z4 + (a,0) rotated 70;
+ z12 = z11 + (b,0) rotated -30;
+ z0 = z1 + (d,0) rotated (100+angle(z2-z1));
+
+ x4-(.25pt*sc) = 0;
+ y4-(.25pt*sc) = 0;
+
+ pickup pencircle scaled (.5pt*sc);
+ drawtopic z13--z6;
+ drawtopic z3--z9--z10;
+
+ pickup pencircle scaled (.6pt*sc);
+ drawtopic z2--z8 withcolor white;
+ drawtopic z4--z11--z12 withcolor white;
+ drawtopic z1--z2--z4--z3--cycle withcolor white;
+
+ pickup pencircle scaled (.5pt*sc);
+ drawtopic z1--z2--z4--z3--cycle;
+ drawtopic z2--z7--z8;
+ drawtopic z4--z11--z12;
+
+ pickup pencircle scaled (1pt*sc);
+ drawtopic z0;
+
+% drawpoints(0,12);
+ pic
+enddef;
+
+
+vardef windsurfer(expr sc) =
+ clearxy;
+ save a,b,c,d,e,f, pic;
+ picture pic;
+ pic := nullpicture;
+
+ a := .9 sc;
+ b := .6 sc;
+ c := 1.2 sc;
+ d := .8 sc;
+ e := .3 sc;
+ f := .6 sc;
+
+ z3 = z4 + (e,0) rotated 170;
+ z2 = z4 + (c,0) rotated 80;
+ z1-z2 = z3-z4;
+
+ z7 = z2 + (b,0) rotated 200;
+ z8 = z7 + (a,0) rotated 200;
+ z5 = z1 + (b,0) rotated 200;
+ z6 = z5 + (a,0) rotated 200;
+
+ z9 = z3 + (d,0) rotated 195;
+ z10 = z9 + (a,0) rotated 240;
+ z11 = z4 + (d,0) rotated 195;
+ z12 = z11 + (a,0) rotated 240;
+
+ z0 = z2 + (d,0) rotated 90;
+
+ x10-(.25pt*sc) = 0;
+ y12-(.25pt*sc) = 0;
+
+ pickup pencircle scaled (.5pt*sc);
+ drawtopic z1--z5--z6;
+ drawtopic z3--z9--z10;
+
+ pickup pencircle scaled (.6pt*sc);
+ drawtopic z2--z7--z8 withcolor white;
+ drawtopic z4--z11--z12 withcolor white;
+ drawtopic z1--z2--z4--z3--cycle withcolor white;
+
+ pickup pencircle scaled (.5pt*sc);
+ drawtopic z2--z7--z8;
+ drawtopic z4--z11--z12;
+ drawtopic z1--z2--z4--z3--cycle;
+
+ pickup pencircle scaled (1pt*sc);
+ drawtopic z0;
+
+ % drawpoints(0,12);
+ pic
+enddef;
+
+
+vardef fourtyfour(expr sc)=
+ save f, p;
+ picture f, p;
+ f := btex 4 etex scaled sc;
+ f := f yscaled 1.5 rotated 35 yscaled .85 rotated -39.4803;
+ p := nullpicture;
+ addto p also (f shifted -.44(lrcorner f - llcorner f));
+ addto p also (f shifted .44(lrcorner f - llcorner f));
+ p
+enddef;
+
+
+beginfig(1);
+ draw climber(100) shifted (288,144);
+endfig;
+
+
+beginfig(2);
+ draw windsurfer(100) shifted (72,72);
+endfig;
+
+
+beginfig(3);
+ draw fourtyfour(40) shifted (144,144);
+endfig;
+
+
+% e à quarta é de vez.
+%
+beginfig(4);
+ draw fourtyfour(40);
+ draw climber(50) shifted llcorner currentpicture;
+ draw windsurfer(50) shifted (0.8*(lrcorner currentpicture));
+% currentpicture := currentpicture shifted (80mm,120mm);
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/kopptrammel.mp b/Master/texmf-dist/doc/metapost/featpost/example/kopptrammel.mp
new file mode 100644
index 00000000000..8a22defba27
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/kopptrammel.mp
@@ -0,0 +1,39 @@
+% kopptrammel.mp
+% L. Nobre G.
+% IYP (2005)
+
+beginfig(1);
+ numeric i, u, astep, pfrac, ra, rb, totray, adiff, astart;
+ pair ca, cb, pa, pb, pc;
+ path cir;
+ ra = 0.3;
+ rb = 0.9;
+ astep = 10;
+ adiff = -20;
+ pfrac = 3;
+ astart = 20;
+ u = 2cm;
+ ca = (2u,4u);
+ cb = (4u,4u);
+ totray = 0.5*abs(cb-ca);
+ cir = fullcircle scaled (2*totray);
+ draw cir shifted ca;
+ draw cir shifted cb;
+ pickup pencircle scaled (u/20);
+ for i=0 step astep until 360:
+ pa := ca + ra*totray*dir( astart+i );
+ pb := cb + rb*totray*dir( astart-i-adiff );
+ pc := pfrac[pa,pb];
+ draw pa;
+ draw pb;
+ draw pc withcolor red;
+ endfor;
+ pickup pencircle scaled (u/40);
+ draw pa--pc withcolor blue;
+ draw pb--pc;
+ draw ca;
+ draw cb;
+ draw pfrac[ca,cb];
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/lamarquejaune.mp b/Master/texmf-dist/doc/metapost/featpost/example/lamarquejaune.mp
new file mode 100644
index 00000000000..d95a72e1638
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/lamarquejaune.mp
@@ -0,0 +1,100 @@
+
+beginfig(1);
+ numeric ulimi,rlimi;
+ path p[];
+ color jaune;
+ pen brushpen;
+ bboxmargin := 2cm;
+ jaune = 0.87*(0.97,0.84,0.01);
+ brushpen = pencircle scaled 3mm;
+ ulimi = 687;
+ rlimi = 784;
+ drawoptions( withcolor jaune withpen brushpen );
+ z1 = (671,ulimi-34);
+ z2 = (644,ulimi-61);
+ z3 = (472,ulimi-79);
+ z4 = (484,ulimi-98);
+ z5 = (417,ulimi-108);
+ z6 = (460,ulimi-117);
+ z7 = (186,ulimi-517);
+ z8 = (358,ulimi-368);
+ z9 = (301,ulimi-427);
+ z10 = (598,ulimi-80);
+ z11 = (526,ulimi-150);
+ z12 = (557,ulimi-192);
+ z13 = (581,ulimi-194);
+ z14 = (556,ulimi-215);
+ z15 = (532,ulimi-253);
+ z50 = (310,ulimi-280);
+ z51 = (365,ulimi-280);
+ z52 = (452,ulimi-312);
+ z53 = (472,ulimi-334);
+ z16 = (603,ulimi-233);
+ z17 = (578,ulimi-273);
+ z18 = (579,ulimi-239);
+ z19 = (604,ulimi-257);
+ z20 = (423,ulimi-420);
+ z21 = (515,ulimi-402);
+ z22 = (544,ulimi-420);
+ z23 = (532,ulimi-433);
+ z24 = (570,ulimi-454);
+ z25 = (528,ulimi-497);
+ z26 = (595,ulimi-3);
+ z27 = (266,ulimi-7);
+ z28 = (102,ulimi-115);
+ z29 = (7,ulimi-352);
+ z30 = (51,ulimi-532);
+ z54 = (509,ulimi-331);
+ z55 = (554,ulimi-347);
+ z31 = (178,ulimi-642);
+ z32 = (414,ulimi-668);
+ z33 = (601,ulimi-602);
+ z34 = (772,ulimi-301);
+ z35 = (730,ulimi-174);
+ z36 = (658,ulimi-219);
+ z37 = (699,ulimi-321);
+ z38 = (590,ulimi-536);
+ z39 = (406,ulimi-626);
+ z40 = (203,ulimi-594);
+ z41 = (108,ulimi-482);
+ z42 = (84,ulimi-339);
+ z43 = (131,ulimi-191);
+ z44 = (309,ulimi-45);
+ z45 = (539,ulimi-27);
+ z46 = (314,ulimi-152);
+ z47 = (171,ulimi-364);
+ z48 = (205,ulimi-368);
+ z49 = (345,ulimi-187);
+ p1 = z2--z1;
+ p2 = z1...z26...z27...z28...z29...z30...z31...z32...z34...z35...z10;
+ p3 = z10--z11;
+ p4 = z11...z36...z37...z38...z39...z40...z41...z42...z43...z44...z45...z2;
+ p5 = buildcycle( p1, p2, p3, p4 );
+ filldraw p5;
+ p6 = z3--z4;
+ p7 = z4...z49...z48...z7;
+ p8 = z7...z47...z46...z3;
+ p9 = buildcycle( p6, p7, p8 );
+ filldraw p9;
+ p10 = z5--z6;
+ p11 = z6...z51...z8;
+ p12 = z8...z52...z12;
+ p13 = z12--z13;
+ p14 = z13...z53...z9;
+ p15 = z9...z50...z5;
+ p16 = buildcycle( p10, p11, p12, p13, p14, p15 );
+ filldraw p16;
+ p17 = z14--z16--z17--z15--cycle;
+ filldraw p17;
+ p18 = z18--z19;
+ p19 = z19...z55...z21;
+ p20 = z21--z22--z23--z24--z25--z20;
+ p21 = z20..z54..z18;
+ p22 = buildcycle( p18, p19, p20, p21 );
+ filldraw p22;
+ drawoptions( withcolor white );
+ draw bbox currentpicture;
+endfig;
+
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/latexboxes.mp b/Master/texmf-dist/doc/metapost/featpost/example/latexboxes.mp
new file mode 100644
index 00000000000..bbfdc0487f6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/latexboxes.mp
@@ -0,0 +1,25 @@
+% used many times in LaTeX documents (\usebox{})
+% L. Nobre G.
+% 2001
+
+beginfig(0); % grayrectanglebox
+ numeric u, Nu;
+ u = 0.5mm;
+ Nu = 20;
+ transform T;
+ T = identity scaled (Nu*u) xscaled 1.33;
+ pickup pensquare scaled u;
+ draw (unitsquare transformed T) withcolor 0.7white;
+endfig;
+
+beginfig(1); % bigrectanglebox
+ numeric u, Nu;
+ u = 0.5mm;
+ Nu = 70;
+ transform T;
+ T = identity scaled (Nu*u) xscaled 1.33;
+ pickup pensquare scaled u;
+ draw (unitsquare transformed T) withcolor 0.7white;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/lawofcosines.mp b/Master/texmf-dist/doc/metapost/featpost/example/lawofcosines.mp
new file mode 100644
index 00000000000..5d49e0adcdd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/lawofcosines.mp
@@ -0,0 +1,167 @@
+% lawofcosines.mp
+% L. Nobre G.
+% 2007
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, limit, major, minor, abvcos, blwcos;
+ color gridc;
+ pen gridpmaj, gridpmin, dotp;
+ u=0.7mm;
+ limit=64;
+ major=20;
+ minor=2;
+ abvcos=0.5;
+ blwcos=1/3;
+ gridc=0.5white;
+ gridpmaj=pencircle scaled 2pt;
+ gridpmin=pencircle scaled 1.3pt;
+ dotp=pencircle scaled 2.7pt;
+% labeloffset := 3u;
+ numeric i,j, abvsin, blwsin, stpmaj, stpmin;
+ abvsin=1 +-+ abvcos;
+ blwsin=1 +-+ blwcos;
+ stpmaj=major*u;
+ stpmin=minor*u;
+ pair abvdir, blwdir, thedir;
+ abvdir=(abvcos,abvsin);
+ blwdir=(blwcos,-blwsin);
+ boolean ismajor, isaxe;
+ drawoptions( withpen gridpmin withcolor gridc );
+ for i=-limit step minor until limit:
+ ismajor := not ((i mod major)<>0);
+ if ismajor:
+ isaxe := not (i <> 0);
+ if isaxe:
+ drawoptions( withpen gridpmaj );
+ else:
+ drawoptions( withpen gridpmaj withcolor gridc );
+ fi;
+ fi;
+ draw ((i*u,0)+limit*u*blwdir)--(i*u,0)--((i*u,0)+limit*u*abvdir);
+ if i<0:
+ thedir := -blwdir;
+ else:
+ thedir := abvdir;
+ fi;
+ draw ((-limit*u,0)+i*u*thedir)--((limit*u,0)+i*u*thedir);
+ if ismajor:
+ drawoptions( );
+ label.bot( decimal( abs( i ) ), (i*u,0)+limit*u*blwdir );
+ if i<0:
+ label.llft( decimal( abs( i ) ), (-limit*u,0)+i*u*thedir );
+ elseif not (i<>0):
+ label.lft( decimal( abs( i ) ), (-limit*u,0)+i*u*thedir );
+ else:
+ label.ulft( decimal( abs( i ) ), (-limit*u,0)+i*u*thedir );
+ fi;
+ label.top( decimal( abs( i ) ), (i*u,0)+limit*u*abvdir );
+ drawoptions( withpen gridpmin withcolor gridc );
+ fi;
+ endfor;
+ drawoptions( withpen dotp withcolor red );
+ numeric signal;
+ for i=-limit upto limit:
+ if i <> 0:
+ if i<0:
+ signal := -1;
+ else:
+ signal := 1;
+ fi;
+ for j=-limit upto -2:
+ if not ( ( sqrt((i**2)+(j**2)+signal*2*abs(i*j)/3) mod 1 ) <> 0 ):
+ draw (i*u,0)-j*u*blwdir;
+ fi;
+ endfor;
+ for j=limit downto 2:
+ if not ( ( sqrt((i**2)+(j**2)+signal*2*abs(i*j)*abvcos) mod 1 ) <> 0 ):
+ draw (i*u,0)+j*u*abvdir;
+ fi;
+ endfor;
+ fi;
+ endfor;
+
+endfig;
+
+beginfig(2);
+ numeric u, limit, major, minor, abvcos, blwcos;
+ color gridc;
+ pen gridpmaj, gridpmin, dotp;
+ u=0.7mm;
+ limit=24;
+ major=20;
+ minor=2;
+ abvcos=0.8;
+ blwcos=0.9;
+ gridc=0.5white;
+ gridpmaj=pencircle scaled 1.3pt;
+ gridpmin=pencircle scaled 0.7pt;
+ dotp=pencircle scaled 1.4pt;
+% labeloffset := 3u;
+ numeric i,j, abvsin, blwsin, stpmaj, stpmin;
+ abvsin=1 +-+ abvcos;
+ blwsin=1 +-+ blwcos;
+ stpmaj=major*u;
+ stpmin=minor*u;
+ pair abvdir, blwdir, thedir;
+ abvdir=(abvcos,abvsin);
+ blwdir=(blwcos,-blwsin);
+ boolean ismajor, isaxe;
+ drawoptions( withpen gridpmin withcolor gridc );
+ for i=-limit step minor until limit:
+ ismajor := not ((i mod major)<>0);
+ if ismajor:
+ isaxe := not (i <> 0);
+ if isaxe:
+ drawoptions( withpen gridpmaj );
+ else:
+ drawoptions( withpen gridpmaj withcolor gridc );
+ fi;
+ fi;
+ draw ((i*u,0)+limit*u*blwdir)--(i*u,0)--((i*u,0)+limit*u*abvdir);
+ if i<0:
+ thedir := -blwdir;
+ else:
+ thedir := abvdir;
+ fi;
+ draw ((-limit*u,0)+i*u*thedir)--((limit*u,0)+i*u*thedir);
+ if ismajor:
+ drawoptions( );
+ label.bot( decimal( abs( i ) ), (i*u,0)+limit*u*blwdir );
+ if i<0:
+ label.llft( decimal( abs( i ) ), (-limit*u,0)+i*u*thedir );
+ elseif not (i<>0):
+ label.lft( decimal( abs( i ) ), (-limit*u,0)+i*u*thedir );
+ else:
+ label.ulft( decimal( abs( i ) ), (-limit*u,0)+i*u*thedir );
+ fi;
+ label.top( decimal( abs( i ) ), (i*u,0)+limit*u*abvdir );
+ drawoptions( withpen gridpmin withcolor gridc );
+ fi;
+ endfor;
+ drawoptions( withpen dotp withcolor red );
+ numeric signal;
+ for i=-limit upto limit:
+ if i <> 0:
+ if i<0:
+ signal := -1;
+ else:
+ signal := 1;
+ fi;
+ for j=-limit upto -2:
+ if not ( ( sqrt((i**2)+(j**2)+signal*18*abs(i*j)/10) mod 1 ) <> 0 ):
+ draw (i*u,0)-j*u*blwdir;
+ fi;
+ endfor;
+ for j=limit downto 2:
+ if not ( ( sqrt((i**2)+(j**2)+signal*8*abs(i*j)/5) mod 1 ) <> 0 ):
+ draw (i*u,0)+j*u*abvdir;
+ fi;
+ endfor;
+ fi;
+ endfor;
+ draw origin withcolor blue withpen dotp;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ledlogo.mp b/Master/texmf-dist/doc/metapost/featpost/example/ledlogo.mp
new file mode 100644
index 00000000000..7a00407d60d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ledlogo.mp
@@ -0,0 +1,202 @@
+% ledlogo.mp
+% L. Nobre G.
+% 2007
+
+beginfig(1);
+ numeric u, penangle, peneccen, penminor, letterheig, letterwid, letterang;
+ u=2mm;
+ penangle=112;
+ peneccen=2.1;
+ penminor=2u;
+ letterheig=15u;
+ letterwid=12u;
+ letterang=-25;
+ numeric hdist, vdist, letterslantang, margindist, humanang, humanfactor;
+ hdist=7u;
+ vdist=7u;
+ letterslantang=20;
+ margindist=4.7u;
+ humanang=7;
+ humanfactor=0.2;
+ pen paintpen;
+ paintpen = pencircle scaled penminor xscaled peneccen rotated penangle;
+ pickup paintpen;
+ pair letterup, letterig, dirabove, dirbelow;
+ letterup=dir(90+letterang-letterslantang);
+ letterig=dir(letterang);
+ dirabove=dir(90+letterang-letterslantang+humanang);
+ dirbelow=dir(90+letterang-letterslantang-humanang);
+ z0=origin;
+ z1=z0-letterheig*letterup;
+ z2=z1+letterwid*letterig;
+ z3=z0+hdist*letterig+0.5*letterheig*letterup;
+ z4=z3-letterheig*letterup;
+ z5=z4+letterwid*letterig;
+ z6=z3+hdist*letterig+0.5*letterheig*letterup;
+ z7=z6-letterheig*letterup;
+ z8=z6-(letterheig-margindist)*letterup;
+ z9=z3+letterwid*letterig;
+ z10=z9+margindist*letterig;
+ z11=z0-(letterheig-humanfactor*margindist)*letterup;
+ z12=z1+humanfactor*margindist*letterig;
+ z13=z3-(letterheig-humanfactor*margindist)*letterup;
+ z14=z4+humanfactor*margindist*letterig;
+ z15=z7-2*humanfactor*hdist*letterig;
+ drawoptions( withcolor 0.876*red+0.7*green );
+% draw z0--z1--z2;
+% draw z9--z3--z4--z5;
+% draw z8---z6{letterig}..{unitvector(z2-z5)}z10..z7;
+ draw z0{-dirabove}..z11...z12..{letterig}z2;
+ draw z9--z3{-dirabove}..z13...z14..{letterig}z5;
+ draw z8{dirbelow}..z6{letterig}..{unitvector(z2-z5)}z10..z15;
+endfig;
+
+verbatimtex
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\renewcommand*\rmdefault{cmdh}
+\begin{document}
+etex
+
+beginfig(2);
+ picture led;
+ led = thelabel( btex led etex, origin );
+ pair ledshift;
+ ledshift = (0.3pt,-4.4pt);
+ numeric dc, db, da;
+ dc = 24pt;
+ db = 6.9pt;
+ da = 4.98pt;
+ fill fullcircle scaled dc withcolor red;
+% fill fullcircle scaled db withcolor (red+green);
+ fill fullcircle scaled db withcolor 0.5green;
+ draw led shifted ledshift withcolor (red+green);
+endfig;
+
+prologues := 1;
+
+beginfig(3);
+ numeric u, altur, diam, espessum, margem, distdisp, separ, frac;
+ color vermel, amarel;
+ vermel = 0.75red;
+ amarel = 0.876*red+0.7*green;
+ u = 5cm;
+ diam = 0.23u;
+ margem = 0.85diam;
+ altur = u-margem;
+ frac = 0.7;
+ numeric auxdist, lencirc, orientang, limitshift, i;
+ limitshift = 1.6u;
+ auxdist = (1u-2margem)*0.5;
+ distdisp = auxdist*sqrt(2) - diam;
+ 3*separ+2*espessum = distdisp;
+ separ = frac*espessum;
+ lencirc = length fullcircle;
+ path uma, umb;
+ uma = (0.5separ,-0.5diam)--(0.5separ+espessum,-0.5diam)
+ --(0.5separ+espessum,0.5diam)--(0.5separ,0.5diam)--cycle;
+ umb = uma rotated 180;
+ fill uma withcolor amarel;
+ fill umb withcolor amarel;
+ picture parduns;
+ parduns = currentpicture;
+ currentpicture := nullpicture;
+ path botcirc, caminhescudo, circulbase;
+ circulbase = fullcircle scaled diam;
+ botcirc = subpath (0.5*lencirc,lencirc) of fullcircle scaled u;
+ caminhescudo = botcirc--(0.5u,altur)--(-0.5u,altur)--cycle;
+ fill caminhescudo withcolor vermel;
+ z1 = ( auxdist, altur-margem );
+ z2 = ( -auxdist, altur-margem );
+ z3 = ( auxdist, 0 );
+ z4 = ( -auxdist, 0 );
+ z5 = ( 0, auxdist );
+ fill circulbase shifted z1 withcolor amarel;
+ fill circulbase shifted z2 withcolor amarel;
+ fill circulbase shifted z3 withcolor amarel;
+ fill circulbase shifted z4 withcolor amarel;
+ fill circulbase shifted z5 withcolor amarel;
+ z6 = 0.5[z5,z1];
+ z7 = 0.5[z5,z2];
+ z8 = 0.5[z5,z3];
+ z9 = 0.5[z5,z4];
+ draw parduns rotated 45 shifted z6;
+ draw parduns rotated -45 shifted z7;
+ draw parduns rotated -45 shifted z8;
+ draw parduns rotated 45 shifted z9;
+ numeric actshift;
+ for orientang=45 step 90 until 360:
+ actshift := auxdist*sqrt(2) + 0.5diam + separ;
+ forever:
+ if uniformdeviate(1)<0.5:
+ actshift := actshift + espessum + 0.5separ;
+ draw parduns shifted (actshift,0) rotated orientang shifted z5;
+ exitif actshift>limitshift;
+ actshift := actshift + espessum + 0.5separ;
+ else:
+ actshift := actshift + 0.5diam;
+ fill circulbase shifted (actshift,0) rotated orientang shifted z5
+ withcolor amarel;
+ exitif actshift>limitshift;
+ actshift := actshift + 0.5diam;
+ fi;
+ actshift := actshift + separ;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(4);
+ numeric u, hthick, vthick, lspace, espace, dspace, h, lbase, dbase;
+ numeric dinray, halfh, diffe;
+ u = 0.5mm;
+ hthick = 20u;
+ vthick = 10u;
+ lspace = 15u;
+ espace = 8u;
+ dspace = 8u;
+ h = 3*vthick+2*espace;
+ lbase = 38u;
+ dbase = 16u;
+ halfh = h/2;
+ dinray = halfh-vthick;
+ diffe = 2*vthick+espace-halfh;
+ path pathl, pathe, pathd, pathu;
+ z0 = (0,0);
+ z1 = (lbase,0);
+ z2 = (lbase,vthick);
+ z3 = (hthick,vthick);
+ z4 = (hthick,h);
+ z5 = (0,h);
+ pathl = z0--z1--z2--z3--z4--z5--cycle;
+ z6 = (lbase+lspace,0);
+ z7 = z6 + (h,0);
+ z8 = z7 + (0,vthick);
+ z9 = z6 + (vthick,vthick);
+ z10= z9 + (0,espace);
+ z11= z10+ (vthick,0);
+ z12= z11+ (-vthick,vthick);
+ z13= z6 + (-diffe,2*vthick+espace);
+ z14=z13+(diffe,-diffe);
+ pathe = z6--z7--z8--z9--z10--z11--z12--z13--z14--cycle;
+ z15= z7 + (dspace,0);
+ z16= z15+ (halfh,halfh);
+ z17= z15+ (0,h);
+ z18= z17- (halfh,0);
+ z19= z18+ (halfh,-halfh);
+ z20= z15+ (0,h-vthick);
+ z21= z20+ (dinray,-dinray);
+ z22= z15+ (0,vthick);
+ pathd = z15..z16..z17---z18--z19--z20..z21..z22--cycle;
+ z24= z6 + (-halfh,h);
+ z25= z24+ (h,0);
+ z26= z25+ (vthick,-vthick);
+ z27= z26- (h,0);
+ pathu = z24--z25--z26--z27--cycle;
+ fill pathl withcolor 0.78red;
+ fill pathe;
+ fill pathd;
+ fill pathu;
+endfig;
+
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/loglogpaper.mp b/Master/texmf-dist/doc/metapost/featpost/example/loglogpaper.mp
new file mode 100644
index 00000000000..4d00c11df99
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/loglogpaper.mp
@@ -0,0 +1,47 @@
+% loglogpaper.mp
+% L. Nobre G.
+% 2009
+
+vardef logten( expr Arg )=
+ (1.696463*mlog( Arg )/1000)
+enddef;
+
+beginfig(1);
+ numeric xdecs, ydecs, xdecsiz, ydecsiz, llcornx, llcorny, i, j;
+ numeric tmpvalx, tmpvaly;
+ color colormain, coloraux;
+ picture singledec;
+ xdecs = 5;
+ ydecs = 4;
+ xdecsiz = 35mm;
+ ydecsiz = 35mm;
+ llcornx = 20mm;
+ llcorny = 60mm;
+ colormain = 0.15white;
+ coloraux = 0.6white;
+ drawoptions( withcolor coloraux );
+ for i=0 upto 10:
+ tmpvalx := xdecsiz*(logten(10+i*2)-1);
+ draw (tmpvalx,0)--(tmpvalx,ydecsiz);
+ tmpvaly := ydecsiz*(logten(10+i*2)-1);
+ draw (0,tmpvaly)--(xdecsiz,tmpvaly);
+ endfor;
+ drawoptions( withcolor colormain );
+ for i=1 upto 10:
+ tmpvalx := xdecsiz*(logten(10*i)-1);
+ draw (tmpvalx,0)--(tmpvalx,ydecsiz);
+ tmpvaly := ydecsiz*(logten(10*i)-1);
+ draw (0,tmpvaly)--(xdecsiz,tmpvaly);
+ endfor;
+ singledec = currentpicture;
+ currentpicture := nullpicture;
+ drawoptions();
+ for i=1 upto xdecs:
+ for j=1 upto ydecs:
+ draw singledec shifted (llcornx+(i-1)*xdecsiz,llcorny+(j-1)*ydecsiz);
+ endfor;
+ endfor;
+endfig;
+
+end.
+ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/logofontest.mp b/Master/texmf-dist/doc/metapost/featpost/example/logofontest.mp
new file mode 100644
index 00000000000..ddccb82f27f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/logofontest.mp
@@ -0,0 +1,35 @@
+% logofontest.mp
+% L. Nobre G.
+% 2004
+
+input boxes;
+
+verbatimtex
+\documentclass{article}
+%\usepackage{charter}% no bold
+\usepackage{newcent}
+%\usepackage{palatino}
+\pagestyle{empty}
+\begin{document}
+etex
+
+beginfig(0);
+ picture thestatement;
+ thestatement = thelabel( btex
+ \begin{tabular}{c}
+ \textbf{\texttt{{\Large T}$\!$ecnumbria}} \\
+ \texttt{\scriptsize a sombra da tecnologia}
+ \end{tabular}
+ etex, origin);
+ circleit.state( thestatement );
+ state.dx = state.dy;
+ pickup pencircle scaled 1pt;
+ fill bpath.state withcolor (0.25,0.33,0.75);
+ draw bpath.state;
+ draw thestatement;
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/manjusha.mp b/Master/texmf-dist/doc/metapost/featpost/example/manjusha.mp
new file mode 100644
index 00000000000..0fa9d556089
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/manjusha.mp
@@ -0,0 +1,76 @@
+
+numeric u;
+u = 1cm;
+pen thin, thick;
+thin = pencircle scaled 1pt;
+thick= pencircle scaled 3pt;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ pair a, b, c, d;
+ a = origin;
+ b = (1u,2u);
+ c = (4u,2u);
+ d = (6u,0);
+ path lines, curve;
+ lines = a--b--c--d;
+ curve = a..controls b and c..d; %%%%%%%%%%% This is quite powerfull.
+ draw lines withpen thin withcolor red+blue;
+ draw curve withpen thin withcolor blue;
+ drawoptions( withpen thick );
+ draw a;
+ draw b;
+ draw c;
+ draw d;
+endfig;
+
+beginfig(4);
+ pair a, b, c, d, e;
+ a = origin;
+ b = (2.5u,0.5u);
+ c = (4u,2u);
+ d = (6u,0);
+ e = (4u,-0.5u);
+ drawoptions( withcolor blue );
+ picture thecaption;
+ thecaption = btex Degree 3 etex;
+ label( thecaption, e );
+ path lines, curve;
+ lines = a--b--c--d;
+ curve = a..controls b and c..d;
+ draw lines withpen thin withcolor red+blue;
+ draw curve withpen thin withcolor blue;
+ drawoptions( withpen thick withcolor red+green );
+ draw a;
+ draw b;
+ draw c;
+ draw d;
+endfig;
+
+beginfig(6);
+ numeric n, i;
+ n = 100;
+ pair p[];
+ for i=1 upto n:
+ p[i] = (uniformdeviate(4u),uniformdeviate(3u));
+ draw p[i] withpen thick withcolor green;
+ endfor;
+ path everywhere, convexhull;
+ everywhere = p1 for i=2 upto n: --p[i] endfor --cycle;
+ convexhull = makepath makepen everywhere; %%%%%%%%%%%%%% Wow!
+ draw convexhull withpen thin withcolor red+green;
+ for i=1 upto length convexhull:
+ draw point i of convexhull withpen thick withcolor blue;
+ endfor;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/mce-lng.mp b/Master/texmf-dist/doc/metapost/featpost/example/mce-lng.mp
new file mode 100644
index 00000000000..0dc5891171a
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/mce-lng.mp
@@ -0,0 +1,89 @@
+% mce-lng.mp
+% L. Nobre G.
+% 2009
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, anga, angb, posa, posb, thic, marg, angm, stwo, rest;
+ numeric plac, n;
+ path pta, ptb, ptc, ptd, pte, ptf, ptfa, ptfb, pa, pb;
+ picture trib, half, unib;
+ transform ta, tb;
+ u = 10cm;
+ anga = 120;
+ angb = 135;
+ posa = 0.8;
+ posb = 0.23;
+ thic = 0.15;
+ marg = 0.07;
+ angm = 10;
+ plac = 0.5;
+ stwo = u*sqrt(2);
+ rest = u/sqrt(2);
+ z1 = u*(0,posa+marg);
+ z2 = u*(0,posa);
+ z3 = u*(0,posa-thic);
+ z4 = u*(0,posa-thic-marg);
+ z6 = u*(0,-posb+0.5*thic);
+ z7 = u*(0,-posb-0.5*thic);
+ z8 = (posb-0.5*thic)[(0,u),(u,0)];
+ z9 = (posb+0.5*thic)[(0,u),(u,0)];
+ z12 = posb[(0,u),(u,0)];
+ z11 = z12+rest*(marg,marg);
+ z13 = z12-rest*(thic,thic);
+ z14 = z12-rest*(marg+thic,marg+thic);
+ z22 = posa[(0,-u),(u,0)];
+ z21 = z22+rest*(marg,-marg);
+ z23 = z22-rest*(thic,-thic);
+ z24 = z22-rest*(marg+thic,-marg-thic);
+ z33 = (plac*x43,y43);
+ z34 = (plac*x43+stwo*marg,y43);
+ z32 = (plac*x43-stwo*thic,y43);
+ z31 = (plac*x43-stwo*(thic+marg),y43);
+ z43 = (posa-thic)[(0,-u),(u,0)];
+ pta = z6{dir(angb+0.5*angm-90)}..{dir(angb+0.5*angm-45)}z8;
+ ptb = z7{dir(angb-0.5*angm-90)}..{dir(angb-0.5*angm-45)}z9;
+ ptc = z4{dir(anga-angm-90)}..{dir(-45)}z14..{dir(-135)}z24..z34;
+ ptd = z3{dir(anga-angm-90)}..{dir(-45)}z13..{dir(-135)}z23..{up}z33
+ ..{dir(anga-angm-135)}z43;
+ pte = z2{dir(anga-90)}..{dir(-45)}z12..{dir(-135)}z22..{up}z32
+ ..{dir(anga-135)}z22;
+ ptf = z1{dir(anga-90)}..{dir(-45)}z11..{dir(-135)}z21..{up}z31;
+ ta = identity scaled (1/sqrt(2)) shifted (0,rest) rotated 45;
+ tb = identity scaled (1/sqrt(2)) shifted (0,-rest) rotated -45;
+ ptfa = ptf transformed ta;
+ ptfb = ptf transformed tb;
+ pa = buildcycle( pte, ptc, reverse ptd, reverse ptfa );
+% draw pta;
+% draw ptb;
+% draw ptc;
+% draw ptd;
+% draw pte;
+% draw ptf;
+% draw ptfb;
+ pb = buildcycle( pta, ptc, reverse ptb, reverse ptfb );
+ fill pa;
+ fill pb;
+% draw (0,-u)--(u,0)--(0,u)--cycle;
+ trib = currentpicture;
+ currentpicture := nullpicture;
+ drawoptions( shifted (u,0) );
+ draw trib;
+ draw trib transformed ta;
+ draw trib transformed tb;
+ drawoptions();
+ draw trib scaled 0.5 shifted (0.5u,0) rotated 90;
+ draw trib scaled 0.5 shifted (0.5u,0) rotated (-90);
+ half = currentpicture;
+ draw half rotated 180;
+ unib := currentpicture;
+ draw currentpicture scaled 0.5;
+ draw unib scaled 0.25;
+% draw currentpicture scaled 0.25;
+% draw unib scaled 0.0625 withcolor blue;
+% dotlabels.urt( 1,2,3,4,6,7,8,9,11,12,13,14,21,22,23,24,31,32,33,34,43);
+% dotlabels.urt(31,32,33,34,43);
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/micromu.mp b/Master/texmf-dist/doc/metapost/featpost/example/micromu.mp
new file mode 100644
index 00000000000..01b10e8c649
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/micromu.mp
@@ -0,0 +1,34 @@
+% micromu.mp
+% L. Nobre G., Ryan Van Wagoner, Jens-Uwe Morawski
+% 2006
+
+verbatimtex
+%&latex
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{textcomp}
+\usepackage{pifont}
+\newcommand{\upmu}{\Pisymbol{psy}{109}}
+\begin{document}
+etex
+
+beginfig(1);
+ transform T;
+ numeric referenceangle, tangentd, shiftlen;
+ picture micromu;
+ referenceangle = 14;
+ shiftlen = 5mm;
+ tangentd = sind(referenceangle)/cosd(referenceangle);
+ T = identity slanted (-tangentd);
+ micromu = thelabel( btex \framebox{\upmu\ \textmu\ $\mu$.} etex, origin );
+ draw micromu shifted (0,shiftlen);
+ draw micromu transformed T;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/milimetricpaper.mp b/Master/texmf-dist/doc/metapost/featpost/example/milimetricpaper.mp
new file mode 100644
index 00000000000..d05d36e6491
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/milimetricpaper.mp
@@ -0,0 +1,43 @@
+% milimetricpaper.mp
+% L. Nobre G.
+% 2005
+
+%%input mp-tool;
+
+beginfig(1);
+ numeric u, xsize, ysize, i;
+ numeric minstep, majstep, bigstep;
+ pen minpen, majpen, bigpen;
+ color mincolor, majcolor, bigcolor;
+ u = 1mm;
+ xsize = 15cm;
+ ysize = 11cm;
+ minstep = 2u;
+ majstep = 10u;
+ bigstep = 50u;
+ minpen = pencircle scaled 0pt;
+ majpen = pencircle scaled 0.3pt;
+ bigpen = pencircle scaled 0.8pt;
+ mincolor = 0.5white;
+ majcolor = 0.2white;
+ bigcolor = 0.5white;
+ for i=0 step minstep until xsize:
+ draw (i,0)--(i,ysize) withpen minpen withcolor mincolor;
+ endfor;
+ for i=0 step minstep until ysize:
+ draw (0,i)--(xsize,i) withpen minpen withcolor mincolor;
+ endfor;
+ for i=0 step bigstep until xsize:
+ draw (i,0)--(i,ysize) withpen bigpen withcolor bigcolor;
+ endfor;
+ for i=0 step bigstep until ysize:
+ draw (0,i)--(xsize,i) withpen bigpen withcolor bigcolor;
+ endfor;
+ for i=0 step majstep until xsize:
+ draw (i,0)--(i,ysize) withpen majpen withcolor majcolor;
+ endfor;
+ for i=0 step majstep until ysize:
+ draw (0,i)--(xsize,i) withpen majpen withcolor majcolor;
+ endfor;
+endfig;
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/mpfields.mp b/Master/texmf-dist/doc/metapost/featpost/example/mpfields.mp
new file mode 100644
index 00000000000..6b877da5b1c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/mpfields.mp
@@ -0,0 +1,160 @@
+%input mp-tool;
+
+def projectyz( expr theta, phi ) =
+ (cosd(theta)*sind(phi),sind(theta))
+enddef;
+
+numeric vertn, horin, grids, thex, they, varc, xcomp;
+numeric ymax, xmax, i, j, size, u, ycomp, theta, phi;
+numeric power;
+pair actpos, direct, one, two;
+
+u := 0.5mm;
+power := 0.8;
+vertn := 20;
+horin := 41;
+size := 3u;
+grids := 8u;
+ymax := 0.5*(vertn-1);
+xmax := 0.5*(horin-1);
+varc := 90/ymax;
+
+beginfig(0); % splay
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=90*(cosd(they)**power);
+ phi:=0;
+ direct:=projectyz(theta,phi);
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(2); % bend
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=90*((1-cosd(they))**(1/power));
+ phi:=0;
+ direct:=projectyz(theta,phi);
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(4); % twist
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=0;
+ phi:=90*(cosd(they)**power);
+ direct:=projectyz(theta,phi);
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(3); % splaytwist in splay
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=90*cosd(they)*cosd(thex);
+ phi:=60*sind(2*they)*sind(thex);
+ direct:=projectyz(theta,phi);
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(5); % splaytwist in twist
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=30*sind(2*they)*sind(thex);
+ phi:=-90*cosd(they)*cosd(thex);
+ direct:=projectyz(theta,phi);
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(7); % splaytwist in bend
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=90*cosd(they)*sind(thex);
+ phi:=30*sind(2*they)*cosd(thex);
+ direct:=(cosd(theta)*sind(phi),cosd(theta)*cosd(phi));
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+beginfig(1); % splay-bend wall
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*varc;
+ they:=j*varc;
+ theta:=0;
+ phi:=2*angle(1,mexp(thex*9));
+ direct:=(cosd(theta)*sind(phi),cosd(theta)*cosd(phi));
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+prologues := 1;
+
+beginfig(6);
+ pickup pencircle scaled u;
+ numeric rescal;
+ rescal = 0.15;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=grids*(i,j);
+ thex:=i*rescal;
+ they:=j*rescal;
+ direct:=unitvector((1,they-thex));
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/muslimpattern.mp b/Master/texmf-dist/doc/metapost/featpost/example/muslimpattern.mp
new file mode 100644
index 00000000000..6c40859b746
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/muslimpattern.mp
@@ -0,0 +1,73 @@
+% muslimpattern.mp
+% L. Nobre G.
+% 2012
+
+prologues := 1;
+background := 0.9white;
+
+numeric u, pa, pb, hexf;
+u = 35mm;
+pa = 0.12u;
+pb = 0.05u;
+hexf = sqrt(3)/2;
+
+vardef markpath( expr Pat ) =
+ draw Pat withpen pencircle scaled pa;
+ undraw Pat withpen pencircle scaled pb;
+enddef;
+
+vardef hc( expr Xindex, Yindex ) =
+ 2*u*hexf*(Xindex*right+Yindex*dir(60))
+enddef;
+
+beginfig(1);
+ numeric i, ang;
+ pair c, b, a, d;
+ a = (hexf,0);
+ b = (0.33hexf,-0.4); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CHANGE only this.
+ c = (0,1.5);
+ d = 1.1[b,a];
+ path seg[], aux, hex, auxa, auxb;
+ for i=0 upto 5:
+ seg[i] = (d--b--c) rotated (i*60) scaled u;
+ endfor;
+ seg6 = seg0;
+ ang = angle(c-b);
+ aux = ((a-dir(ang))--(a+dir(ang))) scaled u;
+ z1 = seg0 intersectionpoint seg5;
+ z2 = seg0 intersectiontimes seg5;
+ z3 = unitvector( direction xpart z2 of seg0 );
+ for i=1 upto 6:
+ markpath( aux rotated (i*60) );
+ markpath( seg[i-1] );
+ endfor;
+ auxa = ((a-pb*dir(ang)/u)--(a+pb*dir(ang)/u)) scaled u;
+ auxb = ((a-pa*dir(ang)/u)--(a+pa*dir(ang)/u)) scaled u;
+ for i=1 upto 6:
+ draw auxa rotated ((i-1)*60) withpen pencircle scaled pa;
+ undraw auxb rotated ((i-1)*60) withpen pencircle scaled pb;
+ endfor;
+ auxa := ((z1-pb*z3)--(z1+pb*z3));
+ auxb := ((z1-pa*z3)--(z1+pa*z3));
+ draw auxa withpen pencircle scaled pa;
+ undraw auxb withpen pencircle scaled pb;
+ hex = for i=30 step 60 until 360: u*dir(i)-- endfor cycle;
+ clip currentpicture to hex;
+ picture tile;
+ tile = currentpicture;
+endfig;
+
+beginfig(2);
+ numeric i, j;
+ path rect;
+ rect = hc(0,-1)--hc(1,-1)--hc(0,1)--hc(-1,1)--cycle;
+ fill rect withcolor (1,0.986,0.993);
+ for i=-1 upto 1:
+ for j=-1 upto 1:
+ draw tile shifted hc(i,j);
+ endfor;
+ endfor;
+ clip currentpicture to rect;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/naoestacionar.mp b/Master/texmf-dist/doc/metapost/featpost/example/naoestacionar.mp
new file mode 100644
index 00000000000..e811368c414
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/naoestacionar.mp
@@ -0,0 +1,39 @@
+% naoestacionar.mp
+% L. Nobre G.
+% 2008
+
+prologues := 3;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric stampnum, initang, i, stepang, stampoffset, amplfactor;
+ picture stamp;
+ bboxmargin := 9mm;
+ stampnum = 36;
+ stampoffset = 0.92mm;
+ amplfactor = 20;
+ label.urt( btex \begin{tabular}{c}
+ N\~{A}O \\
+ estacionar
+ \end{tabular} etex scaled amplfactor, origin );
+ stamp = currentpicture;
+ unfill bbox stamp;
+ initang = 180/stampnum;
+ stepang = 2*initang;
+ drawoptions();
+ for i=0 upto (stampnum-1):
+ draw stamp shifted (stampoffset*dir(initang+i*stepang));
+ endfor;
+ undraw stamp;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/newcommunism.mp b/Master/texmf-dist/doc/metapost/featpost/example/newcommunism.mp
new file mode 100644
index 00000000000..3887cdc280f
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/newcommunism.mp
@@ -0,0 +1,237 @@
+% newcommunism.mp
+% L. Nobre G.
+% 2007
+
+prologues := 2;
+
+beginfig(1);
+ numeric u, elhei, elwid, elpos, bawid, bahei, thstp, thdel, i;
+ numeric refang, reft, tfin, tini, spikang;
+ path el, ba, aux, cutel, horns;
+ pair reftpair;
+ color yellow, thered;
+ yellow = 0.87*(0.95*red+0.7*green);
+ thered = 0.66red;
+ u = 2mm;
+ thdel = 25;
+ thstp = 5;
+ elhei = 30u;
+ elwid = 44u;
+ elpos = 26u;
+ bawid = 27u;
+ bahei = 10u;
+ el = (elwid,elpos)..for i=thstp step thstp until 360-thstp:
+ (elwid*cosd(i),elpos+elhei*sind(i)).. endfor cycle;
+ ba = (bawid,-bahei){right}..{left}(bawid,0)--
+ (elwid*cosd(90-thdel),elpos+elhei*sind(90-thdel))--
+ (bawid/3.0,0)--(0,elpos+elhei)--(-bawid/3.0,0)--
+ (elwid*cosd(90+thdel),elpos+elhei*sind(90+thdel))--
+ (-bawid,0){left}..{right}(-bawid,-bahei)--cycle;
+ aux = (0,elpos)--
+ 1.1[(0,elpos),(elwid*cosd(270+2thdel),elpos+elhei*sind(270+2thdel))];
+ reftpair = el intersectiontimes aux;
+ reft = xpart reftpair;
+ refang = angle( direction reft of el );
+ tfin = directiontime dir(180-refang) of el;
+ tini = directiontime dir(180+refang) of el - length el;
+ cutel = subpath (tini,tfin) of el;
+ spikang = (90-angle((0,elpos+elhei)-(-bawid,0)));
+ horns = cutel{dir(-refang-spikang)}..
+ {left}(0,elpos-elhei+bawid/3.0)..
+ {dir(refang+spikang)}cycle;
+ fill ba withcolor yellow;
+ fill horns withcolor yellow;
+ picture storepic;
+ storepic = currentpicture;
+ currentpicture := nullpicture;
+ bboxmargin := bahei;
+ fill bbox storepic withcolor thered;
+ draw storepic;
+endfig;
+
+beginfig(2);
+ numeric u;
+ color yellow, thered;
+ path martelo, foice, monitor, ecran, mar, foi;
+ u = 1pt;
+% yellow = 0.87*(0.95*red+0.7*green);
+ thered = 0.66red;
+ yellow = 0.7blue;
+ picture storemf;
+
+ numeric cabosal, cabesal, cabolar, cabelar;
+ numeric cabolen, cabeclen, cabecontrol, martelrot;
+ pair martelpos;
+ cabosal = 2u;
+ cabesal = 6u;
+ cabolar = 8u;
+ cabelar = 10u;
+ cabolen = 70u;
+ cabeclen = 7u;
+ cabecontrol = 4u;
+ martelrot = 50;
+ martelpos = dir(180)*0.03*cabolen;
+ z100 = origin;
+ z101 = ( cabesal, 0 );
+ z102 = ( cabesal, cabosal+cabelar-cabolen );
+ z103 = ( cabesal+cabolar, cabosal+cabelar-cabolen );
+ z104 = ( cabesal+cabolar, 0 );
+ z105 = ( cabesal+cabolar+cabeclen, 0 );
+ z106 = ( cabesal+cabolar+cabecontrol, cabelar );
+ z107 = ( cabesal+cabolar, cabelar );
+ z108 = ( cabesal+cabolar, cabelar+cabosal );
+ z109 = ( cabesal, cabelar+cabosal );
+ z110 = ( cabesal, cabelar );
+ z111 = ( 0, cabelar );
+ martelo = z100--
+ z101--
+ z102--
+ z103--
+ z104--
+ z105..controls z106..
+ z107--
+ z108--
+ z109--
+ z110--
+ z111--cycle;
+ mar = martelo
+ rotated martelrot
+ shifted martelpos;
+
+ filldraw mar withcolor yellow;
+ show mar;
+ numeric fcabolen, fcabolar, foicecontrol, laminang;
+ numeric foicerot, foicaber, flamilar, fcabomar, refang;
+ numeric fmaomarg, fmaorais, fmaospac, fprotrud, basangul;
+ pair foicepos;
+ laminang = 3;
+ refang = 10
+ basangul = 23;
+ fcabomar = 3u;
+ fcabolar = 8u - fcabomar;
+ flamilar = 4u;
+ fcabolen = 22u;
+ foicecontrol = 2u;
+ fmaomarg = 6u;
+ fmaorais = 2u;
+ fmaospac = 14u;
+ fprotrud = 30u;
+ foicaber = 42u;
+ foicerot = -50;
+ foicepos = dir(270)*0.3*foicaber;
+ z200 = origin;
+ z201 = ( -fcabomar, 0 );
+ z202 = ( -fcabomar, -fcabolen );
+ z203 = ( fcabolar, -fcabolen );
+ z204 = ( fcabolar+foicecontrol, -fcabolen );
+ z205 = ( fcabolar+fmaomarg, fmaorais-fmaospac );
+ z206 = ( fcabolar, -fmaospac );
+ z207 = ( fcabolar, 0 );
+ z208 = ( -fprotrud, foicaber );
+ z209 = ( 0, flamilar );
+ foice = z200--
+ z201--
+ z202--
+ z203..controls z204..
+ z205{dir(-160)}..{left}
+ z206--
+ z207{dir(basangul)}..tension 0.8..{dir(180+refang+laminang)}
+ z208{dir(refang-laminang)}..tension 0.8..{dir(180+basangul)}
+ z209--cycle;
+ foi = foice
+ rotated foicerot
+ shifted foicepos;
+
+ filldraw foi withcolor yellow;
+ show foi;
+ storemf = currentpicture shifted -(center currentpicture);
+ currentpicture := nullpicture;
+
+
+
+
+
+
+ numeric monith, monitw;
+ pair mll, mlr, mur, mul;
+ monith = 18u + ypart ((urcorner storemf)-(llcorner storemf));
+ monitw = 1.34monith;
+ mll = (-0.5monitw, -0.5monith);
+ mlr = (0.5monitw, -0.5monith);
+ mur = (0.5monitw, 0.5monith);
+ mul = (-0.5monitw, 0.5monith);
+ ecran = mll--
+ mlr--
+ mur--
+ mul--cycle;
+
+ numeric bordthick, roundfrac, alturpe, borraspac, largupe;
+ numeric borralarg, apoiolarg, cornermarg, apoiothick;
+ bordthick = 13u;
+ roundfrac = 0.3;
+ alturpe = 15u;
+ borraspac = 0.95u;
+ largupe = 50u;
+ borralarg = 60u;
+ apoiolarg = 156u;
+ cornermarg = 2u;
+ apoiothick = 18u;
+ z301 = (0.5largupe,-0.5monith-bordthick);
+ z302 = (0.5monitw+roundfrac*bordthick,-0.5monith-bordthick);
+ z303 = (0.5monitw+bordthick,-0.5monith-roundfrac*bordthick);
+ z304 = (0.5monitw+bordthick,0.5monith+roundfrac*bordthick);
+ z305 = (0.5monitw+roundfrac*bordthick,0.5monith+bordthick);
+ z306 = (-0.5monitw-roundfrac*bordthick,0.5monith+bordthick);
+ z307 = (-0.5monitw-bordthick,0.5monith+roundfrac*bordthick);
+ z308 = (-0.5monitw-bordthick,-0.5monith-roundfrac*bordthick);
+ z309 = (-0.5monitw-roundfrac*bordthick,-0.5monith-bordthick);
+ z310 = (-0.5largupe,-0.5monith-bordthick);
+ z311 = (-0.5largupe,-0.5monith-bordthick-alturpe);
+ z312 = (-0.5apoiolarg+cornermarg,
+ -0.5monith-bordthick-alturpe-cornermarg);
+ z313 = (-0.5apoiolarg,
+ -0.5monith-bordthick-alturpe-apoiothick-borraspac);
+ z314 = (-0.5borralarg,
+ -0.5monith-bordthick-alturpe-apoiothick-borraspac);
+ z315 = (0,-0.5monith-bordthick-alturpe-apoiothick);
+ z316 = (0.5borralarg,
+ -0.5monith-bordthick-alturpe-apoiothick-borraspac);
+ z317 = (0.5apoiolarg,
+ -0.5monith-bordthick-alturpe-apoiothick-borraspac);
+ z318 = (0.5apoiolarg-cornermarg,
+ -0.5monith-bordthick-alturpe-cornermarg);
+ z319 = (0.5largupe,-0.5monith-bordthick-alturpe);
+ monitor = z301--
+ z302{right}..{up}
+ z303--
+ z304{up}..{left}
+ z305--
+ z306{left}..{down}
+ z307--
+ z308{down}..{right}
+ z309--
+ z310--
+ z311..controls z312..
+ z313--
+ z314{dir(73)}...{right}
+ z315{right}...{dir(-73)}
+ z316--
+ z317..controls z318..
+ z319--cycle;
+ draw monitor withcolor thered;
+ bboxmargin := monitw;
+ fill bbox monitor withcolor thered;
+ filldraw monitor withcolor yellow;
+ filldraw ecran withcolor thered;
+ show monitor;
+ show ecran;
+% label.urt("New Communism", llcorner monitor);
+ draw storemf;
+
+
+ endfig;
+
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/nosimples.mp b/Master/texmf-dist/doc/metapost/featpost/example/nosimples.mp
new file mode 100644
index 00000000000..84fb96093f7
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/nosimples.mp
@@ -0,0 +1,61 @@
+% nosimples.mp
+% L. Nobre G.
+% 2012
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, ray, side, i, pensize, ang, fac, mar;
+ u = 2mm;
+ ray = 2.9u;
+ size = 10u;
+ pensize = 0.45u;
+ fac = 2.5;
+ mar = 1.0;
+ pickup pencircle scaled pensize;
+ for i=1 upto 5:
+ ang := i*72+18;
+ z[i] = size*dir(ang);
+ endfor;
+ z6 = z1+ray*(dir(-36)+dir(54));
+ z61 = z1+ray*(dir(-36)+dir(-18));
+ z11 = z1+ray*(dir(216)+dir(126));
+ z7 = z2+ray*(dir(216)+dir(126));
+ z8 = z3+ray*(dir(216)+dir(198));
+ z12 = z2+ray*(dir(216)+dir(198));
+ z21 = z1+ray*(dir(216)+dir(198));
+ z24 = z4+ray*(dir(216)+dir(198));
+ z13 = z3+2*ray*down;
+ z9 = z4+2*ray*down;
+ z15 = z5+ray*(dir(-36)+dir(54));
+ z10 = z5+ray*(dir(-36)+dir(-18));
+ z14 = z4+ray*(dir(-36)+dir(-18));
+ z63 = z3+ray*(dir(-36)+dir(-18));
+ z16 = fac[z1,z2];
+ z17 = (fac-mar)[z5,z3];
+ z18 = (fac-mar)[z2,z4];
+ z19 = fac[z1,z5];
+ z35 = (z10--z14) intersectionpoint (z5--z19);
+ z34 = (z13---z9..z14---z10) intersectionpoint (z4--z18);
+ z33 = (z9---z13..z8---z12) intersectionpoint (z3--z17);
+ z32 = (z2--z16) intersectionpoint (z8--z12);
+ z31 = (z1--z2) intersectionpoint (z21--z24);
+ z50 = (z21--z24) intersectionpoint (z3--z5);
+ z55 = (z3--z5) intersectionpoint (z2--z4);
+ z70 = (z61--z63) intersectionpoint (z2--z4);
+ z75 = (z61--z63) intersectionpoint (z21--z24);
+ draw z9---z13..z8---z12..z7;
+ draw z55--z18--z19--z5;
+ draw (z1{dir(144)}..z11..z21---z24..z9..{dir(54)}z14) cutafter (z2--z18);
+ draw z35---z10..z15..z5---z50;
+ draw z33..z17--z16--z32;
+ draw z31---z1..z6--z15;
+ draw z7--z11;
+% draw z1..z6..z61---z63..z13..z8;
+ draw z70--z75;
+% dotlabels.top(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,55);
+% dotlabels.lft(21,24,31,32,33,34,35,50);
+% dotlabels.bot(61,63,70,75);
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/nosuspension.mp b/Master/texmf-dist/doc/metapost/featpost/example/nosuspension.mp
new file mode 100644
index 00000000000..2be03e82d71
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/nosuspension.mp
@@ -0,0 +1,131 @@
+% nosuspension.mp
+% the hard way to write
+
+beginfig(0);
+ picture l[], auxpic;
+ numeric gridsp, u, pensz, yprop,
+ altura, largura, small, big, thisjump, thatjump;
+ pen thispen, thatpen;
+ path auxpat, thispat, thatpat;
+ pair currpos, reforigin;
+ u = 1mm;
+ pensz = 0.5u;
+ yprop = 1.5;
+ gridsp = 6u;
+ altura = 3gridsp;
+ largura = 2gridsp;
+ small = 0.5gridsp;
+ big = 0.6667gridsp;
+ thisjump = 3gridsp;
+ thatjump = 4gridsp;
+ reforigin = (10cm,15cm) + left*9.5cm;
+ auxpat = (0,yprop*u)--(0.4u,yprop*u){right}..{down}(1u,0.9u)--(1u,0);
+ auxpat := auxpat--(auxpat reflectedabout(origin,right));
+ thispat = auxpat--(auxpat reflectedabout(origin,up));
+ thatpat = thispat rotated 90;
+ thispen = makepen(thispat) scaled pensz;
+ thatpen = makepen(thatpat) scaled pensz;
+ draw (big,0)--origin
+ --(0,altura)
+ --(largura,0)
+ --(largura,altura)
+ --(largura-big,altura) withpen thatpen;
+ l1 = currentpicture;
+ currentpicture := nullpicture;
+ draw (largura,largura)--(0,largura)
+ --origin
+ --(altura,largura)
+ --(altura,0)
+ --(altura-largura,0) withpen thatpen;
+ l2 = currentpicture;
+ currentpicture := nullpicture;
+ draw (altura,largura-small)--(altura,largura)
+ --(0,largura)
+ --(altura,0)
+ --origin
+ --(0,small) withpen thispen;
+ l3 = currentpicture;
+ currentpicture := nullpicture;
+ draw (small,altura)--(0,altura)
+ --origin
+ --(largura,0)
+ --(largura,altura)
+ --(largura-small,altura) withpen thispen;
+ l4 = currentpicture;
+ currentpicture := nullpicture;
+ draw (small,0)--origin
+ --(0,altura)
+ --(largura,altura)
+ --(largura,altura-gridsp)
+ --(0,altura-gridsp) withpen thispen;
+ l5 = currentpicture;
+ currentpicture := nullpicture;
+ draw (largura,small)--(largura,0)
+ --origin
+ --(0,altura)
+ --(largura,altura)
+ --(largura,altura-small) withpen thispen;
+ draw (0,largura)--(largura-small,largura) withpen thispen;
+ l6 = currentpicture;
+ currentpicture := nullpicture;
+ draw (-small,0)--origin
+ --(0,altura)
+ --(-small,altura) withpen thispen;
+ l7 = currentpicture;
+ currentpicture := nullpicture;
+ draw (largura-small,largura)--(largura-small,altura)
+ --(0,altura)
+ --origin
+ --(largura,0)
+ --(largura,largura)
+ --(0,largura) withpen thispen;
+ l8 = currentpicture;
+ currentpicture := nullpicture;
+ draw origin--(small,0)
+ --(small,largura)
+ --(0,largura) withpen thatpen;
+ draw (small,largura-big)--(largura,largura)
+ --(largura,largura-small) withpen thatpen;
+ draw (altura,small)--(altura,0)
+ --(largura-big,largura-small) withpen thatpen;
+ l9 = currentpicture;
+ currentpicture := nullpicture;
+ currpos = (thisjump,thatjump+gridsp)+reforigin;
+ draw l1 scaled 2 shifted currpos;
+ currpos := currpos+(2thisjump,0);
+ draw l2 scaled 2 shifted currpos withcolor 0.875red;
+ currpos := reforigin;
+ draw l3 shifted currpos;
+ currpos := currpos+(thatjump,0);
+ draw l4 shifted currpos;
+ currpos := currpos+(thisjump,gridsp);
+ draw l3 shifted currpos;
+ currpos := currpos+(thatjump,-gridsp);
+ draw l5 shifted currpos;
+ currpos := currpos+(thisjump,0);
+ draw l6 shifted currpos;
+ currpos := currpos+(thisjump,gridsp);
+ draw l1 shifted currpos;
+ currpos := currpos+(thisjump,-gridsp);
+ draw l3 shifted currpos;
+ currpos := currpos+(thatjump+small,0);
+ draw l7 shifted currpos;
+ currpos := currpos+(gridsp,gridsp);
+ draw l2 shifted currpos;
+ currpos := currpos+(thatjump,-gridsp);
+ draw l1 shifted currpos;
+ currpos := reforigin+(2thatjump,-thatjump);
+ draw l8 shifted currpos;
+ currpos := currpos+(thisjump+small,-gridsp);
+ draw l7 shifted currpos;
+ currpos := currpos+(gridsp,gridsp);
+ draw l9 shifted currpos;
+ currpos := currpos+(thatjump,-gridsp);
+ draw l6 shifted currpos;
+ currpos := currpos+(thisjump,gridsp);
+ draw l3 shifted currpos;
+endfig;
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/nulldefectanglexample.mp b/Master/texmf-dist/doc/metapost/featpost/example/nulldefectanglexample.mp
new file mode 100644
index 00000000000..182c6e4120e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/nulldefectanglexample.mp
@@ -0,0 +1,134 @@
+% nulldefectanglexample.mp
+% L. Nobre G.
+% 2012
+
+input featpost3Dplus2D;
+
+prologues := 1;
+
+beginfig(1);
+ color po[];
+ numeric ta, tb;
+ pen stroke;
+ stroke = pencircle scaled 3pt;
+ ta = sind(36)/cosd(36);
+ tb = sind(18)/cosd(18);
+ po1 = (1,ta,0);
+ po2 = (-1,ta,0);
+ po3 = (-1,tb,0);
+ po4 = (-1,-ta,0);
+ po5 = (0,-ta,0);
+ po6 = (1,-ta,0);
+ po7 = (1,0,0);
+ path frame;
+ frame = rp(po1)--rp(po2)--rp(po4)--rp(po6)--cycle;
+ unfill frame;
+ drawoptions( withpen stroke );
+ draw frame;
+ drawoptions( dashed evenly );
+ draw rp(black)--rp(po1);
+ draw rp(black)--rp(po3);
+ draw rp(black)--rp(po5);
+ draw rp(black)--rp(po7);
+endfig;
+
+beginfig(2);
+ numeric parang, refdista, refdistb, auxa, auxb;
+ parang = 55;
+ refdista = conorm(po1-po3);
+ refdistb = 1 ++ ta;
+ auxa = (ta-tb)*sind(18);
+ auxb = (ta-tb)*cosd(18);
+ po7 := (cosd(parang),0,-sind(parang));
+ po6 := po7+po5;
+ po1 := improvertex( black, refdistb, po7, ta, po3, refdista, po1 );
+ po8 = po3+N(po3)*auxa;
+ po2 := po8+auxb*ncrossprod(po3,ccrossprod(po1,po3));
+ drawoptions( withpen stroke );
+ path a, b, c, d;
+ a = rp(black)--rp(po3)--rp(po4)--rp(po5)--cycle;
+ b = rp(black)--rp(po5)--rp(po6)--rp(po7)--cycle;
+ c = rp(black)--rp(po7)--rp(po1)--cycle;
+ d = rp(black)--rp(po1)--rp(po2)--rp(po3)--cycle;
+ unfill a; draw a;
+ unfill b; draw b;
+ unfill c; draw c;
+ unfill d; draw d;
+endfig;
+
+beginfig(3);
+ numeric a, b, c, i, j;
+ a = 0.5;
+ b = 0.5*sqrt(3);
+ V1 := (b,-a,a);
+ V2 := (2*b,-a,0);
+ V3 := (b,a,a);
+ V4 := (2*b,a,0);
+ V5 := (b,a,0);
+ V6 := (0,1,0);
+ c = 6;
+ for j=1 upto 2:
+ for i=1 upto 6:
+ c := incr(c);
+ V[c] := rotvecaroundanother( j*120, V[i], blue );
+ endfor;
+ endfor;
+ makeface1(1,3,7,9,13,15);
+ makeface2(1,2,4,3);
+ makeface3(3,4,5);
+ makeface4(3,5,6,7);
+ makeface5(7,6,8);
+ makeface6(7,8,10,9);
+ makeface7(9,10,11);
+ makeface8(9,11,12,13);
+ makeface9(13,12,14);
+ makeface10(13,14,16,15);
+ makeface11(15,16,17);
+ makeface12(15,17,18,1);
+ makeface13(1,18,2);
+ f := (5,0.9,9);
+ draw_invisible( false, false, white, black );
+endfig;
+
+beginfig(4);
+ numeric bsang, dista, distb, distc, distd, verdi, hordi, si, co;
+ color cauxa, cauxb, cauxd;
+ bsang = 15;
+ cauxa = (-1-sind(22),-1-cosd(22),1);
+ cauxb = (-1-cosd(22),-1-sind(22),1);
+ cauxd = (1+cosd(15),sind(15)-1,1);
+ V1 := (-1,1,1);
+ V2 := (-1,-1,1);
+ distc = conorm(V2-cauxb);
+ V3 := (1,-1,1);
+ dista = conorm(cauxa-V3);
+ V4 := (1,1,1);
+ distd = conorm(V4-cauxd);
+ V6 := (-1-cosd(bsang)*cosd(22),1+sind(22),1-sind(bsang)*cosd(22));
+ V7 := (-1-cosd(bsang)*cosd(22),-1-sind(22),1-sind(bsang)*cosd(22));
+ distb = conorm(cauxa-cauxb);
+ V8 := improvertex( V3, dista, V7, distb, V2, distc, cauxb-(0,0,0.5) );
+ V5 := (X(V8),-Y(V8),Z(V8));
+ verdi = 1-Z(V8);
+ hordi = Y(V8)+1;
+ si = verdi/(verdi++hordi);
+ co = hordi/(verdi++hordi);
+ V9 := (1+0.5*sqrt(2),-1+0.5*sqrt(2)*co,1-0.5*sqrt(2)*si);
+ V10 := improvertex( V9, 1, V3, 1, V4, distd, (1,-1,0) );
+ V11 := (X(V10),-Y(V10),Z(V10));
+ V12 := (X(V9),-Y(V9),Z(V9));
+ NF := 0;
+ makeface1(1,2,3,4);
+ makeface2(1,5,6);
+ makeface3(1,2,7,6);
+ makeface4(2,7,8);
+ makeface5(2,3,9,8);
+ makeface6(3,9,10);
+ makeface7(3,4,11,10);
+ makeface8(4,11,12);
+ makeface9(1,5,12,4);
+ f := (9,2,5);
+ draw_invisible( false, false, white, black );
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/onebigword.mp b/Master/texmf-dist/doc/metapost/featpost/example/onebigword.mp
new file mode 100644
index 00000000000..c8621e7adb1
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/onebigword.mp
@@ -0,0 +1,17 @@
+
+beginfig(1);
+ picture topl;
+ color one, two, thr, fur;
+ string drawcommand;
+ drawcommand = "draw topl withcolor one;";
+% defaultfont := "putr8r";
+% defaultfont := "bchr8r";
+ one = (0.13333,0.54510,0.13334);
+ two = (0.74118,0.71764,0.41961);
+ thr = (0.80000,0.20000,0.20000);
+ fur = (0.00000,0.85000,1.00000);
+ topl = thelabel( "40", origin) scaled 7;
+ scantokens( drawcommand );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/optest.mp b/Master/texmf-dist/doc/metapost/featpost/example/optest.mp
new file mode 100644
index 00000000000..67a2099bf52
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/optest.mp
@@ -0,0 +1,51 @@
+% optest.mp
+% L. Nobre G.
+% 2000
+
+beginfig(1);
+% linecap := squared;
+ pickup pencircle scaled 0.1mm;
+ numeric salto, i, shif;
+ pair cen;
+ shif = 2cm;
+ cen = (10.5cm,14.845cm);
+ draw ((-shif,0)--(shif,0)) shifted cen;
+ draw ((0,-shif)--(0,shif)) shifted cen;
+ pickup pencircle scaled 0.05mm;
+ salto = 1mm;
+ for i = 20 upto 22:
+ draw fullcircle scaled (i*salto) shifted cen;
+ endfor;
+ for i = 27 upto 28:
+ draw unitsquare shifted (-0.5,-0.5)
+ scaled (i*salto)
+ rotated 45 shifted cen;
+ endfor;
+ for i = 29 upto 31:
+ draw fullcircle scaled (i*salto) shifted cen;
+ endfor;
+ for i = -10 step 2 until 10:
+ draw (origin--shif*(1-0.0125*abs(i))*dir(i)) shifted cen;
+ endfor;
+endfig;
+
+beginfig(2);
+ linecap := squared;
+ pickup pensquare scaled 0.15mm;
+ numeric salto, ix, iy;
+ path face;
+ picture descrit;
+ salto = 0.3in;
+ face = unitsquare xscaled 1.33 scaled 2;
+ fill face withcolor red;
+ draw face;
+ descrit = currentpicture;
+ currentpicture := nullpicture;
+ for iy = 1 upto 5:
+ for ix = 1 upto 5:
+ draw descrit shifted ( ix*salto, iy*salto );
+ endfor;
+ endfor;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/pifpaf.mp b/Master/texmf-dist/doc/metapost/featpost/example/pifpaf.mp
new file mode 100644
index 00000000000..f17d2852d02
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/pifpaf.mp
@@ -0,0 +1,56 @@
+% pifpaf.mp
+% L. Nobre G.
+% 2010
+
+prologues := 1;
+
+beginfig(1);
+ numeric u, siz, lena, lenb, lenc, anga, angb, angc, astep;
+ u = 7mm;
+ siz = 12u;
+ lena = 9u;
+ lenb = 8u;
+ lenc = 4u;
+ astep = 1.7;
+ z1 = (-lenb,siz-lena);
+ z2 = (lenb,siz-lena);
+ path circa, circb;
+ numeric auxa, auxb, auxc, lend;
+ auxa = 2*(lena+2*lenc);
+ auxb = 2*lena;
+ circa = fullcircle scaled auxa shifted z1;
+ circb = fullcircle scaled auxb shifted z2;
+ z3 = circa intersectionpoint circb;
+ anga = angle(z3-z1);
+ angb = 180-angle(z3-z2);
+ auxc = lena +-+ (lenb-lenc);
+ angc = angle(lenb-lenc,auxc);
+ show (anga,angc,angb);
+ z4 = z2+(lenc-lenb,auxc);
+ z5 = z1+(lenb-lenc,auxc);
+ draw z1--z2--z4--z5--cycle;
+ draw z1--z2--z3--cycle;
+ z6 = z1+lena*dir(anga);
+ z7 = z2+lena*dir(180-angb);
+ z8 = 0.5[z6,z7];
+ lend = siz-lena+auxc;
+ z9 = z8+lend*dir(anga-90);
+ draw z8--z9;
+ draw origin withpen pencircle scaled 3pt;
+ numeric i, diamc;
+ pair parp, intp, pa, pb;
+ diamc = 4*lenc;
+ for i=anga step astep until angc:
+ parp := z1+lena*dir(i);
+ circa := fullcircle scaled diamc shifted parp;
+ intp := circa intersectionpoint circb;
+ pa := 0.5[parp,intp];
+ pb := lend*unitvector((ypart (intp-parp),-xpart (intp-parp)));
+ draw pa--(pa+pb);
+ draw (-xpart (pa+pb),ypart (pa+pb)) withpen pencircle scaled 2pt;
+ draw (pa+pb) withpen pencircle scaled 2pt;
+ endfor;
+
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/pixelgrid.mp b/Master/texmf-dist/doc/metapost/featpost/example/pixelgrid.mp
new file mode 100644
index 00000000000..e6a1418485b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/pixelgrid.mp
@@ -0,0 +1,45 @@
+% pixelgrid.mp
+% L. Nobre G.
+% 2001
+
+%input mp-tool;
+path fullsquare;
+fullsquare := unitsquare shifted - center unitsquare ;
+
+beginfig(1);
+ numeric u, ix, iy, s, h, v, i, j, n, f, r, l;
+ numeric last, angl, hori;
+ path frame;
+ pair cpos;
+ u = 2mm;
+ s = 1.2u;
+ n = 1; % 6
+ f = 30; % 5
+ h = f*n;
+ v = ceiling(h/sqrt(2));
+ frame = fullsquare scaled 1u;
+% for ix=0 upto h:
+% for iy=-v upto v:
+% draw frame shifted (ix*s,iy*s);
+% endfor;
+% endfor;
+ filldraw frame;
+ for i=1 upto n:
+ r := i*f;
+ l := round(r/sqrt(2));
+ last := 0;
+ for j=0 upto l:
+ hori := round(sqrt(r*r-j*j));
+ cpos := (hori*s,j*s);
+ angl := angle(cpos);
+ filldraw frame shifted cpos;
+ show angl-last;
+ last := angl;
+% draw origin--cpos;
+ endfor;
+ endfor;
+% draw fullcircle scaled (2*r*s) withcolor red;
+% draw boundingbox currentpicture;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/plaintangency.mp b/Master/texmf-dist/doc/metapost/featpost/example/plaintangency.mp
new file mode 100644
index 00000000000..6926ddb2256
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/plaintangency.mp
@@ -0,0 +1,106 @@
+% plaintangency.mp
+% L. Nobre G.
+% IYP (2005)
+
+%input mp-tool;
+
+def paircrossprod(expr A, B) =
+ ( (xpart A)*(ypart B) - (xpart B)*(ypart A) )
+enddef;
+
+def firsttangencypoint( expr Path, Point, ResolvN ) =
+ begingroup
+ save auxp, i, cutp, va, vb;
+ path auxp;
+ numeric i;
+ pair cutp, va, vb;
+ auxp =
+ hide( va := unitvector( point 0 of Path - Point );
+ vb := unitvector( direction 0 of Path ); )
+ ( paircrossprod( va, vb ), 0 )
+ for i=1/ResolvN step 1/ResolvN until length Path:
+ hide( va := unitvector( point i of Path - Point );
+ vb := unitvector( direction i of Path ); )
+ ...( paircrossprod( va, vb ), i )
+ endfor;
+ cutp = auxp intersectionpoint ( origin--( 0, length Path ) );
+ ( point ( ypart cutp ) of Path )
+ endgroup
+enddef;
+
+beginfig(0);
+ numeric u, i;
+ u = 5mm;
+ pen a, b, c;
+ a = pencircle scaled 3pt;
+ b = pencircle scaled 5pt;
+ c = pencircle scaled 1pt;
+ z1 = (1u,1u);
+ z2 = (4u,4u);
+ z3 = (4u,5u);
+ z4 = (3u,5u);
+ z5 = (3u,6u);
+ z6 = (4u,7u);
+ z7 = (6u,1u);
+ path cp;
+ cp = z1{up}..z2..z3..z4..z5..{up}z6;
+ draw cp withpen c;
+ for i=1 upto 6:
+ draw z[i] withpen a withcolor 0.5*(red+green);
+ endfor;
+ z8 = firsttangencypoint( cp, z7, 5 );
+ draw z7 withpen b withcolor green;
+ draw z7--z8 withpen c withcolor blue;
+endfig;
+
+beginfig(1);
+ numeric u;
+ u = 5mm;
+ pen a, b, c;
+ path auxp;
+ numeric i, auxn, yfact, sinfact, res;
+ pair cutp, vA, vB;
+ yfact = 30;
+ sinfact = 40;
+ res = 15;
+ a = pencircle scaled 3pt;
+ b = pencircle scaled 5pt;
+ c = pencircle scaled 1pt;
+ z1 = (1u,1u);
+ z2 = (4u,4u);
+ z3 = (4u,5u);
+ z4 = (3u,5u);
+ z5 = (3u,6u);
+ z6 = (4u,7u);
+ z7 = (6u,2.8u);
+ path cp;
+ cp = z1{up}..z2..z3..z4..z5..{up}z6;
+ draw z7 withpen b withcolor green;
+ draw cp withpen a;
+ auxp = hide( vA := unitvector(point 0 of cp - z7);
+ vB := unitvector(direction 0 of cp); )
+ ( sinfact*((xpart vA)*(ypart vB) - (xpart vB)*(ypart vA)), 0 )
+ for i=1/res step 1/res until length cp:
+ hide( vA := unitvector(point i of cp - z7);
+ vB := unitvector(direction i of cp); )
+ ...(sinfact*((xpart vA)*(ypart vB)-(xpart vB)*(ypart vA)),i*yfact)
+ endfor;
+ draw auxp withcolor blue+green;
+ draw origin--(sinfact,0) withcolor red;
+ draw origin--( 0, yfact*length cp ) withcolor red+green;
+ cutp = auxp intersectionpoint ( origin--( 0, yfact*length cp ) );
+ draw cutp withpen a;
+ auxn = ( ypart cutp )/yfact;
+ show auxn;
+ z8 = point auxn of cp;
+ draw z8 withpen b withcolor green;
+ draw z7--1.8[z7,z8] withpen c withcolor blue;
+endfig;
+
+end.
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/potenciadecicloeliptico.mp b/Master/texmf-dist/doc/metapost/featpost/example/potenciadecicloeliptico.mp
new file mode 100644
index 00000000000..ed7ca2c7ff9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/potenciadecicloeliptico.mp
@@ -0,0 +1,46 @@
+% potenciadecicloeliptico.mp
+% L. Nobre G.
+% 2008
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino,concmath,ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric u,w,h;
+ u = 5mm;
+ w = 11u;
+ h = 6u;
+ drawarrow origin--(0,h);
+ drawarrow origin--(w,0);
+ label.lft( btex $p$ etex, (0,h) );
+ label.bot( btex $V$ etex, (w,0) );
+ numeric wm, hm, tl;
+ tl = 0.05*h;
+ wm = 0.1+uniformdeviate(0.07);
+ hm = 0.1+uniformdeviate(0.07);
+ path elipse;
+ elipse = fullcircle xscaled (w-2*w*wm) yscaled (h-2*h*hm)
+ shifted (w/2,h/2);
+ draw elipse;
+ z1 = (w*wm,0);
+ z3 = (w*(1-wm),0);
+ z2 = (0,h*(1-hm));
+ z4 = (0,h*hm);
+ draw z1--(z1+tl*up);
+ draw z3--(z3+tl*up);
+ draw z2--(z2+tl*right);
+ draw z4--(z4+tl*right);
+ label.lft( btex $p_b$ etex, z2 );
+ label.bot( btex $V_a$ etex, z1 );
+ label.lft( btex $p_d$ etex, z4 );
+ label.bot( btex $V_c$ etex, z3 );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/probtodooterr.mp b/Master/texmf-dist/doc/metapost/featpost/example/probtodooterr.mp
new file mode 100644
index 00000000000..bd37e273b67
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/probtodooterr.mp
@@ -0,0 +1,75 @@
+% probtodooterr.mp
+% L. Nobre G.
+% 2003
+
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex
+
+beginfig(1);
+ ahangle := 30;
+ ahlength := 5mm;
+ currentpen := pencircle scaled 1mm;
+ numeric u, ray, delta, theta, tray, vlen;
+ numeric cray, clen, chig, cfra, cang;
+ path cpat, fall, vpat, tpat, apat, rpat;
+ picture cpic;
+ u = 1mm;
+ cray = 4u;
+ clen = 27u;
+ chig = 12u;
+ cfra = 1.3;
+ cang = 15;
+ theta = 38;
+ ray = 65u;
+ delta = 12u;
+ vlen = 39u;
+ tray = 0.3ray;
+ z1 = (-clen/2,0);
+ z2 = (-clen/2+cray,chig);
+ z3 = (cray,chig);
+ z4 = (clen/2,1.5*cray);
+ z5 = (clen/2,0);
+ z6 = (-clen/2+cfra*cray,0);
+ z7 = (clen/2-cfra*cray,0);
+ z8 = (ray,0);
+ z9 = (ray+delta,0);
+ z10 = (0,ray);
+ z11 = ray*(sind(theta),cosd(theta));
+ z12 = z11+vlen*(cosd(theta),-sind(theta));
+ cpat = z1{up}..{right}z2--z3{right}..z4..{down}z5{left}...{left}z1;
+% dotlabels( 1,2,3,4,5);
+ fall = z11{dir(-theta)}..{dir(-85)}z9;
+ vpat = z11--z12;
+ rpat = origin--z11;
+ tpat = (halfcircle cutafter (origin--up)) scaled (2ray);
+ apat = ((halfcircle cutafter (origin--up))
+ cutbefore rpat) scaled (2tray);
+ draw cpat;
+ filldraw fullcircle scaled cray shifted z6;
+ filldraw fullcircle scaled cray shifted z7;
+ cpic = currentpicture;
+ currentpicture := nullpicture;
+ draw z9--tpat;
+ draw fall dashed evenly;
+ drawarrow vpat;
+ drawarrow rpat;
+ draw apat;
+ draw cpic rotated (-cang)
+ shifted ((ray+0.5cray)*(sind(cang),cosd(cang)));
+ draw origin--z10 dashed evenly;
+ label.top(btex $\theta$ etex scaled 2, point 0.5 of apat );
+ label.top(btex $l$ etex scaled 2, 0.5[z8,z9] );
+ label.lrt(btex $R$ etex scaled 2, point 0.5 of rpat );
+ label.urt(btex $\vec{v}_0$ etex scaled 2, point 0.5 of vpat );
+
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
+
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/profaux.mp b/Master/texmf-dist/doc/metapost/featpost/example/profaux.mp
new file mode 100644
index 00000000000..d9f8b5fbf91
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/profaux.mp
@@ -0,0 +1,70 @@
+% profaux.mp
+% L. Nobre G.
+% 2005
+
+beginfig(1);
+ numeric u, penbig, pensma, aangle, barhei, cirray, ularg, umarg, xhei, xcen;
+ numeric atray;
+ u = 1cm;
+ cirray = 5u;
+ atray = 6.7u;
+ aangle = 33;
+ penbig = 1.85u;
+ pensma = 0.75u;
+ barhei = -1u;
+ ularg = penbig-pensma;
+ umarg = 0.5*pensma;
+ color cux, coa;
+ cux = 0.78red;
+ coa = 0.78green;
+ pen bigpen, smapen;
+ bigpen = pencircle scaled penbig;
+ smapen = pencircle scaled pensma;
+ path theu;
+ z11 = (-0.5*ularg,0.5*ularg+umarg);
+ z12 = ( 0.5*ularg,0.5*ularg+umarg);
+ theu = (z11--(halfcircle scaled ularg rotated 180)--z12);
+ draw theu;
+ xhei = ularg+umarg;
+ xcen = 0.5*umarg;
+ z13 = (ularg+1.5*pensma)*right + xcen*up;
+ z14 = z13 + 0.5*(ularg,xhei);
+ z15 = z13 - 0.5*(ularg,xhei);
+ z16 = z13 + 0.5*(-ularg,xhei);
+ z17 = z13 - 0.5*(-ularg,xhei);
+ draw (z14--z15);
+ draw (z16--z17);
+ picture tmpic;
+ tmpic = currentpicture;
+ currentpicture := nullpicture;
+ path horba, theci, lsid, rsid;
+ theci = fullcircle scaled (2*cirray);
+ z2 = atray*up;
+ z1 = z2 - 2*atray*dir(90-0.5*aangle);
+ z3 = z2 + 2*atray*dir(0.5*aangle-90);
+ z5 = barhei*up;
+ z4 = z5 + cirray*left;
+ z6 = z5 + cirray*right;
+ z18= (z2--z1) intersectionpoint theci;
+ z19= (z2--z3) intersectionpoint theci;
+ lsid = z18--z1;
+ rsid = z19--z3;
+ z7 = (z4--z5) intersectionpoint lsid;
+ z8 = (z5--z6) intersectionpoint rsid;
+ horba = z7--z8;
+ z9 = (z7--z1) intersectionpoint theci;
+ z10= (z8--z3) intersectionpoint theci;
+ drawoptions( withpen bigpen withcolor coa );
+ draw theci;
+ draw z18--z9;
+ draw z19--z10;
+ draw horba;
+ draw tmpic shifted (z10+umarg*(right+down)) withpen smapen withcolor cux;
+% drawoptions( withcolor blue );
+% dotlabels.top(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19);
+endfig;
+end.
+
+
+
+ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/project.mp b/Master/texmf-dist/doc/metapost/featpost/example/project.mp
new file mode 100644
index 00000000000..348a39321dd
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/project.mp
@@ -0,0 +1,75 @@
+
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex
+
+beginfig(1);
+ ahangle := 30;
+ numeric angthe, angalf, angpsi, xtopo, ytopo, xpoin;
+ numeric radthe, radalf, radpsi;
+ numeric ysize, xsize, margs, units, parac, i, dim;
+ pair vzer, incl, hori, topo;
+ path parab, plani, veloc, xaxis, yaxis, auxil;
+ pen thick, usual, vthin;
+ angpsi = 20;
+ dim = 50;
+ units = 1mm;
+ margs = 8units;
+ xsize = 70units;
+ ysize = 40units;
+ radthe = 22units;
+ radalf = 34units;
+ radpsi = 46units;
+ thick = pencircle scaled 0.5units;
+ usual = pencircle scaled 0.2units;
+ vthin = pencircle scaled 0.1units;
+ xtopo = xsize/2-margs;
+ ytopo = ysize-2*margs;
+ parac = ytopo/(xtopo*xtopo);
+ yaxis = ( 0, -margs/2 )--( 0, ysize-margs );
+ xaxis = ( -margs, 0 )--( xsize-margs, 0 );
+ plani = ( -margs*cosd( angpsi ), -margs*sind( angpsi ) )
+ --( 2*xtopo, 2*xtopo*sind( angpsi )/cosd( angpsi ) );
+ topo = ( xtopo, ytopo );
+ parab = origin;
+ for i = 1 upto dim:
+ xpoin := 2*i*xtopo/dim;
+ parab := parab..(xpoin,ytopo-parac*(xpoin-xtopo)*(xpoin-xtopo));
+ endfor;
+ ypart( vzer ) = ytopo;
+ vzer = whatever*( direction 0 of parab );
+ veloc = origin--vzer;
+ hori = ( 2*xtopo, 0 );
+ incl = plani intersectionpoint reverse parab;
+ auxil = origin--topo;
+ pickup thick;
+ draw parab cutafter reverse plani;
+ drawarrow veloc;
+ pickup usual;
+ drawarrow xaxis;
+ drawarrow yaxis;
+ draw plani;
+ draw parab cutbefore reverse plani dashed evenly;
+ draw auxil dashed evenly;
+ pickup vthin;
+ draw fullcircle scaled radthe cutafter veloc;
+ draw fullcircle scaled radalf cutafter auxil;
+ draw fullcircle scaled radpsi cutafter plani;
+
+ dotlabel.urt( btex $H$ etex, hori );
+ dotlabel.top( btex $I$ etex, incl );
+ dotlabel.top( btex $T$ etex, topo );
+ label.bot( btex $x$ etex, point 1 of xaxis );
+ label.lft( btex $y$ etex, point 1 of yaxis );
+ label.lft( btex $\vec{v}_0$ etex, vzer );
+ label.urt( btex $\Theta$ etex, ( radthe/2, 0 ) );
+ label.urt( btex $\alpha$ etex, ( radalf/2, 0 ) );
+ label.urt( btex $\Psi$ etex, ( radpsi/2, 0 ) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/qap.mp b/Master/texmf-dist/doc/metapost/featpost/example/qap.mp
new file mode 100644
index 00000000000..c44419afd97
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/qap.mp
@@ -0,0 +1,117 @@
+% qap.mp
+% L. Nobre G.
+% IYP (2005)
+
+def PickColor =
+ ( uniformdeviate(1) , uniformdeviate(1), uniformdeviate(1) )
+enddef;
+
+numeric HalfSideLength, ThinnessFactor;
+numeric ThicknesFactor, BorderThFactor;
+
+HalfSideLength = 10mm;
+ThicknesFactor = 0.17; % Maximum TraceThickness over Half Side
+ThinnessFactor = 0.12; % Minimum TraceThickness over Half Side
+BorderThFactor = 1.35; % Borders over TraceThickness
+
+def RandomStep =
+ begingroup
+ numeric margin;
+ margin = ThicknesFactor-ThinnessFactor;
+ ThinnessFactor*HalfSideLength + uniformdeviate( margin*HalfSideLength )
+ endgroup
+enddef;
+
+def PickInteger( expr MaxNum ) =
+ begingroup
+ save aux;
+ numeric aux;
+ aux = floor( uniformdeviate( MaxNum+0.995 ) );
+ ( aux )
+ endgroup
+enddef;
+
+vardef LocateIndex[] =
+ dotlabel.urt( str @, z@ )
+enddef;
+
+beginfig(1);
+ numeric QNum;
+ QNum = 5 + PickInteger( 5 );
+ numeric tracethickness, i, j, k, angadd, aa, ax, ay;
+ tracethickness = RandomStep;
+ pen tracepen, bordepen;
+ color TheColor;
+ tracepen = pencircle scaled tracethickness;
+ bordepen = tracepen scaled BorderThFactor;
+ path qpath;
+ aa = 360/QNum;
+ ax = HalfSideLength*2*cosd(0.5*aa);
+ ay = HalfSideLength*2*sind(0.5*aa);
+ z0 = (ax,0);
+ z1 = (0,ay);
+ z2 = (-ax,0);
+ z3 = (0,-ay);
+ z4 = z0;
+ qpath = z0--z1--z2--z3--cycle;
+ angadd = uniformdeviate( 20 );
+ TheColor = PickColor;
+ pair Dir[], pos[];
+ boolean Filled[];
+ for i = 0 upto 11:
+ j := floor( i/3 );
+ Dir[i] = dir(angle(z[j+1]-z[j])+80+angadd);
+ Filled[i] = false;
+ pos[i] = (0.25*(i-3*j+1))[z[j],z[j+1]];
+ endfor;
+% for i=0 upto 5:
+% LocateIndex[i];
+% endfor;
+ numeric ThisInd, ThatInd;
+ path ActualPath;
+ for i=1 step 2 until 11:
+ forever:
+ ThisInd := PickInteger( 11 );
+ exitunless Filled[ThisInd];
+ endfor;
+ Filled[ThisInd] := true;
+ forever:
+ ThatInd := PickInteger( 11 );
+ exitunless Filled[ThatInd];
+ endfor;
+ Filled[ThatInd] := true;
+ ActualPath := pos[ThisInd]{Dir[ThisInd]}...pos[ThatInd]{-Dir[ThatInd]};
+% draw ActualPath withcolor background withpen bordepen;
+ draw ActualPath withcolor TheColor withpen tracepen;
+ endfor;
+% draw qpath;
+% clip currentpicture to qpath;
+ pair urCorner, ulCorner, llCorner, lrCorner, cent;
+ path FinalCut;
+ urCorner = ( 8.13in, 11.533in );
+ llCorner = ( 0.118in, 35.5bp );
+ ulCorner = ( xpart llCorner, ypart urCorner );
+ lrCorner = ( xpart urCorner, ypart llCorner );
+ FinalCut = urCorner--ulCorner--llCorner--lrCorner--cycle;
+ cent = 0.25*(urCorner+ulCorner+llCorner+lrCorner);
+ picture Tile[];
+ for i=0 upto 1:
+ Tile[i] = currentpicture rotated (i*180);
+ endfor;
+ currentpicture := nullpicture;
+ pair pairh, pairv;
+ for k = 1 upto QNum:
+ pairh := HalfSideLength*2*dir((k-1)*aa);
+ pairv := HalfSideLength*2*dir(k*aa);
+ for i = 0 upto 11:
+ for j = 0 upto 11:
+ draw Tile[PickInteger( 1 )]
+ rotated ((k-0.5)*aa)
+ shifted ( cent + ax*dir((k-0.5)*aa) + i*pairh + j*pairv );
+ endfor;
+ endfor;
+ endfor;
+ clip currentpicture to FinalCut;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/reeditedgoodquestionmark.mp b/Master/texmf-dist/doc/metapost/featpost/example/reeditedgoodquestionmark.mp
new file mode 100644
index 00000000000..335edcb713c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/reeditedgoodquestionmark.mp
@@ -0,0 +1,102 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2003 Wolfgang Glunz <wglunz@pstoedit.net>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+beginfig(1);
+linecap := butt;
+linejoin := mitered;
+color thisone;
+thisone = 0.89(red+blue);
+pickup pencircle scaled 5pt;
+drawoptions( withcolor thisone );
+filldraw (195,530.844)..controls (194,530.601) and (189.028,529.735)..(184.031,528.933)
+ ..controls (160.022,525.082) and (142.601,518.642)..(132.966,510.056)
+ ..controls (130.528,507.884) and (126.845,505.26)..(124.678,504.152)
+ ..controls (115.044,499.224) and (91.4084,469.097)..(83.408,451.547)
+ ..controls (66.5737,414.619) and (66.9285,381.467)..(84.3374,364.679)
+ ..controls (92.625,356.687) and (97.4766,357.767)..(90.2266,365.99)
+ ..controls (73.2048,385.297) and (71.7183,405.6)..(84.7207,441.188)
+ ..controls (99.7271,482.259) and (141.832,518.625)..(180.984,524.329)
+ ..controls (244.987,523.896) and (256.669,521.674)..(268.734,519.947)
+ ..controls (292.744,516.51) and (334.881,498.66)..(338.69,496.672)
+ ..controls (376.837,476.77) and (405.55,442.959)..(406.819,416.447)
+ ..controls (408.823,374.609) and (371.353,343.266)..(297.375,324.9)
+ ..controls (263.494,316.488) and (250.776,311.818)..(249.303,307.247)
+ ..controls (248.367,304.34) and (255.869,279.337)..(268.611,242.897)
+ ..controls (271.04,235.95) and (274.116,225.037)..(275.498,218.461)
+ ..controls (276.882,211.88) and (278.513,204.947)..(279.155,202.922)
+ ..controls (279.795,200.9) and (281.1,194.634)..(282.074,188.906)
+ ..controls (284.296,175.845) and (284.091,175.611)..(269.831,174.957)
+ ..controls (247.097,173.915) and (235.95,171.325)..(210.844,161.254)
+ ..controls (203.166,158.174) and (199.133,155.911)..(198.871,154.537)
+ ..controls (198.311,151.595) and (203.653,151.668)..(210.112,154.689)
+ ..controls (234.244,165.977) and (259.768,171.819)..(277.753,170.169)
+ ..controls (288.844,169.152) and (290.062,169.692)..(290.062,175.622)
+ ..controls (290.062,183.808) and (277.33,239.484)..(273.368,248.625)
+ ..controls (270.621,254.962) and (254.719,302.351)..(254.719,304.2)
+ ..controls (254.719,308) and (275.559,315.337)..(308.344,323.08)
+ ..controls (398.409,344.349) and (437.595,404.251)..(396.529,457.884)
+ ..controls (389.064,467.634) and (373.547,482.865)..(366.234,487.62)
+ ..controls (363.553,489.364) and (358.069,492.902)..(354.047,495.483)
+ ..controls (350.025,498.063) and (345.089,501.08)..(343.078,502.186)
+ ..controls (341.006,503.325) and (337.837,505.05)..(335.766,506.167)
+ ..controls (318.953,515.225) and (290.794,523.811)..(264.469,527.906)
+ ..controls (250.575,530.067) and (200.517,532.184)..(195,530.844)
+ --cycle;
+filldraw (207.919,482.644)
+ ..controls (190.49,480.417) and (174.226,468.547)..(166.644,452.522)
+ ..controls (158.769,435.876) and (162.565,402.675)..(176.05,370.256)
+ ..controls (176.557,369.037) and (176.421,368.062)..(175.744,368.062)
+ ..controls (155.391,368.062) and (107.786,376.341)..(104.962,380.372)
+ ..controls (103.031,383.127) and (97.9873,383.353)..(91.4062,380.979)
+ ..controls (85.0771,378.697) and (85.1904,375.807)..(91.6499,374.761)
+ ..controls (94.5247,374.296) and (106.519,372.042)..(118.219,369.769)
+ ..controls (129.919,367.496) and (145.874,365.09)..(153.562,364.439)
+ ..controls (169.65,363.078) and (183.916,360.511)..(190.247,357.837)
+ ..controls (195.853,355.469) and (201.463,358.246)..(196.95,361.155)
+ ..controls (180.512,371.751) and (173.322,386.587)..(168.735,419.372)
+ ..controls (159.784,483.356) and (238.737,502.071)..(302.372,451.048)
+ ..controls (337.594,422.807) and (344.183,400.627)..(327.098,367.819)
+ ...(309.562,351.174)
+ ...(245.578,316.83)
+ ..controls (184.519,293.169) and (164.516,279.869)..(166.279,264.103)
+ ..controls (167.475,253.397) and (174.636,230.831)..(182.406,213.281)
+ ..controls (186.11,204.913) and (192.253,190.247)..(196.036,180.74)
+ ..controls (200.934,168.431) and (203.485,163.419)..(204.872,163.382)
+ ..controls (210.979,163.217) and (208.414,171.112)..(186.009,221.447)
+ ..controls (176.46,242.897) and (170,265.054)..(171.867,269.953)
+ ..controls (175.621,279.807) and (203.287,295.989)..(240.094,309.859)
+ ..controls (247.162,312.523) and (254.8,315.411)..(257.156,316.313)
+ ..controls (266.722,319.972) and (293.962,335.564)..(305.053,343.729)
+ ..controls (323.095,360.133) and (325.242,360.506)..(330.599,368.428)
+ ..controls (344.446,388.903) and (345.294,408.567)..(333.207,428.878)
+ ..controls (328.783,436.312) and (317.602,448.621)..(310.659,453.7)
+ ..controls (308.208,455.492) and (303.286,459.626)..(299.508,463.064)
+ ..controls (295.364,466.834) and (285.776,470.003)..(284.456,470.93)
+ ..controls (273.975,478.287) and (222.257,488.798)..cycle;
+filldraw (245.578,139.528)..controls (197.072,122.423) and (188.173,72.8887)..(232.537,66.9353)
+ ..controls (260.447,63.1902) and (291.088,75.9546)..(303.276,96.4031)
+ ..controls (307.416,103.35) and (305.387,112.123)..(298.837,115.594)
+ ..controls (297.619,116.24) and (295.869,118.219)..(294.9,120.047)
+ ..controls (292.05,125.425) and (276.291,130.802)..(263.981,130.596)
+ ..controls (255.572,130.456) and (254.418,128.462)..(262.275,127.647)
+ ..controls (282.75,125.524) and (301.914,109.731)..(297.378,98.7188)
+ ..controls (294.129,90.8328) and (276.047,78.313)..(262.884,74.8367)
+ ..controls (221.081,63.7959) and (195.092,89.2812)..(220.011,116.878)
+ ..controls (235.529,134.062) and (261.064,142.538)..(275.803,135.397)
+ ..controls (281.653,132.562) and (284.6,132.206)..(285.824,134.184)
+ ..controls (289.847,140.69) and (260.081,144.642)..(245.578,139.528)
+ --cycle;
+draw origin--(480,0)--(480,600)--(0,600) withcolor white;
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/roadincline.mp b/Master/texmf-dist/doc/metapost/featpost/example/roadincline.mp
new file mode 100644
index 00000000000..2532aaceb51
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/roadincline.mp
@@ -0,0 +1,67 @@
+% roadincline.mp
+% L. Nobre G.
+% 2004
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+beginfig(1);
+ numeric u, size, halfs, parcel, bordlarg, bordtotal, backdiaglen, backang;
+ numeric backdown, labelmarg, backauxil, backauyil, angray;
+ path triborder, backtri, angline;
+ picture labelalfa, labelv, labelh, labeld;
+
+ u = 1mm;
+ size = 25u;
+ bordlarg = 3u;
+ bordtotal = 4u;
+ backdiaglen = 55u;
+ backang = 29;
+ backdown = 2u;
+ labelmarg = -1u;
+ angray = 5u;
+
+ parcel = 0.16667*sqrt(3)*size;
+ halfs = 0.5size;
+ z1 = (-halfs,-parcel);
+ z2 = ( halfs,-parcel);
+ z3 = ( 0, 2*parcel );
+ triborder = z1--z2--z3--cycle;
+
+ backauxil = backdiaglen*cosd(backang)*0.5;
+ backauyil = backdiaglen*sind(backang)*0.5;
+ z4 = (-backauxil,-backauyil);
+ z5 = ( backauxil,-backauyil);
+ z6 = ( backauxil, backauyil);
+ backtri = z4--z5--z6--cycle;
+
+ angline = halfcircle scaled 2angray shifted z4 cutafter z4--z6;
+ z7 = z4+(angray,0);
+ z8 = 0.5[z5,z6];
+ z9 = z5-(angray,0);
+ z0 = z6-angray*(cosd(backang),sind(backang));
+
+ labelalfa = thelabel.urt( btex $\alpha$ etex, z7 );
+ labelv = thelabel.lft( btex $v$ etex, z8 );
+ labelh = thelabel.top( btex $h$ etex, z9 );
+ labeld = thelabel.bot( btex $d$ etex, z0 );
+
+ filldraw backtri;
+ draw angline withcolor background;
+ draw labelalfa withcolor background;
+ draw labelv withcolor background;
+ draw labelh withcolor background;
+ draw labeld withcolor background;
+
+ draw triborder withcolor background withpen pencircle scaled bordtotal;
+ draw triborder withcolor red withpen pencircle scaled bordlarg;
+
+ label.top( btex X\% etex rotated backang, labelmarg*up );
+endfig;
+verbatimtex
+\end{document}
+etex
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/rodarolaremplaninc.mp b/Master/texmf-dist/doc/metapost/featpost/example/rodarolaremplaninc.mp
new file mode 100644
index 00000000000..c90b8888695
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/rodarolaremplaninc.mp
@@ -0,0 +1,52 @@
+% rodarolaremplaninc.mp
+% L. Nobre G.
+% 2008
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino,concmath,ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric Anginc;
+ Anginc = 10+uniformdeviate(30);
+ numeric ray; ray = 7mm;
+ pickup pencircle scaled 1pt;
+ numeric dh; dh = ray/sind( Anginc );
+ numeric roll; roll = ray*(270-Anginc)*1.74533/100.0;
+ numeric i, N;
+ N = 10+floor(uniformdeviate(10));
+ z0 = dir(-Anginc);
+ z1 = (-dh,0);
+ z2 = z1+z0*(dh*cosd(Anginc)+roll+ray);
+ z3 = z1+z0*dh*cosd(Anginc);
+ z4 = z0*roll+(ray,0);
+ path circ, arcangi, arca, spoke;
+ spoke = (0.07[origin,z3])--z3;
+ draw spoke;
+ picture roda;
+ circ = fullcircle scaled (2*ray);
+ draw circ;
+ roda = currentpicture;
+ for i = 1 upto N-1:
+ draw spoke rotated ((Anginc-270)*i/N) shifted (z0*i*roll/N) withcolor
+ 0.5white;
+ endfor;
+ draw z1--z2--(-dh, ypart z2)--cycle;
+ draw roda rotated (Anginc-270) shifted (z0*roll);
+ arcangi = halfcircle scaled roll cutbefore (origin--roll*dir(180-Anginc));
+ arca = arcangi shifted z2;
+ z5 = point (0.5*(length arca)) of arca;
+ pickup pencircle scaled 0.7pt;
+ draw arca;
+ label.lft( btex $\alpha$ etex, z5 );
+ label.llft( btex $P_1$ etex, z3 );
+ label.rt( btex $P_2$ etex, z4 );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/rothexagrid.mp b/Master/texmf-dist/doc/metapost/featpost/example/rothexagrid.mp
new file mode 100644
index 00000000000..41ab83d61ae
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/rothexagrid.mp
@@ -0,0 +1,45 @@
+% rothexagrid.mp
+% L. Nobre G.
+% IYP (2005)
+
+vardef locator( expr Indi, Indj ) =
+ ((Indi+0.5*Indj)*5mm,0.5*sqrt(3)*Indj*5mm)
+enddef;
+
+vardef gridmark( expr Loc ) =
+ draw Loc--(Loc+sqrt(3)*down*5mm/3);
+ draw Loc--(Loc+( 0.5,sqrt(3)/6)*5mm);
+ draw Loc--(Loc+(-0.5,sqrt(3)/6)*5mm);
+enddef;
+
+beginfig(1);
+ numeric i, j, fdist;
+ picture tmppic;
+ path clipper;
+ color forec, backc;
+ transform T;
+ fdist = 10cm;
+ forec = (0.8,1,0.8);
+ backc = (0.8,0.8,0.8);
+ z1 = locator( 0, 11 );
+ z2 = locator( 4, 22 );
+ z3 = locator( 19, 11 );
+ z4 = locator( 15, 0 );
+ origin = z1 transformed T;
+ (0,fdist) = z2 transformed T;
+ (fdist,fdist) = z3 transformed T;
+ clipper = (z1--z2--z3--z4--cycle) transformed T ;
+ drawoptions( withpen pencircle scaled 1pt );
+ for i = 0 upto 19:
+ for j = 0 upto 22:
+ gridmark( locator( i, j ) );
+ endfor;
+ endfor;
+ tmppic = currentpicture;
+ currentpicture := nullpicture;
+ fill clipper withcolor backc;
+ draw tmppic transformed T withcolor forec;
+ clip currentpicture to clipper;
+% dotlabels.top( 1,2,3,4 );
+endfig;
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/sap.mp b/Master/texmf-dist/doc/metapost/featpost/example/sap.mp
new file mode 100644
index 00000000000..003abcd59cb
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/sap.mp
@@ -0,0 +1,179 @@
+% sap.mp
+% L. Nobre G.
+% 2002
+
+numeric NumberOfColors, HalfSideLength;
+numeric ThicknesFactor, TolerancFactor;
+NumberOfColors = 7;
+HalfSideLength = 15mm;
+ThicknesFactor = 0.2; % Maximum TraceThickness over Half Side
+ThinnessFactor = 0.1; % Minimum TraceThickness over Half Side
+TolerancFactor = 0.5 + 0.02; % Side Gaps over Thickness
+
+def RandomStep =
+ begingroup
+ numeric margin;
+ margin = ThicknesFactor-ThinnessFactor;
+ ThinnessFactor*HalfSideLength + uniformdeviate( margin*HalfSideLength )
+ endgroup
+enddef;
+
+def PickInteger( expr MaxNum ) =
+ begingroup
+ save aux;
+ numeric aux;
+ aux = ceiling( uniformdeviate( MaxNum ) );
+ if aux = 0:
+ aux := 1;
+ fi;
+ ( aux )
+ endgroup
+enddef;
+
+def PickColor =
+ ( uniformdeviate(1) , uniformdeviate(1), uniformdeviate(1) )
+enddef;
+
+vardef LocateIndex[] =
+ dotlabel.urt( str @, z@ )
+enddef;
+
+def SpreadAllOver =
+ begingroup
+ pair urCorner, ulCorner, llCorner, lrCorner;
+ path FinalCut;
+ urCorner = ( 8.13in, 11.533in );
+ llCorner = ( 0.118in, 35.5bp );
+ ulCorner = ( xpart llCorner, ypart urCorner );
+ lrCorner = ( xpart urCorner, ypart llCorner );
+ FinalCut = urCorner--ulCorner--llCorner--lrCorner--cycle;
+
+ picture Tile[];
+ Tile[1] = currentpicture;
+ Tile[2] = currentpicture rotated 90;
+ Tile[3] = currentpicture rotated 180;
+ Tile[4] = currentpicture rotated 270;
+ currentpicture := nullpicture;
+ numeric i, j, horizo, vertic;
+ horizo = ( xpart urCorner ) + HalfSideLength;
+ vertic = ( ypart urCorner ) + HalfSideLength;
+ for i = 0 step 2HalfSideLength until horizo:
+ for j = 0 step 2HalfSideLength until vertic:
+ draw Tile[PickInteger( 4 )] shifted ( i, j );
+ endfor;
+ endfor;
+ clip currentpicture to FinalCut
+ endgroup
+enddef;
+
+beginfig(1);
+ linecap := butt;
+
+ numeric tracethickness;
+ tracethickness = RandomStep;
+ currentpen := pensquare rotated 45 scaled tracethickness;
+
+ numeric i, currentcoord, maincoords[], numaincoords, toleranc;
+ i = 0;
+ currentcoord = 2TolerancFactor*tracethickness;
+ toleranc = HalfSideLength - currentcoord;
+ forever:
+ i := incr( i );
+ maincoords[i] = currentcoord;
+ currentcoord := currentcoord + 4TolerancFactor*tracethickness;
+ currentcoord := currentcoord +
+ uniformdeviate( ThicknesFactor*HalfSideLength );
+ exitif currentcoord > toleranc;
+ endfor;
+ numaincoords = i;
+
+ numeric j;
+ pair Dir[];
+ for i = 1 upto numaincoords:
+ j := i;
+ z[j] = ( HalfSideLength, maincoords[i] );
+ Dir[j] = left;
+ j := i + numaincoords;
+ z[j] = ( maincoords[i], HalfSideLength );
+ Dir[j] = down;
+ j := i + 2numaincoords;
+ z[j] = ( -maincoords[i], HalfSideLength );
+ Dir[j] = down;
+ j := i + 3numaincoords;
+ z[j] = ( -HalfSideLength, maincoords[i] );
+ Dir[j] = right;
+ j := i + 4numaincoords;
+ z[j] = ( -HalfSideLength, -maincoords[i] );
+ Dir[j] = right;
+ j := i + 5numaincoords;
+ z[j] = ( -maincoords[i], -HalfSideLength );
+ Dir[j] = up;
+ j := i + 6numaincoords;
+ z[j] = ( maincoords[i], -HalfSideLength );
+ Dir[j] = up;
+ j := i + 7numaincoords;
+ z[j] = ( HalfSideLength, -maincoords[i] );
+ Dir[j] = left;
+ endfor;
+
+% for i=1 upto 8numaincoords:
+% LocateIndex[i];
+% endfor;
+
+ boolean Filled[];
+ for i=1 upto 8numaincoords:
+ Filled[i] = false;
+ endfor;
+ numeric Chosen[];
+ for i=0 upto numaincoords-1:
+ Chosen[i] = 0;
+ endfor;
+ color LookUpColor[];
+ for i=1 upto NumberOfColors:
+ LookUpColor[i] = PickColor;
+ endfor;
+
+ numeric ThisInd, ThatInd, ThisCoo, ThatCoo;
+ color ThisColor, ThatColor;
+ path ActualPath;
+ for j=2 step 2 until 8numaincoords:
+
+ forever:
+ ThisInd := PickInteger( 8numaincoords );
+ exitunless Filled[ThisInd];
+ endfor;
+ Filled[ThisInd] := true;
+ ThisCoo := ThisInd mod numaincoords;
+ if Chosen[ThisCoo] = 0:
+ i := PickInteger( NumberOfColors );
+ ThisColor := LookUpColor[i];
+ Chosen[ThisCoo] := i;
+ else:
+ ThisColor := LookUpColor[Chosen[ThisCoo]];
+ fi;
+
+ forever:
+ ThatInd := PickInteger( 8numaincoords );
+ exitunless Filled[ThatInd];
+ endfor;
+ Filled[ThatInd] := true;
+ ThatCoo := ThatInd mod numaincoords;
+ if Chosen[ThatCoo] = 0:
+ i := PickInteger( NumberOfColors );
+ ThatColor := LookUpColor[i];
+ Chosen[ThatCoo] := i;
+ else:
+ ThatColor := LookUpColor[Chosen[ThatCoo]];
+ fi;
+
+ ActualPath := z[ThisInd]{Dir[ThisInd]}
+ ...z[ThatInd]{-Dir[ThatInd]};
+ draw subpath (0,0.6) of ActualPath withcolor ThisColor;
+ draw subpath (0.4,1) of ActualPath withcolor ThatColor;
+
+ endfor;
+
+ SpreadAllOver;
+endfig;
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/sincityredesigned.mp b/Master/texmf-dist/doc/metapost/featpost/example/sincityredesigned.mp
new file mode 100644
index 00000000000..83adbd0f03e
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/sincityredesigned.mp
@@ -0,0 +1,264 @@
+
+prologues := 1;
+
+beginfig(1);
+ linejoin := mitered;
+ numeric controlparam;
+ controlparam = 5mm;
+ path PreeditedPath[];
+ PreeditedPath1 = hide(z1=(304.883,266.453))z1..controls
+ hide(z2=(303.009,265.609))z2 and
+ hide(z3=(297.112,264.877))z3..hide(z4=(291.817,264.83))z4
+ --hide(z5=(282.167,264.745))z5--hide(z6=(280.885,249.372))z6..controls
+ hide(z7=(280.174,240.832))z7 and
+ hide(z8=(279.111,234))z8..hide(z9=(278.494,234))z9
+ ..controls hide(z10=(277.871,234))z10 and
+ hide(z11=(274.31,236.621))z11..hide(z12=(270.381,239.971))z12
+ ..controls hide(z13=(262.387,246.786))z13 and
+ hide(z14=(259.108,247.209))z14..hide(z15=(245.785,243.138))z15
+ ..controls hide(z16=(240.661,241.572))z16 and
+ hide(z17=(234.133,240.4))z17..hide(z18=(231.096,240.5))z18
+ ..controls hide(z19=(221.716,240.809))z19 and
+ hide(z20=(220.916,238.612))z20..hide(z21=(219.534,208.721))z21
+ ..controls hide(z22=(218.847,193.861))z22 and
+ hide(z23=(218.823,178.971))z23..hide(z24=(219.482,175.585))z24
+ ..controls hide(z25=(220.592,169.876))z25 and
+ hide(z26=(221.19,169.381))z26..hide(z27=(227.851,168.665))z27
+ ..controls hide(z28=(235.366,167.856))z28 and
+ hide(z29=(247.664,172.576))z29..hide(z30=(247.664,176.269))z30
+ ..controls hide(z31=(247.664,180.709))z31 and
+ hide(z32=(255.027,204.963))z32..hide(z33=(256.375,204.963))z33
+ ..controls hide(z34=(257.214,204.963))z34 and
+ hide(z35=(262.182,202.207))z35..hide(z36=(267.307,198.899))z36
+ ..controls hide(z37=(280.629,190.298))z37 and
+ hide(z38=(287.926,188.002))z38..hide(z39=(297.368,189.437))z39
+ ..controls hide(z40=(310.542,191.44))z40 and
+ hide(z41=(314.953,195.911))z41..hide(z42=(318.083,210.429))z42
+ ..controls hide(z43=(323.752,236.733))z43 and
+ hide(z44=(324.666,242.082))z44..hide(z45=(325.697,255.009))z45
+ --hide(z46=(326.746,268.161))z46
+ --hide(z47=(317.523,268.075))z47..controls hide(z48=(312.398,268.028))z48
+ and hide(z49=(306.781,267.307))z49..cycle;
+ PreeditedPath2 = hide(z50=(182.759,231.97))z50..controls
+ hide(z51=(174.744,229.708))z51 and
+ hide(z52=(174.156,228.876))z52..hide(z53=(173.193,218.457))z53
+ ..controls hide(z54=(172.721,213.357))z54 and
+ hide(z55=(171.267,202.743))z55..hide(z56=(169.941,194.715))z56
+ ..controls hide(z57=(163.9,158.163))z57 and
+ hide(z58=(164.703,149.053))z58..hide(z59=(173.707,151.991))z59
+ ..controls hide(z60=(176.323,152.845))z60 and
+ hide(z61=(182.588,153.88))z61..hide(z62=(187.542,154.276))z62
+ ..controls hide(z63=(201.233,155.371))z63 and
+ hide(z64=(204.848,159.872))z64..hide(z65=(208.362,180.197))z65
+ ..controls hide(z66=(209.514,186.858))z66 and
+ hide(z67=(211.473,197.07))z67..hide(z68=(212.786,203.255))z68
+ ..controls hide(z69=(219.311,234))z69 and
+ hide(z70=(219.311,234))z70..hide(z71=(201.889,233.805))z71
+ ..controls hide(z72=(194.715,233.725))z72 and
+ hide(z73=(186.02,232.891))z73..cycle;
+ PreeditedPath3 = hide(z74=(127.248,220.173))z74..controls
+ hide(z75=(107.435,213.404))z75 and
+ hide(z76=(79.562,199.048))z76..hide(z77=(74.5039,193.007))z77
+ ..controls hide(z78=(68.4971,185.833))z78 and
+ hide(z79=(61.489,170.106))z79..hide(z80=(61.489,163.8))z80
+ ..controls hide(z81=(61.489,159.558))z81 and
+ hide(z82=(62.5991,158.602))z82..hide(z83=(71.3101,155.345))z83
+ ..controls hide(z84=(76.7759,153.302))z84 and
+ hide(z85=(85.1082,150.878))z85..hide(z86=(90.0984,149.879))z86
+ ..controls hide(z87=(95.0518,148.889))z87 and
+ hide(z88=(99.0657,147.551))z88..hide(z89=(99.0657,146.89))z89
+ ..controls hide(z90=(99.0657,146.226))z90 and
+ hide(z91=(94.2832,143.342))z91..hide(z92=(88.3049,140.401))z92
+ ..controls hide(z93=(76.178,134.435))z93 and
+ hide(z94=(63.4753,131.962))z94..hide(z95=(58.5852,134.617))z95
+ ..controls hide(z96=(56.0232,136.008))z96 and
+ hide(z97=(54.4861,135.947))z97..hide(z98=(52.4363,134.375))z98
+ ..controls hide(z99=(49.1121,131.825))z99 and
+ hide(z100=(51.0422,117.683))z100..hide(z101=(55.3677,112.901))z101
+ ..controls hide(z102=(59.9397,107.845))z102 and
+ hide(z103=(71.7371,105.477))z103..hide(z104=(81.4729,107.659))z104
+ ..controls hide(z105=(100.944,112.023))z105 and
+ hide(z106=(124.681,122.025))z106..hide(z107=(142.791,133.498))z107
+ ..controls hide(z108=(155.26,141.396))z108 and
+ hide(z109=(156.223,142.747))z109..hide(z110=(157.815,154.577))z110
+ ..controls hide(z111=(159.443,166.668))z111 and
+ hide(z112=(156.455,169.328))z112..hide(z113=(135.959,174.038))z113
+ ..controls hide(z114=(126.906,176.118))z114 and
+ hide(z115=(119.187,178.418))z115..hide(z116=(118.724,179.172))z116
+ ..controls hide(z117=(117.77,180.728))z117 and
+ hide(z118=(147.232,198.131))z118..hide(z119=(150.819,198.131))z119
+ ..controls hide(z120=(152.271,198.131))z120 and
+ hide(z121=(154.38,195.911))z121..hide(z122=(155.687,193.007))z122
+ ..controls hide(z123=(156.993,190.104))z123 and
+ hide(z124=(158.437,187.883))z124..hide(z125=(159.018,187.883))z125
+ ..controls hide(z126=(159.582,187.883))z126 and
+ hide(z127=(162.09,191.641))z127..hide(z128=(164.603,196.252))z128
+ ..controls hide(z129=(170.373,206.842))z129 and
+ hide(z130=(170.682,217.263))z130..hide(z131=(165.337,221.03))z131
+ ..controls hide(z132=(159.717,224.992))z132 and
+ hide(z133=(140.058,224.549))z133..cycle;
+ PreeditedPath4 = hide(z134=(373.29,181.905))z134..controls
+ hide(z135=(367.765,173.877))z135 and
+ hide(z136=(363.069,167.387))z136..hide(z137=(362.785,167.387))z137
+ ..controls hide(z138=(361.491,167.387))z138 and
+ hide(z139=(348.78,175.029))z139..hide(z140=(343.826,178.785))z140
+ --hide(z141=(338.361,182.93))z141
+ --hide(z142=(331.529,176.098))z142..controls
+ hide(z143=(327.771,172.34))z143 and
+ hide(z144=(323.39,167.267))z144..hide(z145=(321.793,164.825))z145
+ ..controls hide(z146=(318.889,160.384))z146 and
+ hide(z147=(318.889,160.384))z147..hide(z148=(327.429,151.909))z148
+ ..controls hide(z149=(340.46,138.978))z149 and
+ hide(z150=(341.004,137.325))z150..hide(z151=(336.781,123.49))z151
+ ..controls hide(z152=(334.853,117.171))z152 and
+ hide(z153=(333.626,109.929))z153..hide(z154=(334.091,107.606))z154
+ ..controls hide(z155=(334.924,103.437))z155 and
+ hide(z156=(335.286,103.338))z156..hide(z157=(349.292,103.421))z157
+ ..controls hide(z158=(357.149,103.468))z158 and
+ hide(z159=(363.91,103.854))z159..hide(z160=(364.237,104.275))z160
+ ..controls hide(z161=(364.569,104.701))z161 and
+ hide(z162=(368.408,113.413))z162..hide(z163=(372.856,123.832))z163
+ ..controls hide(z164=(380.732,142.279))z164 and
+ hide(z165=(388.471,155.431))z165..hide(z166=(400.498,170.803))z166
+ ..controls hide(z167=(403.838,175.073))z167 and
+ hide(z168=(406.511,179.628))z168..hide(z169=(406.511,181.051))z169
+ ..controls hide(z170=(406.511,183.073))z170 and
+ hide(z171=(394.042,191.439))z171..hide(z172=(384.307,195.948))z172
+ ..controls hide(z173=(383.74,196.211))z173 and
+ hide(z174=(378.815,189.933))z174..cycle;
+ PreeditedPath5 = hide(z175=(306.591,170.416))z175..controls
+ hide(z176=(284.045,163.442))z176 and
+ hide(z177=(261.654,155.676))z177..hide(z178=(250.226,150.864))z178
+ ..controls hide(z179=(242.882,147.771))z179 and
+ hide(z180=(235.916,145.182))z180..hide(z181=(234.939,145.182))z181
+ ..controls hide(z182=(233.842,145.182))z182 and
+ hide(z183=(232.98,137.496))z183..hide(z184=(232.719,125.369))z184
+ --hide(z185=(232.292,105.556))z185
+ --hide(z186=(238.697,106.666))z186..controls
+ hide(z187=(242.284,107.288))z187 and
+ hide(z188=(246.53,108.19))z188..hide(z189=(248.347,108.716))z189
+ ..controls hide(z190=(251.392,109.597))z190 and
+ hide(z191=(251.532,108.801))z191..hide(z192=(250.615,95.8203))z192
+ ..controls hide(z193=(249.493,79.9358))z193 and
+ hide(z194=(250.483,78.3792))z194..hide(z195=(260.816,79.7881))z195
+ ..controls hide(z196=(270.245,81.074))z196 and
+ hide(z197=(273.79,85.0598))z197..hide(z198=(284.336,106.239))z198
+ ..controls hide(z199=(292.162,121.953))z199 and
+ hide(z200=(293.65,123.879))z200..hide(z201=(301.04,127.846))z201
+ ..controls hide(z202=(308.217,131.699))z202 and
+ hide(z203=(309.449,133.226))z203..hide(z204=(311.715,141.083))z204
+ ..controls hide(z205=(313.144,146.036))z205 and
+ hide(z206=(314.277,151.74))z206..hide(z207=(314.277,153.979))z207
+ ..controls hide(z208=(314.277,156.237))z208 and
+ hide(z209=(314.957,160.384))z209..hide(z210=(315.831,163.458))z210
+ ..controls hide(z211=(317.785,170.333))z211 and
+ hide(z212=(314.448,172.845))z212..cycle;
+ PreeditedPath6 = hide(z213=(200.352,136.887))z213..controls
+ hide(z214=(194.544,135.348))z214 and
+ hide(z215=(189.243,133.54))z215..hide(z216=(188.612,132.885))z216
+ ..controls hide(z217=(187.443,131.669))z217 and
+ hide(z218=(185.57,95.9912))z218..hide(z219=(185.617,75.8364))z219
+ ..controls hide(z220=(185.647,63.0261))z220 and
+ hide(z221=(188.351,57.2344))z221..hide(z222=(193.52,58.9067))z222
+ ..controls hide(z223=(195.607,59.5823))z223 and
+ hide(z224=(199.327,60.5022))z224..hide(z225=(201.889,60.9766))z225
+ ..controls hide(z226=(204.405,61.4424))z226 and
+ hide(z227=(208.467,64.3926))z227..hide(z228=(210.827,67.467))z228
+ ..controls hide(z229=(218.335,77.2478))z229 and
+ hide(z230=(226.481,103.677))z230..hide(z231=(227.989,123.149))z231
+ ..controls hide(z232=(228.823,133.909))z232 and
+ hide(z233=(228.631,134.752))z233..hide(z234=(224.777,137.26))z234
+ ..controls hide(z235=(219.588,140.637))z235 and
+ hide(z236=(214.187,140.554))z236..cycle;
+ PreeditedPath7 = hide(z237=(147.232,125.456))z237..controls
+ hide(z238=(124.174,119.222))z238 and
+ hide(z239=(97.5039,98.374))z239..hide(z240=(88.1265,79.2524))z240
+ --hide(z241=(83.3518,69.5166))z241
+ --hide(z242=(88.6506,59.0977))z242..controls
+ hide(z243=(97.6846,41.3342))z243 and
+ hide(z244=(99.9316,39.4353))z244..hide(z245=(114.267,37.449))z245
+ ..controls hide(z246=(125.814,35.8491))z246 and
+ hide(z247=(128.102,36.0742))z247..hide(z248=(140.741,40.0542))z248
+ ..controls hide(z249=(160.896,46.4009))z249 and
+ hide(z250=(167.846,50.8127))z250..hide(z251=(170.471,58.927))z251
+ ..controls hide(z252=(171.687,62.6846))z252 and
+ hide(z253=(174.603,67.5432))z253..hide(z254=(176.952,69.7241))z254
+ ..controls hide(z255=(181.734,74.165))z255 and
+ hide(z256=(181.908,75.1035))z256..hide(z257=(178.752,79.4233))z257
+ ..controls hide(z258=(176.002,83.186))z258 and
+ hide(z259=(173.877,82.7844))z259..hide(z260=(152.869,74.531))z260
+ ..controls hide(z261=(142.108,70.3037))z261 and
+ hide(z262=(134.704,68.4663))z262..hide(z263=(128.188,68.4065))z263
+ --hide(z264=(118.879,68.321))z264
+ --hide(z265=(123.902,73.616))z265..controls
+ hide(z266=(135.407,85.7429))z266 and
+ hide(z267=(158.517,97.1145))z267..hide(z268=(164.654,93.6689))z268
+ ..controls hide(z269=(168.903,91.2834))z269 and
+ hide(z270=(170.716,93.4292))z270..hide(z271=(173.831,104.531))z271
+ ..controls hide(z272=(178.624,121.612))z272 and
+ hide(z273=(178.563,124.468))z273..hide(z274=(173.365,126.432))z274
+ ..controls hide(z275=(167.23,128.75))z275 and
+ hide(z276=(158.163,128.411))z276..cycle;
+ numeric i, j;
+ for i=1 upto 7:
+ PreeditedPath[7+i] = point 0 of PreeditedPath[i]
+ for j=controlparam step controlparam until arclength PreeditedPath[i]:
+ --point (arctime j of PreeditedPath[i]) of PreeditedPath[i]
+ endfor --cycle;
+ fill PreeditedPath[7+i];
+ endfor;
+ picture sincitytext;
+ sincitytext = currentpicture;
+ currentpicture := nullpicture;
+ bboxmargin := 1cm;
+ fill bbox sincitytext;
+ draw sincitytext withcolor (0.99,0.05,0.05);
+endfig;
+
+beginfig(2);
+ pair shif;
+ shif = (87mm,61.5mm);
+ color madred;
+ madred = (0.99,0.05,0.05);
+ linejoin := mitered;
+ numeric controlparam, devparam, ranparam;
+ controlparam = 0.95mm;
+ devparam = 1mm;
+ ranparam = 1.5mm;
+ pickup pencircle scaled 2mm;
+ numeric i, j, t;
+ pair aux, dev, tdr;
+ for i=1 upto 7:
+ aux := point 0 of PreeditedPath[i];
+ tdr := unitvector( direction 0 of PreeditedPath[i] );
+ dev := normaldeviate*ranparam*(ypart tdr,-xpart tdr);
+ dev := dev+devparam*(ypart tdr,-xpart tdr);
+ PreeditedPath[14+i] = (dev+aux)
+ for j=controlparam step controlparam until arclength PreeditedPath[i]:
+ hide( t := arctime j of PreeditedPath[i];
+ aux := point t of PreeditedPath[i];
+ tdr := unitvector( direction t of PreeditedPath[i] );
+ dev := normaldeviate*ranparam*(ypart tdr,-xpart tdr) ;
+ dev := dev+devparam*(ypart tdr,-xpart tdr) )
+ --(dev+aux)
+ endfor --cycle;
+ endfor;
+ for i=1 upto 3:
+ fill PreeditedPath[14+i] withcolor madred;
+ fill PreeditedPath[i] withcolor black;
+ draw PreeditedPath[i] withcolor madred;
+ endfor;
+ for i=4 upto 7:
+ fill PreeditedPath[14+i] shifted shif withcolor madred;
+ fill PreeditedPath[i] shifted shif withcolor black;
+ draw PreeditedPath[i] shifted shif withcolor madred;
+ endfor;
+ picture sincitytext;
+ sincitytext = currentpicture rotated -14.5;
+ currentpicture := nullpicture;
+ bboxmargin := 1cm;
+ fill bbox sincitytext;
+ draw sincitytext;
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/some2Dvecs.mp b/Master/texmf-dist/doc/metapost/featpost/example/some2Dvecs.mp
new file mode 100644
index 00000000000..138a94293aa
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/some2Dvecs.mp
@@ -0,0 +1,77 @@
+% some2Dvecs.mp
+% L. Nobre G.
+% 2002
+
+verbatimtex
+\documentclass{article}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric hsize, qsize, nsize, ldist;
+ numeric alray, beray, alang, beang;
+ numeric stampnum, initang, i, stepang, stampoffset;
+ pair hvec, qvec, nvec;
+ path Hvec, Qvec, Nvec, alarc, bearc, vertic;
+ picture labelstr, labelpic;
+ color mycolor;
+ picture stamp;
+ bboxmargin := 4mm;
+ stampnum = 36;
+ stampoffset = 0.42mm;
+ alang = 6;
+ beang = 17;
+ hsize = 6mm;
+ qsize = 3*hsize;
+ nsize = 4*hsize;
+ ldist = 3.17*hsize;
+ alray = 2*0.735*nsize;
+ beray = 2*0.6*qsize;
+ mycolor = (0.8,0.7,1);
+% drawoptions( withcolor mycolor );
+ hvec = hsize*left;
+ qvec = qsize*(-sind(beang),cosd(beang));
+ nvec = nsize*(-sind(alang),cosd(alang));
+ Hvec = origin--hvec;
+ Qvec = origin--qvec;
+ Nvec = origin--nvec;
+ vertic = origin--ldist*up;
+ alarc = fullcircle scaled alray
+ cutbefore vertic cutafter Nvec;
+ bearc = fullcircle scaled beray
+ cutbefore vertic cutafter Qvec;
+ drawarrow Hvec;
+ drawarrow Qvec;
+ drawarrow Nvec;
+ draw alarc;
+ draw bearc;
+ draw vertic dashed evenly;
+ draw unitsquare scaled (0.2*hsize);
+ labelstr = btex
+ $2,\!4\times 1,\!8\,\mbox{mm}^2$
+ etex;
+ label.rt( labelstr, ldist*right );
+% label.lft( btex $\vec{n}_0$ etex, nvec );
+ label.lft( btex $x$ etex, nvec );
+ label.lft( btex $\vec{q}$ etex, qvec );
+ label.top( btex $\vec{B}$ etex, hvec );
+ label.urt( btex $-0.48^\circ$ etex, point 1 of alarc );
+ label.lft( btex $6^\circ$ etex, point 1 of bearc );
+ stamp = currentpicture;
+ fill bbox stamp withcolor (0.85,0.85,0);
+ initang = 180/stampnum;
+ stepang = 2*initang;
+ drawoptions();
+ for i=0 upto (stampnum-1):
+ draw stamp
+ shifted (stampoffset*dir(initang+i*stepang))
+ withcolor white;
+ endfor;
+ draw stamp;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/statement.mp b/Master/texmf-dist/doc/metapost/featpost/example/statement.mp
new file mode 100644
index 00000000000..f04781583b4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/statement.mp
@@ -0,0 +1,51 @@
+% statement.mp
+% L. Nobre G.
+% 2007
+
+% prologues := 3;
+
+input boxes;
+
+verbatimtex \documentclass{article}\usepackage{palatino}\begin{document} etex
+
+beginfig(1);
+ picture topl, midd, botl;
+ numeric tl, ml, bl;
+% topl = thelabel(btex \mbox{G E T T ' N ' R E A D Y} etex, origin);
+% midd = thelabel(btex \mbox{4D} etex, origin);
+% botl = thelabel(btex \mbox{c l i m b} etex, origin);
+% defaultfont := "putr8r";
+% defaultfont := "bchr8r";
+ topl = thelabel( "G E T T ' N ' R E A D Y", origin) yscaled 0.3;
+ midd = thelabel( "4D", origin) scaled 1;
+ botl = thelabel( "C L I M B", origin) yscaled 0.6;
+ tl = abs( urcorner topl - ulcorner topl );
+ ml = abs( urcorner midd - ulcorner midd );
+ bl = abs( urcorner botl - ulcorner botl );
+ boxjoin( a.se=b.ne; a.sw=b.nw );
+ boxit.topli(topl);
+ boxit.middl(midd scaled (tl/ml) );
+ boxit.botli(botl xscaled (tl/bl) );
+ drawunboxed( topli, middl, botli );
+endfig;
+
+beginfig(2);
+ picture topl, midd, botl;
+ numeric tl, ml, bl, sc;
+ sc = 10;
+ topl = thelabel( btex o\ n\ e\ \ l\ i\ f\ e etex scaled sc, origin) yscaled 0.3;
+ midd = thelabel( btex {\huge 40} etex scaled sc, origin) scaled 1;
+ botl = thelabel( btex D\ R\ I\ L\ L\ S etex scaled sc, origin) yscaled 0.6;
+ tl = abs( urcorner topl - ulcorner topl );
+ ml = abs( urcorner midd - ulcorner midd );
+ bl = abs( urcorner botl - ulcorner botl );
+ boxjoin( a.se=b.ne; a.sw=b.nw );
+ boxit.topli(topl);
+ boxit.middl(midd scaled (tl/ml) );
+ boxit.botli(botl xscaled (tl/bl) );
+ drawunboxed( topli, middl, botli );
+endfig;
+
+verbatimtex \end{document} etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/statethreelines.mp b/Master/texmf-dist/doc/metapost/featpost/example/statethreelines.mp
new file mode 100644
index 00000000000..c2221d20e35
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/statethreelines.mp
@@ -0,0 +1,21 @@
+input boxes;
+
+beginfig(0);
+ picture topl, midd, botl;
+ numeric tl, ml, bl;
+ defaultfont := "bchbo8r";
+% defaultfont := "putro8r";
+ topl = thelabel( "Eu Vivo", origin) yscaled 1;
+ midd = thelabel( "na", origin) scaled 1;
+ botl = thelabel( "Cauda da Europa", origin) yscaled 1;
+ tl = abs( urcorner topl - ulcorner topl );
+ ml = abs( urcorner midd - ulcorner midd );
+ bl = abs( urcorner botl - ulcorner botl );
+ boxjoin( a.se=b.ne; a.sw=b.nw );
+ boxit.topli(topl);
+ boxit.middl(midd);
+ boxit.botli(botl);
+ drawunboxed( topli, middl, botli );
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/strength1defect.mp b/Master/texmf-dist/doc/metapost/featpost/example/strength1defect.mp
new file mode 100644
index 00000000000..fe0bee08e01
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/strength1defect.mp
@@ -0,0 +1,85 @@
+% strength1defect.mp
+% L. Nobre G.
+% 2002
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+color col[],cyan, magenta, yellow;
+cyan=blue+green; magenta=red+blue;yellow=green+red;
+col[-2]:=col[-1]:=col0:=black;
+col1:=red;
+col2:=(.2,.2,1); %blue
+col3:=(1,.66,0); %orange
+col4:=.85*green;
+col5:=.9*magenta;
+col6:=0.85*cyan;
+col7:=.85*yellow;
+
+beginfig(1);
+ numeric ymax, xmax, i, j, noise, twist, grid, size, u, actsize;
+ numeric extral, yposa, yposb, yposc;
+ pair actpos, direct, one, two;
+ path linea, lineb, linec, linex, liney;
+ color cola, colb, colc, colx;
+ picture pica, picb, picc;
+ u = 0.3mm;
+ xmax = 9;
+ ymax = 9;
+ noise = 1u;
+ extral = 1;
+ size = 5u;
+ yposa = 8;
+ yposb = 5;
+ yposc = 2;
+% cola = (0.78,0.32,0.12);
+% colb = (0.18,0.82,0.12);
+% colc = (0.18,0.22,0.92);
+ colx = (0.78,0.75,0.72);
+ cola = col5;
+ colb = col4;
+ colc = col3;
+ grid = size + 3*noise;
+ linea = (grid*(-xmax-extral,yposa))--(grid*(xmax+extral,yposa));
+ lineb = (grid*(-xmax-extral,yposb))--(grid*(xmax+extral,yposb));
+ linec = (grid*(-xmax-extral,yposc))--(grid*(xmax+extral,yposc));
+ linex = (grid*(-xmax-2*extral,0))--(grid*(xmax+2*extral,0));
+ liney = (grid*(0,-ymax-2*extral))--(grid*(0,ymax+2*extral));
+ pica = thelabel.rt( btex A etex, grid*(xmax+extral,yposa) );
+ picb = thelabel.rt( btex B etex, grid*(xmax+extral,yposb) );
+ picc = thelabel.rt( btex C etex, grid*(xmax+extral,yposc) );
+ draw pica withcolor cola;
+ draw picb withcolor colb;
+ draw picc withcolor colc;
+ label.llft( btex $x$ etex, grid*(xmax+2*extral,0) );
+ label.llft( btex $y$ etex, grid*(0,ymax+2*extral) );
+ pickup pencircle scaled 2u;
+ draw linea withcolor cola;
+ draw lineb withcolor colb;
+ draw linec withcolor colc;
+ pickup pencircle scaled 0.5u;
+ drawarrow linex withcolor colx;
+ drawarrow liney withcolor colx;
+ pickup pencircle scaled u;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=(grid*i+noise*normaldeviate,grid*j+noise*normaldeviate);
+ direct:=unitvector(actpos);
+ actsize:=size/2;
+ one:=actpos-actsize*direct;
+ two:=actpos+actsize*direct;
+ draw one--two;
+ endfor;
+ endfor;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/symbol.mp b/Master/texmf-dist/doc/metapost/featpost/example/symbol.mp
new file mode 100644
index 00000000000..1389b89d1c9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/symbol.mp
@@ -0,0 +1,97 @@
+% symbol.mp
+% G. Morais
+% 2008
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+prologues := 3;
+
+beginfig(1)
+
+ numeric u ; u = 110 ;
+ numeric int ; int = .053u ;
+ numeric ext ; ext = .1u ;
+
+ color mycolor ;
+ mycolor := (.45 , .45 , .45 ) ;
+
+ color intcontorno ;
+ intcontorno := (.23 ,.23 ,.23 ) ;
+
+ color ground ;
+ ground := ( .09 , .19 , .25 ) ;
+
+ color sky ;
+ sky := ( .24 , .30 , .86 ) ;
+
+ path contorno[] ;
+ contorno[1] := (-2,2)*u..(0,-1)*u..(2,3)*u ;
+
+ z0 = point 0 of contorno[1] ;
+ z1 = point 1.8 of contorno[1] ;
+ z2 = point 0.5 of contorno[1] ;
+ z3 = point 2 of contorno[1] ;
+
+ contorno[2] := z0{(1,2)}..z3 ;
+
+ path interior[] ;
+ interior[1] := z1..(1,0)*u..z2 ;
+ z4 = point 1.5 of interior[1] ;
+
+ interior[2] := z4{right}..{right}z3 ;
+ z5 = point 0.4 of interior[2] ;
+
+ interior[3] := z0{(1,2)}..(.5,.35)*u..{(1,2)}z5 ;
+
+ path auxiliar[] ;
+ auxiliar[1] := (2,3)*u .. (0,-1)*u .. (-2,2)*u ;
+
+ auxiliar[2] := interior[2] .. subpath(2,1.8) of contorno[1] ..
+ interior[1] cutafter z4 .. cycle ;
+
+ path ciclo[] ;
+
+ ciclo[1] := interior[1] .. ( contorno[1] cutbefore z2 ) cutafter z1 ..cycle ;
+ ciclo[2] := interior[2] .. subpath(2,1.8) of contorno[1] ..
+ interior[1] cutafter z4 .. cycle ;
+ ciclo[3] := buildcycle ( interior[3] , interior[2] , interior[1] , contorno[1] ) ;
+ ciclo[4] := buildcycle ( interior[3] , interior[2] , contorno[2] ) ;
+
+ fill ciclo[1] withcolor ground ;
+ fill ciclo[2] withcolor .2blue ;
+ fill ciclo[3] withcolor .3red ;
+ fill ciclo[4] withcolor sky ;
+
+ pickup pencircle scaled int ;
+ draw interior[1] withcolor intcontorno ;
+ draw interior[2] withcolor intcontorno ;
+ draw interior[3] withcolor intcontorno ;
+
+ pickup pencircle scaled ext ;
+ draw contorno[1] withcolor mycolor ;
+ draw contorno[2] withcolor mycolor ;
+
+ color letras[] ;
+ letras[1] := ( .59 , .11 , .06 ) ;
+ letras[2] := ( .07 , .02 , .43 ) ;
+ draw btex GNUPOST etex
+ xscaled .112u yscaled .06u
+ shifted ( -2.8u , -1.6u )
+ withcolor letras[1] ;
+ draw btex WE SHARE OUR VISION etex scaled .052u
+ shifted ( -2.75u , -2.05u )
+ withcolor letras[2] ;
+
+% setbounds currentpicture to boundingbox currentpicture enlarged .05u ;
+
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end ; \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/telemira.mp b/Master/texmf-dist/doc/metapost/featpost/example/telemira.mp
new file mode 100644
index 00000000000..9f37b8dc6de
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/telemira.mp
@@ -0,0 +1,22 @@
+pair thecenter;
+thecenter = (105mm,150mm);
+
+vardef instructio( expr rayc ) =
+ draw fullcircle scaled rayc shifted thecenter
+enddef;
+
+beginfig(1);
+ numeric i, u, maxray;
+ u = 1mm;
+ maxray = 85u;
+ for i=30u step 1u until 40u:
+ instructio( i );
+ endfor;
+ for i=153u step 1u until 165u:
+ instructio( i );
+ endfor;
+ for i=0 step 90 until 270:
+ draw thecenter--(thecenter+maxray*dir(i));
+ endfor;
+endfig;
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tete.mp b/Master/texmf-dist/doc/metapost/featpost/example/tete.mp
new file mode 100644
index 00000000000..e669065eb3c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tete.mp
@@ -0,0 +1,24 @@
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ picture embroncordada;
+ embroncordada = thelabel( btex
+ \begin{tabular}{c}
+ \TeX \\
+ \& \\
+ \LaTeX
+ \end{tabular}
+ etex scaled 8, (105mm,150mm) );
+ draw embroncordada;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/theHURD.mp b/Master/texmf-dist/doc/metapost/featpost/example/theHURD.mp
new file mode 100644
index 00000000000..e59e686214c
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/theHURD.mp
@@ -0,0 +1,102 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin_AT_uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2006 Wolfgang Glunz <wglunz34_AT_pstoedit.net>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+% Modified by L. Nobre G's Lex scanner %%%%%%%%%%%
+randomseed := 1010;
+vardef renewcolore =
+ color tmpcolo;
+ tmpcolo = (uniformdeviate(0.8),uniformdeviate(0.8),uniformdeviate(0.8));
+ drawoptions( withcolor tmpcolo );
+enddef;
+defaultscale := 0.16;
+beginfig(1);
+ path PreeditedPath[];
+linecap := butt;
+linejoin := mitered;
+ PreeditedPath1 = hide(z1=(9.82422,68.9492))z1--hide(z2=(9.82422,12.8594))z2--hide(z3=(17.6836,11.7891))z3
+ ..controls hide(z4=(21.9688,11.2031))z4 and hide(z5=(26.6367,10.7148))z5..hide(z6=(27.9531,10.7148))z6
+ ..controls hide(z7=(29.8477,10.7148))z7 and hide(z8=(30.3633,15.4492))z8..hide(z9=(30.3633,32.7773))z9
+ --hide(z10=(30.3633,54.8359))z10--hide(z11=(55.8203,54.6562))z11..controls hide(z12=(69.75,54.5586))z12 and hide(z13=(83.5781,55.125))z13..hide(z14=(86.3633,55.9062))z14
+ --hide(z15=(91.4531,57.3359))z15--hide(z16=(90.2031,38.0469))z16..controls hide(z17=(89.5195,27.5078))z17 and hide(z18=(88.6602,18.2656))z18..hide(z19=(88.3125,17.6836))z19
+ ..controls hide(z20=(86.7109,15.0156))z20 and hide(z21=(91.2773,12.7227))z21..hide(z22=(100.387,11.6172))z22
+ --hide(z23=(110.746,10.3594))z23--hide(z24=(110.477,65.0195))z24--hide(z25=(110.211,119.676))z25
+ --hide(z26=(101.191,122.355))z26..controls hide(z27=(96.1875,123.844))z27 and hide(z28=(91.4531,125.035))z28..hide(z29=(90.5625,125.035))z29
+ ..controls hide(z30=(89.625,125.035))z30 and hide(z31=(89.4766,115.391))z31..hide(z32=(90.2031,101.992))z32
+ --hide(z33=(91.4531,78.9492))z33--hide(z34=(82.7031,77.5547))z34..controls hide(z35=(71.9844,75.8438))z35 and hide(z36=(45.9961,75.8281))z36..hide(z37=(36.9727,77.5273))z37
+ --hide(z38=(30.3633,78.7734))z38--hide(z39=(30.3633,99.1367))z39--hide(z40=(30.3633,119.5))z40
+ --hide(z41=(21.0742,122.266))z41..controls hide(z42=(15.8945,123.812))z42 and hide(z43=(11.3516,125.035))z43..hide(z44=(10.8047,125.035))z44
+ ..controls hide(z45=(10.2617,125.035))z45 and hide(z46=(9.82422,99.8516))z46..cycle;
+% renewcolore;
+ fill PreeditedPath1;
+% dotlabels.rt(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46);
+ PreeditedPath2 = hide(z47=(126.375,82.7031))z47..controls hide(z48=(126.719,59.3008))z48 and hide(z49=(127.871,37.457))z49..hide(z50=(128.941,34.1172))z50
+ ..controls hide(z51=(131.738,25.3555))z51 and hide(z52=(141.648,15.3555))z52..hide(z53=(152.367,10.4766))z53
+ ..controls hide(z54=(159.797,7.09375))z54 and hide(z55=(164.691,6.26562))z55..hide(z56=(176.836,6.32031))z56
+ ..controls hide(z57=(194.344,6.39844))z57 and hide(z58=(204.965,10.4414))z58..hide(z59=(215.602,21.0742))z59
+ ..controls hide(z60=(226.223,31.6953))z60 and hide(z61=(226.871,35.0078))z61..hide(z62=(227.145,80.0234))z62
+ --hide(z63=(227.391,120.57))z63--hide(z64=(220.422,121.91))z64..controls hide(z65=(216.672,122.633))z65 and hide(z66=(211.602,123.664))z66..hide(z67=(209.438,124.145))z67
+ --hide(z68=(205.418,125.035))z68--hide(z69=(205.418,84.668))z69..controls hide(z70=(205.418,37.1523))z70 and hide(z71=(204.617,33.9414))z71..hide(z72=(191.305,28.043))z72
+ ..controls hide(z73=(175.586,21.0781))z73 and hide(z74=(156.254,24.7109))z74..hide(z75=(150.438,35.7227))z75
+ ..controls hide(z76=(148.648,39.1133))z76 and hide(z77=(148.25,49.9258))z77..hide(z78=(148.793,80.6484))z78
+ --hide(z79=(149.508,121.105))z79--hide(z80=(139.684,122.355))z80..controls hide(z81=(134.324,123.039))z81 and hide(z82=(128.926,123.973))z82..hide(z83=(127.805,124.41))z83
+ ..controls hide(z84=(126.285,125.004))z84 and hide(z85=(125.914,114.141))z85..cycle;
+% renewcolore;
+ fill PreeditedPath2;
+% dotlabels.rt(47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85);
+ PreeditedPath3 = hide(z86=(241.305,122.18))z86..controls hide(z87=(243.297,119.777))z87 and hide(z88=(243.898,107.887))z88..hide(z89=(244.18,65.375))z89
+ ..controls hide(z90=(244.375,35.7227))z90 and hide(z91=(244.578,11.0898))z91..hide(z92=(244.625,10.4492))z92
+ ..controls hide(z93=(244.676,9.78906))z93 and hide(z94=(247.039,8.82031))z94..hide(z95=(250.074,8.21484))z95
+ ..controls hide(z96=(253.109,7.60938))z96 and hide(z97=(257.754,6.67969))z97..hide(z98=(260.793,6.07031))z98
+ --hide(z99=(266.152,5))z99--hide(z100=(266.152,26.6133))z100..controls hide(z101=(266.152,38.582))z101 and hide(z102=(266.707,48.2188))z102..hide(z103=(267.402,48.207))z103
+ ..controls hide(z104=(275.438,48.0781))z104 and hide(z105=(299.418,38.2695))z105..hide(z106=(306.164,32.3555))z106
+ ..controls hide(z107=(310.332,28.6953))z107 and hide(z108=(316.168,17.3242))z108..hide(z109=(316.168,12.8594))z109
+ ..controls hide(z110=(316.168,10.3594))z110 and hide(z111=(317.773,8.96484))z111..hide(z112=(321.523,8.21484))z112
+ ..controls hide(z113=(324.418,7.63672))z113 and hide(z114=(329.473,6.64844))z114..hide(z115=(332.512,6.07031))z115
+ --hide(z116=(338.137,5))z116--hide(z117=(337.016,13.2148))z117..controls hide(z118=(335.402,25.0039))z118 and hide(z119=(330.18,34.0078))z119..hide(z120=(319.023,44.2305))z120
+ --hide(z121=(309.199,53.2305))z121--hide(z122=(314.379,55.3711))z122..controls hide(z123=(321.926,58.4883))z123 and hide(z124=(333.449,71.6289))z124..hide(z125=(335.691,79.6641))z125
+ ..controls hide(z126=(339.273,92.5273))z126 and hide(z127=(338.176,101.074))z127..hide(z128=(332.043,108.066))z128
+ ..controls hide(z129=(324.508,116.656))z129 and hide(z130=(312.594,119.887))z130..hide(z131=(288.121,119.969))z131
+ ..controls hide(z132=(277.582,120.004))z132 and hide(z133=(263.32,121.176))z133..hide(z134=(256.684,122.547))z134
+ ..controls hide(z135=(240.07,125.984))z135 and hide(z136=(238.184,125.941))z136..cycle;
+% renewcolore;
+ fill PreeditedPath3;
+% dotlabels.rt(86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136);
+ PreeditedPath4 = hide(z137=(308.305,101.707))z137..controls hide(z138=(316.125,99.1367))z138 and hide(z139=(317.668,93.5977))z139..hide(z140=(313.555,82.8789))z140
+ ..controls hide(z141=(307.645,67.4766))z141 and hide(z142=(288.836,60.0312))z142..hide(z143=(272.762,66.7305))z143
+ --hide(z144=(266.152,69.4844))z144--hide(z145=(266.152,85.3828))z145..controls hide(z146=(266.152,94.1328))z146 and hide(z147=(266.551,101.672))z147..hide(z148=(267.043,102.156))z148
+ ..controls hide(z149=(268.93,104.012))z149 and hide(z150=(302.41,103.648))z150..cycle;
+% renewcolore;
+unfill PreeditedPath4;
+% dotlabels.rt(137,138,139,140,141,142,143,144,145,146,147,148,149,150);
+ PreeditedPath5 = hide(z151=(354.57,65.6445))z151--hide(z152=(354.57,7.14453))z152--hide(z153=(376.898,7.14453))z153
+ ..controls hide(z154=(401.727,7.14453))z154 and hide(z155=(412.688,9.31641))z155..hide(z156=(426.914,17.0547))z156
+ ..controls hide(z157=(438.168,23.1797))z157 and hide(z158=(445.777,31.6133))z158..hide(z159=(451.641,44.4766))z159
+ ..controls hide(z160=(466.125,76.2461))z160 and hide(z161=(444.777,112.316))z161..hide(z162=(406.73,120.355))z162
+ ..controls hide(z163=(399.598,121.859))z163 and hide(z164=(385.117,123.309))z164..hide(z165=(374.219,123.605))z165
+ --hide(z166=(354.57,124.145))z166--cycle;
+% renewcolore;
+fill PreeditedPath5;
+% dotlabels.rt(151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166);
+ PreeditedPath6 = hide(z167=(413.695,95.0625))z167..controls hide(z168=(428.523,87.418))z168 and hide(z169=(436.469,71.9844))z169..hide(z170=(433.215,57.1602))z170
+ ..controls hide(z171=(431.301,48.418))z171 and hide(z172=(419.41,36.4961))z172..hide(z173=(409.23,33.1016))z173
+ ..controls hide(z174=(399.941,30.0078))z174 and hide(z175=(383.602,28.1562))z175..hide(z176=(379.398,29.7227))z176
+ ..controls hide(z177=(377.191,30.5469))z177 and hide(z178=(376.766,36.6172))z178..hide(z179=(376.988,64.3047))z179
+ ..controls hide(z180=(377.137,82.7031))z180 and hide(z181=(377.793,98.4492))z181..hide(z182=(378.445,99.1367))z182
+ ..controls hide(z183=(381.016,101.84))z183 and hide(z184=(406.195,98.9297))z184..cycle;
+% renewcolore;
+unfill PreeditedPath6;
+% dotlabels.rt(167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184);
+
+ endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/thunderproblem.mp b/Master/texmf-dist/doc/metapost/featpost/example/thunderproblem.mp
new file mode 100644
index 00000000000..cd5ec29dbfe
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/thunderproblem.mp
@@ -0,0 +1,37 @@
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric u, dist, desv, rayf, aux;
+ u = 1cm;
+ dist = 2u;
+ desv = 1.5u;
+ rayf = 1.2;
+ ahangle := 30;
+ aux = (rayf-1.0)*u;
+ z1 = (dist,desv);
+ z2 = (dist,-0.5u);
+ z3 = (dist-aux,0.33*desv);
+ z4 = (dist-aux,0.67*desv);
+ drawdblarrow origin--(dist,0);
+ drawarrow subpath (1,2) of fullcircle scaled (rayf*u);
+ drawarrow z3--z4;
+ pickup pencircle scaled 2pt;
+ draw fullcircle scaled u;
+ pickup pencircle scaled 5pt;
+ draw z2--z1 withcolor 0.5white;
+ label.urt(btex $i_2$ etex, (0,0.5*rayf*u) );
+ label.llft(btex $i_1$ etex, z4 );
+ label.top(btex $l$ etex, (0.5*dist,0) );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tiposdetrans.mp b/Master/texmf-dist/doc/metapost/featpost/example/tiposdetrans.mp
new file mode 100644
index 00000000000..c9db83e65a2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tiposdetrans.mp
@@ -0,0 +1,71 @@
+% tiposdetransb.mp
+% L. Nobre G.
+% 2003
+
+input expressg;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ picture pi[];
+ numeric altura, lagura, unid, i, alt, lag, magura;
+ unid = 5mm;
+ altura = 7unid;
+ lagura = 14unid;
+ lag = 5.6unid;
+ smoothrad := 3unid;
+ alt = lag;
+ magura = 0.5*lagura;
+ pi1 = btex \shortstack{{\Huge U}\\ uniforme} etex;
+ pi2 = btex \shortstack{{\Huge H}\\ homog\'enea (0)} etex;
+ pi3 = btex \shortstack{{\Huge B}\\ bandas (1)} etex;
+ pi4 = btex \shortstack{{\Huge D}\\ defeitos} etex;
+ pi5 = btex \shortstack{{\Huge P}\\ paredes} etex;
+ pi6 = btex \shortstack{{\Huge O}\\ outra (2)} etex;
+ z1 = ( -lagura, altura );
+ z2 = ( lagura, altura );
+ z3 = ( -magura, 0 );
+ z4 = ( magura, 0 );
+ z5 = ( 0, -altura );
+ z6 = ( -lagura, -altura );
+ pickup thickpen;
+ drawPREF( 1, lag, alt )( pi1 );
+ drawPREF( 2, lag, alt )( pi2 );
+ drawPREF( 3, lag, alt )( pi3 );
+ drawPREF( 4, lag, alt )( pi4 );
+ drawPREF( 5, lag, alt )( pi5 );
+ drawPREF( 6, lag, alt )( pi6 );
+ z8 = ( xpart z1c, ypart z3c );
+ z9 = ( xpart z2c, ypart z4c );
+ z7 = ( xpart z3c, ypart z2c );
+ z10= ( xpart z3c, ypart z5c );
+ z11= ( xpart z4c, ypart z5c );
+ drawnormalthree( 1bm, 8, 3ml );
+ drawnormalthree( 3tm, 7, 2ml );
+ drawnormalthree( 4mr, 9, 2bm );
+ drawnormalthree( 3bm, 10,5ml );
+ drawnormalthree( 5mr, 11,4bm );
+ smooth( 1bm, 8, 3ml );
+ smooth( 3tm, 7, 2ml );
+ smooth( 4mr, 9, 2bm );
+ smooth( 3bm, 10,5ml );
+ smooth( 5mr, 11,4bm );
+ drawnormalOA( 1mr, 2ml );
+ drawnormalOA( 3mr, 4ml );
+ drawnormalOA( 1bm, 6tm );
+ drawOA( 8, 3ml );
+ drawOA( 7, 2ml );
+ drawOA( 9, 2bm );
+ drawOA( 10,5ml );
+ drawOA( 11,4bm );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tiposdetransb.mp b/Master/texmf-dist/doc/metapost/featpost/example/tiposdetransb.mp
new file mode 100644
index 00000000000..f91f603ac59
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tiposdetransb.mp
@@ -0,0 +1,57 @@
+% tiposdetransb.mp
+% L. Nobre G.
+% 2003
+
+input expressg;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ picture pi[];
+ numeric altura, lagura, unid, i, alt, lag, magura, RaD;
+ unid = 5mm;
+ altura = 7unid;
+ lagura = 14unid;
+ lag = 5.6unid;
+ smoothrad := 3unid;
+ alt = lag;
+ RaD = lag;
+ magura = 0.5*lagura;
+ pi1 = btex \shortstack{{\Huge U}\\ uniforme} etex;
+ pi2 = btex \shortstack{{\Huge H}\\ homog\'enea (0)} etex;
+ pi3 = btex \shortstack{{\Huge B}\\ bandas (1)} etex;
+ pi4 = btex \shortstack{{\Huge D}\\ defeitos} etex;
+ pi5 = btex \shortstack{{\Huge P}\\ paredes} etex;
+ pi6 = btex \shortstack{{\Huge O}\\ outra (2)} etex;
+ z1 = ( -lagura, altura );
+ z2 = ( lagura, altura );
+ z3 = ( -magura, 0 );
+ z4 = ( magura, 0 );
+ z5 = ( 0, -altura );
+ z6 = ( -lagura, -altura );
+ pickup thickpen;
+ drawcirclebox( 1, RaD )( pi1 );
+ drawcirclebox( 2, RaD )( pi2 );
+ drawcirclebox( 3, RaD )( pi3 );
+ drawcirclebox( 4, RaD )( pi4 );
+ drawcirclebox( 5, RaD )( pi5 );
+ drawcirclebox( 6, RaD )( pi6 );
+ drawnormalOA( 1br, 3tl );
+ drawnormalOA( 3tr, 2ml );
+ drawnormalOA( 4tr, 2bl );
+ drawnormalOA( 3br, 5tl );
+ drawnormalOA( 5tr, 4bl );
+ drawnormalOA( 1mr, 2ml );
+ drawnormalOA( 3mr, 4ml );
+ drawnormalOA( 1bm, 6tm );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tiposdetranst.mp b/Master/texmf-dist/doc/metapost/featpost/example/tiposdetranst.mp
new file mode 100644
index 00000000000..d8225a66bb4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/tiposdetranst.mp
@@ -0,0 +1,43 @@
+% tiposdetranst.mp
+% L. Nobre G.
+% 2003
+
+input expressg;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\begin{document}
+etex
+
+beginfig(1);
+ picture pi[];
+ numeric altura, lagura, unid, i, alt, lag, magura, RaD;
+ unid = 5mm;
+ altura = 7unid;
+ lagura = 14unid;
+ lag = 5.6unid;
+ smoothrad := 3unid;
+ alt = lag;
+ RaD = lag;
+ magura = 0.5lagura;
+ pi1 = btex \shortstack{{\Huge U}\\ uniforme} etex;
+ pi2 = btex \shortstack{{\Huge H}\\ homog\'enea} etex;
+ pi3 = btex \shortstack{{\Huge B}\\ bandas} etex;
+ z1 = ( -magura, altura );
+ z2 = ( magura, altura );
+ z3 = ( 0, 0 );
+ pickup thickpen;
+ drawcirclebox( 1, RaD )( pi1 );
+ drawcirclebox( 2, RaD )( pi2 );
+ drawcirclebox( 3, RaD )( pi3 );
+ drawnormalOA( 1br, 3tl );
+ drawnormalOA( 3tr, 2bl );
+ drawnormalOA( 1mr, 2ml );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/trianglecenterofmass.mp b/Master/texmf-dist/doc/metapost/featpost/example/trianglecenterofmass.mp
new file mode 100644
index 00000000000..5074aae8a5b
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/trianglecenterofmass.mp
@@ -0,0 +1,43 @@
+% trianglecenterofmass.mp
+% L. Nobre G.
+% 2010
+
+%
+
+prologues := 1;
+
+beginfig(1);
+ numeric u;
+ u = 1cm;
+ z1 = origin;
+ z2 = (1u,0);
+ z3 = (1+uniformdeviate(4))*dir(5+uniformdeviate(80))*u;
+ draw z1--z2--z3--cycle withpen pencircle scaled 2pt;
+ numeric a, b, c, d;
+ a = (ypart z3)/3;
+ z4 = (0,a);
+ if (xpart z3) < (xpart z2):
+ d = xpart z2;
+ else:
+ d = xpart z3;
+ fi;
+ z5 = (d,a);
+ draw z4--z5 withcolor red;
+ z12 = (xpart z3,0);
+ z23 = whatever[z2,z3];
+ z230 = unitvector((-ypart (z3-z2),xpart (z3-z2)));
+ z23 = whatever[z1,z230];
+ z13 = whatever[z1,z3];
+ z130 = unitvector((ypart (z3-z1),-xpart (z3-z1)));
+ z13 = whatever[z2,z2+z130];
+ b = abs(z23)/3;
+ c = abs(z13-z2)/3;
+ z6 = z2+b*z230;
+ z7 = z3+b*z230;
+ draw z6--z7 withcolor green;
+ z8 = z3+c*z130;
+ z9 = z1+c*z130;
+ draw z8--z9 withcolor blue;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/trigonometry.mp b/Master/texmf-dist/doc/metapost/featpost/example/trigonometry.mp
new file mode 100644
index 00000000000..fb7299ddaaa
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/trigonometry.mp
@@ -0,0 +1,89 @@
+% trigonometry.mp
+% L. Nobre G.
+% 2002
+
+% %input mp-tool;
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino}
+\usepackage{concmath}
+\usepackage{ccfonts}
+\begin{document}
+etex
+
+def PickColor =
+ ( uniformdeviate(1) , uniformdeviate(1), 0 )
+enddef;
+
+beginfig(1);
+ picture sin, cos, tan, ctg, sec, csc;
+ color sincol, coscol, tancol, ctgcol, seccol, csccol;
+ pair sinl, cosl, tanl, ctgl, secl, cscl;
+ path sinp, cosp, tanp, ctgp, secp;
+ numeric Ang, U, len, labelscale;
+ path diag, fram, quar;
+ pair urc, ulc, lrc, tgc, sic, coc, btg;
+ pen basepen, thikpen, thinpen;
+ Ang = 21; % Ang < 45
+ U = 1.8in;
+ labelscale = 2;
+ basepen = pencircle scaled 1.2pt;
+ thikpen = pencircle scaled 3.4pt;
+ thinpen = pencircle scaled 1.2pt;
+ sincol = PickColor;
+ coscol = PickColor;
+ tancol = PickColor;
+ ctgcol = PickColor;
+ seccol = PickColor;
+ csccol = PickColor;
+ len = U * cosd( Ang ) / sind( Ang );
+ urc = ( len, U );
+ ulc = ( 0, U );
+ lrc = ( len, 0 );
+ tgc = ( U, U * sind( Ang ) / cosd( Ang ) );
+ sic = ( U * cosd( Ang ), U * sind( Ang ) );
+ coc = ( U * cosd( Ang ), 0 );
+ btg = ( U, 0 );
+ diag = origin--urc;
+ fram = origin--lrc--urc--ulc--cycle;
+ quar = halfcircle cutafter ( origin--up );
+ quar := quar scaled 2U;
+ draw fram withpen basepen;
+ draw quar withpen basepen;
+ sinl = 0.5[coc,sic];
+ sinp = coc--sic;
+ cosl = 0.5[origin,coc];
+ cosp = origin--coc;
+ tanl = 0.5[btg,tgc];
+ tanp = btg--tgc;
+ ctgl = 0.5[ulc,urc];
+ ctgp = ulc--urc;
+ secl = 0.5[origin,sic];
+ secp = origin--tgc;
+ cscl = 0.5[origin,urc];
+ draw diag withcolor csccol withpen thikpen;
+ draw secp withcolor seccol withpen thinpen;
+ draw ctgp withcolor ctgcol withpen thinpen;
+ draw tanp withcolor tancol withpen thinpen;
+ draw cosp withcolor coscol withpen thinpen;
+ draw sinp withcolor sincol withpen thinpen;
+ sin = thelabel.lft( btex sin etex scaled labelscale, sinl );
+ cos = thelabel.top( btex cos etex scaled labelscale, cosl );
+ tan = thelabel.rt( btex tan etex scaled labelscale, tanl );
+ ctg = thelabel.bot( btex cotan etex scaled labelscale, ctgl );
+ sec = thelabel.top( btex sec etex scaled labelscale, origin );
+ csc = thelabel.top( btex cosec etex scaled labelscale, origin );
+ draw sin withcolor sincol;
+ draw cos withcolor coscol;
+ draw tan withcolor tancol;
+ draw ctg withcolor ctgcol;
+ draw sec rotated Ang shifted secl withcolor seccol;
+ draw csc rotated Ang shifted cscl withcolor csccol;
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/twoplustwo.mp b/Master/texmf-dist/doc/metapost/featpost/example/twoplustwo.mp
new file mode 100644
index 00000000000..0aeb2f916d6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/twoplustwo.mp
@@ -0,0 +1,59 @@
+% twoplustwo.mp
+% L. Nobre G.
+% 2006
+
+def screenpath( expr CentrePoi, Width, Height, CorneRay ) =
+ begingroup
+ pair sp[];
+ sp0 = CentrePoi - 0.5*( Width*right + Height*up ) + CorneRay*down;
+ sp1 = CentrePoi + 0.5*( Width*right - Height*up ) + CorneRay*down;
+ sp2 = CentrePoi + 0.5*( Width*right - Height*up ) + CorneRay*right;
+ sp3 = CentrePoi + 0.5*( Width*right + Height*up ) + CorneRay*right;
+ sp4 = CentrePoi + 0.5*( Width*right + Height*up ) + CorneRay*up;
+ sp5 = CentrePoi - 0.5*( Width*right - Height*up ) + CorneRay*up;
+ sp6 = CentrePoi - 0.5*( Width*right - Height*up ) + CorneRay*left;
+ sp7 = CentrePoi - 0.5*( Width*right + Height*up ) + CorneRay*left;
+ ( sp0---sp1..sp2---sp3..sp4---sp5..sp6---sp7..cycle )
+ endgroup
+enddef;
+
+beginfig(1);
+ numeric u, i, j, k, l;
+ pen stdpen;
+ color bgcol, fgcol;
+ bgcol = 0.7white;
+ fgcol = 0.85*(blue+green);
+ stdpen = pencircle scaled 9pt;
+ u = 5cm;
+ for i=1 upto 5:
+ j := 90-72+i*72;
+ k := i+5;
+ l := k+5;
+ z[i] = u*dir(j);
+ z[k] = u*sind(18)*dir(j);
+ z[l] = u*sind(18)*dir(j+36)/cosd(36);
+ endfor;
+ path inip, inis, init, iniq, scrbord;
+ scrbord = screenpath( origin, 1.7u, 1.1u, 0.7u );
+ inip = z5---z2--z12{unitvector(z8-z2)}..{unitvector(z5-z9)}z14--cycle;
+% inis = ( inip ) rotated 72;
+% init = ( ( ( inip ) shifted -z5 ) yscaled -1 ) shifted z4;
+% iniq = ( ( ( ( inip ) shifted -z2 ) yscaled -1 ) rotated 72 ) shifted z4;
+% draw inip withpen pencircle scaled 3pt;
+% draw inis;
+% draw init;
+% draw iniq;
+ fill inip withcolor fgcol;
+ draw inip withpen stdpen withcolor bgcol;
+ picture unitpic;
+ unitpic = currentpicture;
+ currentpicture := nullpicture;
+ fill scrbord withcolor bgcol;
+ draw ( ( ( ( unitpic ) shifted -z2 ) yscaled -1 ) rotated 72 ) shifted z4;
+ draw unitpic;
+ draw ( ( ( unitpic ) shifted -z5 ) yscaled -1 ) shifted z4;
+ draw ( unitpic ) rotated 72;
+endfig;
+
+end;
+
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ubhtransients.mp b/Master/texmf-dist/doc/metapost/featpost/example/ubhtransients.mp
new file mode 100644
index 00000000000..27d39c5dea4
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ubhtransients.mp
@@ -0,0 +1,139 @@
+% ubhtransients.mp
+% L. Nobre G.
+% 2003
+
+numeric SingleContinuosParameter;
+SingleContinuosParameter = 0.95;
+
+numeric vertn, horin, grids, thex, they, varx, xcomp;
+numeric ymax, xmax, i, j, size, u, ycomp, theta, phi;
+numeric power, xlim, ylim, frax, fray, allang, shift;
+numeric perang, ampper, velang, displamp, hdk;
+numeric velfunc, auxfunc, homang, vpower;
+pair actpos, direct, one, two, displvec;
+path cirma;
+color thedark;
+path VGAborder;
+
+u := 0.5mm;
+size := 1.14u;
+grids := 4u;
+hdk := 0.47;
+
+% This is for the sudden rotation
+%allang := SingleContinuosParameter[0,80];
+%homang := 0;
+
+% This is for the UH evolution
+% allang := 80;
+% homang := SingleContinuosParameter[0,80];
+% ampper := 0;
+% displamp := 0;
+% frax := 1.2;
+% fray := 1.6;
+% velang := 0;
+% power := 1;
+% vpower := 1;
+
+% The next homang parameter when in UBH evolution
+% has two parts:
+% Part1 - SingleContinuosParameter from 0 to 1 [0,45]
+% Part2 - SingleContinuosParameter from 1 to 0 [85,45]
+% homang := SingleContinuosParameter[0,45];
+% allang := 85;
+% ampper := SingleContinuosParameter[0,33];
+% velang := 15;
+% displamp := SingleContinuosParameter[0,5u];
+% frax := 1.2;
+% fray := 2.0;
+% power := 1;
+% vpower := 1;
+
+% This is for the UB evolution
+ allang := 90;
+ homang := 0;
+ ampper := SingleContinuosParameter[0,84];
+ displamp := SingleContinuosParameter[0,9u];
+ frax := 0.8;
+ fray := 1.5;
+ velang := 0;
+ power := 1;
+ vpower := 1;
+
+%power := SingleContinuosParameter[1,0.47];
+%vpower := 1.0/power;
+
+xlim := 115.00;
+ylim := 86.025;
+vertn := 2.0*ylim/grids;
+horin := 2.0*xlim/grids;
+ymax := floor(0.5*(vertn*fray-1));
+xmax := floor(0.5*(horin*frax-1));
+%varx := 450/(0.5*(vertn-1));% in UH and UBH
+varx := 350/(0.5*(vertn-1));% in UB
+
+ VGAborder := (-xlim,-ylim)-- %
+ ( xlim,-ylim)-- %
+ ( xlim, ylim)-- %
+ (-xlim, ylim)--cycle; %
+
+ def mypower( expr base, expo ) =
+ begingroup
+ save aux;
+ numeric aux;
+ if base=0:
+ aux = 1;
+ else:
+ aux = abs(base)/base;
+ fi;
+ ( aux*(abs(base)**expo) )
+ endgroup
+ enddef;
+
+ def produce_vga_border =
+ begingroup
+ draw VGAborder withcolor background withpen pencircle scaled 0;
+ clip currentpicture to VGAborder
+ endgroup
+ enddef;
+
+ beginfig(0);
+ pickup pencircle scaled u;
+ cirma := fullcircle scaled (1.43*grids);
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=(grids*(i,j)) rotated (-allang);
+ thex:=i*varx;
+ they:=j*varx;
+ auxfunc:=dir(velang) dotprod (thex,they);
+ perang :=ampper*mypower(sind(auxfunc),power);
+ theta:=180-allang+perang+homang;
+ direct:=dir(theta);
+ velfunc:=-displamp*mypower(cosd(auxfunc),vpower);
+ displvec:=dir(velang)*velfunc;
+ actpos := actpos+displvec;
+ thedark := (1-hdk*(ypart direct))*white;
+ fill cirma shifted actpos withcolor thedark;
+ endfor;
+ endfor;
+ for i=-xmax upto xmax:
+ for j=-ymax upto ymax:
+ actpos:=(grids*(i,j)) rotated (-allang);
+ thex:=i*varx;
+ they:=j*varx;
+ auxfunc:=dir(velang) dotprod (thex,they);
+ perang :=ampper*mypower(sind(auxfunc),power);
+ theta:=180-allang+perang+homang;
+ direct:=dir(theta);
+ velfunc:=-displamp*mypower(cosd(auxfunc),vpower);
+ displvec:=dir(velang)*velfunc;
+ actpos := actpos+displvec;
+ one:=actpos-size*direct;
+ two:=actpos+size*direct;
+ draw one--two;
+ endfor;
+ endfor;
+ produce_vga_border;
+endfig;
+
+end;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ultraeye.mp b/Master/texmf-dist/doc/metapost/featpost/example/ultraeye.mp
new file mode 100644
index 00000000000..a93847c7736
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ultraeye.mp
@@ -0,0 +1,16 @@
+% ultraeye.mp
+% L. Nobre G.
+% 2007
+
+prologues := 1;
+beginfig(1);
+ LaTeX_unitlength := 14.22636pt; % from the emp LaTeX package
+ w := 15*LaTeX_unitlength;
+ h := 10*LaTeX_unitlength;
+ for i=h step -h/20 until h/20:
+ fill fullcircle scaled i xscaled (w/h) withcolor blue;
+ fill fullcircle scaled i withcolor red;
+ endfor;
+endfig;
+end.
+endinput;
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ultraimprovertex.mp b/Master/texmf-dist/doc/metapost/featpost/example/ultraimprovertex.mp
new file mode 100644
index 00000000000..0c33f09cb57
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/ultraimprovertex.mp
@@ -0,0 +1,26 @@
+% ultraimprovertex.mp
+% L. Nobre G.
+% 2012
+
+input featpost3Dplus2D;
+
+beginfig(1);
+ numeric r, i, ste;
+ r = 0.65;
+ ste = 4;
+ color cc, cl, sc, sl, pdir, inip;
+ cl = (3*r,0,0);
+ cc = (-1.5*r,0,-0.5*r);
+ sl = (0,1.7*r,0);
+ sc = (0,0,0.5*r);
+ rigorousdisc( 0, true, cc, r, cl);
+ spheroid( sc, sl, r );
+ drawoptions( withpen pencircle scaled 3pt );
+ for i=ste step ste until 360:
+ pdir := (-sind(i),cosd(i),0);
+ inip := r*(cosd(i),sind(i),0);
+ draw rp(ultraimprovertex( black, pdir, cc, r, cl, sc, sl, r, inip ));
+ endfor;
+endfig;
+
+end. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/wwfpmp.mp b/Master/texmf-dist/doc/metapost/featpost/example/wwfpmp.mp
new file mode 100644
index 00000000000..cac886fd4e8
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/wwfpmp.mp
@@ -0,0 +1,154 @@
+% Converted from PostScript(TM) to MetaPost by pstoedit
+% MetaPost backend contributed by Scott Pakin <pakin@uiuc.edu>
+% pstoedit is Copyright (C) 1993 - 2003 Wolfgang Glunz <wglunz@pstoedit.net>
+
+% Generate structured PostScript
+prologues := 1;
+
+% Display a given string with its *baseline* at a given location
+% and with a given rotation angle
+vardef showtext(expr origin)(expr angle)(expr string) =
+ draw string infont defaultfont scaled defaultscale
+ rotated angle shifted origin;
+enddef;
+
+% Modified by L. Nobre G's Lex scanner %%%%%%%%%%%
+randomseed := 1010;
+vardef renewcolore =
+ color tmpcolo;
+ tmpcolo = (uniformdeviate(0.8),uniformdeviate(0.8),uniformdeviate(0.8));
+ drawoptions( withcolor tmpcolo );
+enddef;
+defaultscale := 0.16;
+beginfig(1);
+ path PreeditedPath[];
+linecap := butt;
+linejoin := mitered;
+ PreeditedPath1 = hide(z1=(209.192,405.337))z1..controls hide(z2=(193.976,401.343))z2 and hide(z3=(180.8,387.983))z3..hide(z4=(178.3,374.014))z4
+ ..controls hide(z5=(176.925,366.33))z5 and hide(z6=(179.259,357.391))z6..hide(z7=(184.709,349.463))z7
+ ..controls hide(z8=(185.808,347.865))z8 and hide(z9=(186.687,346.288))z9..hide(z10=(186.687,345.915))z10
+ ..controls hide(z11=(186.687,345.544))z11 and hide(z12=(184.513,343.637))z12..hide(z13=(181.828,341.652))z13
+ ..controls hide(z14=(156.708,323.087))z14 and hide(z15=(140.969,300.809))z15..hide(z16=(134.227,274.277))z16
+ ..controls hide(z17=(131.23,262.485))z17 and hide(z18=(130.362,253.818))z18..hide(z19=(130.125,233.359))z19
+ ..controls hide(z20=(129.983,221.147))z20 and hide(z21=(129.563,212.396))z21..hide(z22=(128.852,206.826))z22
+ ..controls hide(z23=(127.635,197.3))z23 and hide(z24=(127.497,188.834))z24..hide(z25=(128.461,182.787))z25
+ ..controls hide(z26=(129.206,178.12))z26 and hide(z27=(131.726,168.007))z27..hide(z28=(133.225,163.671))z28
+ ..controls hide(z29=(135.196,157.97))z29 and hide(z30=(133.11,157.822))z30..hide(z31=(125.95,163.155))z31
+ ..controls hide(z32=(103.858,179.608))z32 and hide(z33=(87.1804,209.064))z33..hide(z34=(82.4009,240.072))z34
+ ..controls hide(z35=(81.376,246.721))z35 and hide(z36=(81.3604,265.495))z36..hide(z37=(82.3743,272.039))z37
+ ..controls hide(z38=(85.2769,290.772))z38 and hide(z39=(92.6594,308.476))z39..hide(z40=(103.623,322.994))z40
+ ..controls hide(z41=(108.759,329.797))z41 and hide(z42=(119.045,339.931))z42..hide(z43=(126.845,345.874))z43
+ ..controls hide(z44=(130.233,348.455))z44 and hide(z45=(132.983,350.779))z45..hide(z46=(132.983,351.062))z46
+ ..controls hide(z47=(132.983,352.33))z47 and hide(z48=(129.85,351.42))z48..hide(z49=(124.735,348.665))z49
+ ..controls hide(z50=(88.8674,329.346))z50 and hide(z51=(66.1748,297.613))z51..hide(z52=(58.7385,256.375))z52
+ ..controls hide(z53=(57.7061,250.65))z53 and hide(z54=(57.3645,245.698))z54..hide(z55=(57.1956,233.998))z55
+ ..controls hide(z56=(56.9331,215.816))z56 and hide(z57=(57.4407,211.238))z57..hide(z58=(61.8733,191.802))z58
+ ..controls hide(z59=(63.4004,185.106))z59 and hide(z60=(63.5593,183.107))z60..hide(z61=(63.6526,169.425))z61
+ ..controls hide(z62=(63.7874,149.669))z62 and hide(z63=(64.5361,144.671))z63..hide(z64=(69.7825,128.507))z64
+ ..controls hide(z65=(82.0679,90.6582))z65 and hide(z66=(95.7263,71.4067))z66..hide(z67=(114.186,65.9214))z67
+ ..controls hide(z68=(127.101,62.0835))z68 and hide(z69=(142.784,62.0671))z69..hide(z70=(150.309,65.8833))z70
+ ..controls hide(z71=(157.396,69.4775))z71 and hide(z72=(157.994,74.8027))z72..hide(z73=(153.107,90.7861))z73
+ ..controls hide(z74=(149.823,101.527))z74 and hide(z75=(148.291,108.503))z75..hide(z76=(147.898,114.506))z76
+ ..controls hide(z77=(147.6,119.045))z77 and hide(z78=(147.695,120.765))z78..hide(z79=(148.263,121.112))z79
+ ..controls hide(z80=(149.597,121.927))z80 and hide(z81=(150.525,120.388))z81..hide(z82=(155.367,109.327))z82
+ ..controls hide(z83=(168.496,79.342))z83 and hide(z84=(173.615,68.8303))z84..hide(z85=(180.494,57.7322))z85
+ ..controls hide(z86=(195.237,33.9487))z86 and hide(z87=(212.187,21.4004))z87..hide(z88=(235.661,16.8931))z88
+ ..controls hide(z89=(244.036,15.2849))z89 and hide(z90=(260.11,15.4221))z90..hide(z91=(266.669,17.1577))z91
+ ..controls hide(z92=(275.747,19.5603))z92 and hide(z93=(280.789,23.1016))z93..hide(z94=(281.655,27.6833))z94
+ ..controls hide(z95=(282.208,30.6094))z95 and hide(z96=(281.006,35.2915))z96..hide(z97=(278.358,40.5339))z97
+ ..controls hide(z98=(274.26,48.6443))z98 and hide(z99=(272.498,54.0881))z99..hide(z100=(269.85,66.8108))z100
+ ..controls hide(z101=(267.725,77.0188))z101 and hide(z102=(267.096,84.4568))z102..hide(z103=(267.408,95.709))z103
+ ..controls hide(z104=(267.868,112.332))z104 and hide(z105=(270.992,122.729))z105..hide(z106=(277.473,129.21))z106
+ ..controls hide(z107=(282.46,134.197))z107 and hide(z108=(287.223,134.241))z108..hide(z109=(291.524,129.338))z109
+ ..controls hide(z110=(298.515,121.37))z110 and hide(z111=(299.705,101.144))z111..hide(z112=(294.629,76.5288))z112
+ ..controls hide(z113=(292.969,68.4731))z113 and hide(z114=(292.615,65.2798))z114..hide(z115=(292.562,57.8601))z115
+ ..controls hide(z116=(292.501,49.293))z116 and hide(z117=(292.578,48.7368))z117..hide(z118=(294.36,44.8816))z118
+ ..controls hide(z119=(297.995,37.0154))z119 and hide(z120=(303.878,33.7029))z120..hide(z121=(314.172,33.7263))z121
+ ..controls hide(z122=(323.351,33.7471))z122 and hide(z123=(333.416,36.9553))z123..hide(z124=(345.052,43.5701))z124
+ ..controls hide(z125=(355.021,49.2373))z125 and hide(z126=(361.587,57.4126))z126..hide(z127=(369.879,74.4829))z127
+ ..controls hide(z128=(382.573,100.614))z128 and hide(z129=(391.848,133.047))z129..hide(z130=(397.011,169.361))z130
+ ..controls hide(z131=(399.774,188.797))z131 and hide(z132=(400.469,200.293))z132..hide(z133=(400,218.846))z133
+ ..controls hide(z134=(399.546,236.875))z134 and hide(z135=(398.304,246.849))z135..hide(z136=(394.996,259.061))z136
+ ..controls hide(z137=(392.594,267.928))z137 and hide(z138=(390.68,267.308))z138..hide(z139=(390.653,257.654))z139
+ ..controls hide(z140=(390.644,254.313))z140 and hide(z141=(390.221,248.703))z141..hide(z142=(389.713,245.187))z142
+ ..controls hide(z143=(384.752,210.854))z143 and hide(z144=(364.418,184.698))z144..hide(z145=(335.781,175.811))z145
+ ..controls hide(z146=(329.771,173.946))z146 and hide(z147=(317.834,171.982))z147..hide(z148=(312.509,171.982))z148
+ ..controls hide(z149=(310.08,171.982))z149 and hide(z150=(307.164,171.594))z150..hide(z151=(306.02,171.119))z151
+ ..controls hide(z152=(304.886,170.648))z152 and hide(z153=(301.777,167.859))z153..hide(z154=(299.179,164.981))z154
+ ..controls hide(z155=(296.581,162.104))z155 and hide(z156=(293.341,159.158))z156..hide(z157=(292.05,158.5))z157
+ ..controls hide(z158=(287.492,156.174))z158 and hide(z159=(280.734,157.216))z159..hide(z160=(272.167,161.566))z160
+ ..controls hide(z161=(266.568,164.409))z161 and hide(z162=(262.001,164.863))z162..hide(z163=(254.457,163.325))z163
+ ..controls hide(z164=(246.785,161.761))z164 and hide(z165=(243.566,161.882))z165..hide(z166=(240.2,163.861))z166
+ ..controls hide(z167=(237.131,165.665))z167 and hide(z168=(233.232,170.832))z168..hide(z169=(230.451,176.777))z169
+ ..controls hide(z170=(227.492,183.105))z170 and hide(z171=(224.6,185.336))z171..hide(z172=(215.649,188.197))z172
+ ..controls hide(z173=(193.43,195.298))z173 and hide(z174=(177.714,211.11))z174..hide(z175=(169.999,234.126))z175
+ ..controls hide(z176=(167.233,242.379))z176 and hide(z177=(166.281,247.808))z177..hide(z178=(165.809,258.038))z178
+ ..controls hide(z179=(165.317,268.691))z179 and hide(z180=(166.114,276.45))z180..hide(z181=(168.842,287.575))z181
+ ..controls hide(z182=(172.354,301.896))z182 and hide(z183=(178.804,316.336))z183..hide(z184=(187.433,329.196))z184
+ ..controls hide(z185=(194.726,340.065))z185 and hide(z186=(193.628,339.248))z186..hide(z187=(198.003,337.06))z187
+ ..controls hide(z188=(205.601,333.261))z188 and hide(z189=(208.425,333.986))z189..hide(z190=(218.334,342.279))z190
+ ..controls hide(z191=(224.603,347.525))z191 and hide(z192=(231.441,351.833))z192..hide(z193=(237.834,354.565))z193
+ ..controls hide(z194=(251.781,360.524))z194 and hide(z195=(253.271,368.324))z195..hide(z196=(244.111,387.44))z196
+ ..controls hide(z197=(236.574,403.168))z197 and hide(z198=(224.501,409.355))z198..cycle;
+ renewcolore;
+ draw PreeditedPath1;
+ dotlabels.rt(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198);
+ PreeditedPath2 = hide(z199=(257.974,155.725))z199..controls hide(z200=(263.28,154.78))z200 and hide(z201=(271.076,153.845))z201..hide(z202=(275.427,153.633))z202
+ ..controls hide(z203=(279.775,153.421))z203 and hide(z204=(283.412,153.05))z204..hide(z205=(283.56,152.802))z205
+ ..controls hide(z206=(284.051,151.985))z206 and hide(z207=(280.606,147.349))z207..hide(z208=(278.368,145.815))z208
+ ..controls hide(z209=(275.629,143.938))z209 and hide(z210=(270.569,142.573))z210..hide(z211=(266.349,142.573))z211
+ ..controls hide(z212=(262.833,142.573))z212 and hide(z213=(255.786,144.135))z213..hide(z214=(253.051,145.52))z214
+ ..controls hide(z215=(248.639,147.754))z215 and hide(z216=(244.228,153.345))z216..hide(z217=(244.228,156.702))z217
+ ..controls hide(z218=(244.228,158.268))z218 and hide(z219=(243.333,158.332))z219..cycle;
+ renewcolore;
+ draw PreeditedPath2;
+ dotlabels.rt(199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219);
+ PreeditedPath3 = hide(z220=(357.135,385.448))z220..controls hide(z221=(345.75,382.778))z221 and hide(z222=(333.16,368.004))z222..hide(z223=(331.428,355.281))z223
+ ..controls hide(z224=(330.516,348.575))z224 and hide(z225=(332.776,345.015))z225..hide(z226=(340.64,340.775))z226
+ ..controls hide(z227=(347.237,337.218))z227 and hide(z228=(352.682,332.712))z228..hide(z229=(360.197,324.593))z229
+ ..controls hide(z230=(364.872,319.542))z230 and hide(z231=(367.186,317.542))z231..hide(z232=(369.283,316.742))z232
+ ..controls hide(z233=(372.885,315.367))z233 and hide(z234=(377.21,315.818))z234..hide(z235=(381.558,318.022))z235
+ ..controls hide(z236=(388.047,321.312))z236 and hide(z237=(396.27,330.475))z237..hide(z238=(400.019,338.594))z238
+ ..controls hide(z239=(401.562,341.935))z239 and hide(z240=(401.765,343.134))z240..hide(z241=(401.793,349.08))z241
+ ..controls hide(z242=(401.821,354.897))z242 and hide(z243=(401.601,356.33))z243..hide(z244=(400.143,359.82))z244
+ ..controls hide(z245=(393.363,376.06))z245 and hide(z246=(379.602,386.294))z246..hide(z247=(364.807,386.101))z247
+ ..controls hide(z248=(361.93,386.063))z248 and hide(z249=(358.521,385.773))z249..cycle;
+ renewcolore;
+ draw PreeditedPath3;
+ dotlabels.rt(220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249);
+ PreeditedPath4 = hide(z250=(230.29,279.386))z250..controls hide(z251=(220.653,277.409))z251 and hide(z252=(210.078,268.587))z252..hide(z253=(204.855,258.165))z253
+ ..controls hide(z254=(201.592,251.655))z254 and hide(z255=(200.56,246.913))z255..hide(z256=(200.918,240.072))z256
+ ..controls hide(z257=(201.417,230.546))z257 and hide(z258=(205.557,222.672))z258..hide(z259=(212.069,218.865))z259
+ ..controls hide(z260=(214.237,217.598))z260 and hide(z261=(216.097,217.11))z261..hide(z262=(219.613,216.886))z262
+ ..controls hide(z263=(228.86,216.297))z263 and hide(z264=(233.455,219.421))z264..hide(z265=(244.122,233.551))z265
+ ..controls hide(z266=(247.646,238.218))z266 and hide(z267=(251.522,242.976))z267..hide(z268=(252.795,244.196))z268
+ ..controls hide(z269=(254.993,246.303))z269 and hide(z270=(255.096,246.593))z270..hide(z271=(255.096,250.685))z271
+ ..controls hide(z272=(255.096,255.736))z272 and hide(z273=(253.262,263.325))z273..hide(z274=(250.847,268.267))z274
+ ..controls hide(z275=(246.692,276.77))z275 and hide(z276=(238.676,281.105))z276..cycle;
+ renewcolore;
+ draw PreeditedPath4;
+ dotlabels.rt(250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276);
+ PreeditedPath5 = hide(z277=(315.706,267.3))z277..controls hide(z278=(310.07,265.498))z278 and hide(z279=(305.137,260.211))z279..hide(z280=(300.623,251.133))z280
+ ..controls hide(z281=(296.045,241.926))z281 and hide(z282=(295.968,241.259))z282..hide(z283=(298.965,236.748))z283
+ ..controls hide(z284=(300.304,234.73))z284 and hide(z285=(302.736,229.906))z285..hide(z286=(304.412,225.943))z286
+ ..controls hide(z287=(310.819,210.79))z287 and hide(z288=(314.433,205.338))z288..hide(z289=(319.926,202.542))z289
+ ..controls hide(z290=(325.542,199.684))z290 and hide(z291=(335.821,202.351))z291..hide(z292=(341.611,208.169))z292
+ ..controls hide(z293=(350.474,217.073))z293 and hide(z294=(351.424,236.3))z294..hide(z295=(343.725,250.941))z295
+ ..controls hide(z296=(337.909,262.001))z296 and hide(z297=(324.189,270.012))z297..cycle;
+ renewcolore;
+ draw PreeditedPath5;
+ dotlabels.rt(277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297);
+ PreeditedPath6 = hide(z298=(251.708,195.581))z298..controls hide(z299=(245.954,194.662))z299 and hide(z300=(242.601,191.25))z300..hide(z301=(243.409,187.135))z301
+ ..controls hide(z302=(243.88,184.73))z302 and hide(z303=(245.89,183.255))z303..hide(z304=(251.516,181.182))z304
+ ..controls hide(z305=(256.887,179.204))z305 and hide(z306=(261.102,176.061))z306..hide(z307=(263.429,172.302))z307
+ ..controls hide(z308=(264.181,171.087))z308 and hide(z309=(265.18,170.064))z309..hide(z310=(265.614,170.064))z310
+ ..controls hide(z311=(266.044,170.064))z311 and hide(z312=(267.564,170.977))z312..hide(z313=(268.906,172.042))z313
+ ..controls hide(z314=(272.56,174.94))z314 and hide(z315=(275.427,176.235))z315..hide(z316=(280.031,177.066))z316
+ ..controls hide(z317=(285.146,177.99))z317 and hide(z318=(288.846,179.502))z318..hide(z319=(289.653,180.997))z319
+ ..controls hide(z320=(291.597,184.6))z320 and hide(z321=(289.237,189.242))z321..hide(z322=(284.314,191.499))z322
+ ..controls hide(z323=(278.305,194.254))z323 and hide(z324=(258.741,196.703))z324..cycle;
+ renewcolore;
+ draw PreeditedPath6;
+ dotlabels.rt(298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324);
+endfig;
+end
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/xcmplaca2buraquads.mp b/Master/texmf-dist/doc/metapost/featpost/example/xcmplaca2buraquads.mp
new file mode 100644
index 00000000000..45b31f78dec
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/xcmplaca2buraquads.mp
@@ -0,0 +1,69 @@
+% xcmplaca2buraquads.mp
+% L. Nobre G.
+% 2008
+
+verbatimtex
+\documentclass{article}
+\usepackage{palatino,concmath,ccfonts}
+\begin{document}
+etex
+
+beginfig(1);
+ numeric fy, tf, fl, tk, fu, fd;
+ fy = 0.25+uniformdeviate( 0.35 );
+ tf = 0.4*fy/sqrt(2.0);
+ fl = 0.3*tf+uniformdeviate( 0.7*tf );
+ tk = fl/sqrt(2.0);
+ fu = tk+uniformdeviate( 0.24-tk );
+ fd = 0.26+uniformdeviate( 0.24-tk );
+ numeric u,h,w;
+ u = 5mm;
+ w = 10u;
+ h = 11*u*fy;
+ drawarrow origin--(0,h);
+ drawarrow origin--(w,0);
+ label.lft( btex $y$ etex, (0,h) );
+ label.bot( btex $x$ etex, (w,0) );
+ numeric marg, tl;
+ tl = 0.05*h;
+ marg = 0.1*w;
+ numeric xzero, yzero, xum, xdois, yum, ydois, lado, ang;
+ xzero = w-marg;
+ yzero = h-marg;
+ xum = fu * xzero;
+ xdois = fd * xzero;
+ yum = 0.7 * yzero;
+ ydois = 0.3 * yzero;
+ lado = fl * xzero;
+ ang = 10+uniformdeviate( 26 );
+ path placa, quadrad, quadrum, quadois;
+ placa = origin--(xzero,0)--(xzero,yzero)--(0,yzero)--cycle;
+ fill placa withcolor 0.5white;
+ draw placa;
+ quadrad = (origin--(lado,0)--(lado,lado)--(0,lado)--cycle)
+ shifted (-0.5*lado*(1,1)) rotated ang;
+ quadrum = quadrad shifted (xum,yum);
+ quadois = quadrad shifted (xdois,ydois);
+ unfill quadrum;
+ draw quadrum;
+ unfill quadois;
+ draw quadois;
+ z1 = (xum,0);
+ z2 = (xdois,0);
+ z3 = (xzero,0);
+ z4 = (0,yzero);
+ draw z1--(z1+tl*up);
+ draw z2--(z2+tl*up);
+ draw z3--(z3+tl*up);
+ draw z4--(z4+tl*right);
+ label.lft( btex $y_0$ etex, z4 );
+ label.bot( btex $x_1$ etex, z1 );
+ label.bot( btex $x_2$ etex, z2 );
+ label.bot( btex $x_0$ etex, z3 );
+endfig;
+
+verbatimtex
+\end{document}
+etex
+
+end.