diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-03 16:47:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-03 16:47:39 +0000 |
commit | 97e4684a37e4899e8cdd42ab670b6e25dd319d1a (patch) | |
tree | bc263a56d75c177b79ae13c6e6ec7a3c30278dbf /Master/texmf-dist/doc/metapost/featpost/example | |
parent | a2c8654f8955a0d35c8b0c2d1752a506a426681b (diff) |
featpost (17nov11)
git-svn-id: svn://tug.org/texlive/trunk@24738 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/acmaglev.mp | 38 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/ahoraesglobal.mp | 277 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/aledlogo.mp | 183 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/anglinerigorouscircle.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp) | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/antimattermeteor.mp | 64 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.log | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp | 78 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp~ | 78 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/brownellips.mp | 128 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/bstr.mp | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/bughunt.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cartaxes.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp) | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/closingbox.mp | 59 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cmykropes.mp | 287 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cone.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/conegetready.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/conicurv.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp) | 15 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/crossingline.mp | 112 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cubicfacecentered.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cubicfigures.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cubicstructurefcc.mp | 64 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cubicstructures.mp | 410 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/cylimple.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/daliasensor.mp | 70 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/deperspective.mp | 94 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/doitnow.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/downloadicon.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/eemcsblabla.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp) | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/electricpotential.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp) | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/ellipticprism.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/embroncordada.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/emptylines.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/experimental.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fakehole.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fallinthewind.mp | 102 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/featpostlogo.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/ffcbob.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fieldlines.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnorma.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaper.mp | 183 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaperwork.mp | 134 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fis1prex.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp) | 69 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fis3prex.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/fis3prey.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp) | 46 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/frustum.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/galvanometro-inducao.mp | 245 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/gausslawframe.mp | 145 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/geombasic.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/geomcasq.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/geometricaverage.mp | 57 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/geomfiguei.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/geomfreder.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/geommine.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/globe.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/gnupost3Dlogo.mp | 125 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/graphene.mp | 78 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/graphexample.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp) | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/halfcirclesfear.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/hermitespliknot.mp | 117 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/hexagonaltrimesh.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/hiddenlinegraph.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/hiddensurface.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/hiddensurfaces.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/inductionbob.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/integerbars.mp | 58 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/integratorfigures.mp | 112 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/intersection2D.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp) | 0 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/kindofcube.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/kindofcuber.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/labelconstruct.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/labelinspace.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp) | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/lasermachine.mp | 27 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/lcurvature.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/magneticflux.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/mainmemtest.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp) | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/matricskoc.mp | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/metalcharge.mp | 98 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/mptoolcone.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp) | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/mpxerr.tex | 31 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/mypatent.mp | 319 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/mypatentpieces.mp | 634 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/mysquaresectionbar.mp | 33 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nembends.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nembiaxi.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nemdirector.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nemquira.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nemquirapitch.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nemsaddl.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nemuniax.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/newexperimental.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp) | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nsmetica.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/nurbstobeziern.mp | 205 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/optica.mp | 206 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/par3Dplotexamples.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/parafuso.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp) | 42 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/parafusoprojxy.mp | 64 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/pathernon.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/pathofstraightline.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/perspec.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp) | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/photorefer.mp | 198 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/photoreverse.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planescava.mp | 63 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planintersection.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpau.mp | 233 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpht.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planphtnonrec.mp | 108 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpln0.mp | 165 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpln1.mp | 344 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpln2.mp | 278 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpln3.mp | 327 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpln4.mp | 313 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/planpln5.mp | 48 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/polyhedr.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/positivecharge.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/quartertorus.mp | 36 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/redplanet.mp | 137 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/resistcircuit.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/revolipsoid.mp | 50 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp | 160 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp~ (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp) | 24 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rigorcubo.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rigorouscircle.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rigorouscone.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rigorousdiscSD.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rigorousdiscoptions.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rigorousfearpath.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rmnbob.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp) | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rotatnlc.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/rungekuttasecond.mp | 103 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/sal.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/saturn.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp) | 41 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/sfearschem.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/sharpraytrace.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp) | 33 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/signalvertexSD.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/simplecar.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/simplecarparam.mp | 70 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/simplexperiment.mp | 72 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/slingshot.mp | 87 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/smC.mp | 153 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/spatialhalfsfear.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp) | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/spherample.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/splineperspective.mp | 550 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/spltwiben.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/squareanglines.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/stageforthree.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp | 56 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/steamcamera.mp | 58 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tangency2D.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tangencypoint.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tdarrow.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tetrapodes.mp | 140 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/thearchicon.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/thethreekindsofperspec.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/torus.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/trajectoryline.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/triangulartrimesh.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/troncoconedef.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tropicalglobe.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/troysfear.mp | 77 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tshirtfig.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/tuftescatter.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp) | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/twistflat.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/twistnlc.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/twocyclestogether.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/twoholes.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/twoupcones.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/unperfection.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/unperfectionremoved.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/vanallenbelt.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/verygoodcone.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp) | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/xraycamera.mp (renamed from Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp) | 2 |
175 files changed, 9141 insertions, 212 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/acmaglev.mp b/Master/texmf-dist/doc/metapost/featpost/example/acmaglev.mp new file mode 100644 index 00000000000..37cad98514f --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/acmaglev.mp @@ -0,0 +1,38 @@ +% acmaglev.mp +% L. Nobre G. +% IYP (2005) + +input featpost3Dplus2D; + +Spread := 25; +f := (0,-2,0); +ParallelProj := true; +ShiftV := ( 0, 1 ); + +def vecfunc( expr posit )= + begingroup + save a, c, field; + color field; + numeric a, c; + a = (sind(X(posit))-Z(posit)*0.95)/40; + c = -Y( posit ) ; + field = ( 1, c, a ); + ( field ) + endgroup +enddef; + +beginfig(1); + numeric i, tot; + path dephased, sinusoid, zeroaxis; + transform T; + tot = 900; + T = identity yscaled 2 xscaled 1/36 shifted (0,Shifts); + zeroaxis = rp( black )--rp( (tot,0,0) ); + draw zeroaxis transformed T withcolor green; + sinusoid = rp( black ) for i=1 upto tot: ...rp( (i,0,sind(i)) ) endfor; + draw sinusoid transformed T; + dephased = fieldlinepath(tot,(0,0,1),1,vecfunc); + draw dephased transformed T withcolor red; +endfig; + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/ahoraesglobal.mp b/Master/texmf-dist/doc/metapost/featpost/example/ahoraesglobal.mp new file mode 100644 index 00000000000..52f684050d7 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/ahoraesglobal.mp @@ -0,0 +1,277 @@ +% 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> + +input featpost3Dplus2D; + +% 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; + +numeric sray; +sray = 1; + +def converterfunc( expr Pair ) = + begingroup + save xc, yc, xa, ya; + numeric xc, yc, xa, ya; + xc = xpart Pair; + yc = ypart Pair; + xa = 0.35*(xc-140); + ya = 0.35*(yc-665); + ( rp( sray*( cosd(ya)*cosd(xa), cosd(ya)*sind(xa), sind(ya) ) ) ) + endgroup +enddef; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of first featpost part + + +f := 2.5*(4,-0.5,-0.75); +beginfig(1); + path PreeditedPath[]; +linecap := butt; +linejoin := mitered; + PreeditedPath1 = hide(z1=(43,727.591))z1--hide(z2=(42.4417,719.122))z2..controls hide(z3=(48.9175,719.421))z3 and hide(z4=(48.9175,719))z4..hide(z5=(50.2126,719))z5 + ..controls hide(z6=(50.7107,719))z6 and hide(z7=(53.2014,719.041))z7..hide(z8=(57.5852,719.122))z8 + --hide(z9=(57.5852,722))z9--hide(z10=(53.6997,722.311))z10..controls hide(z11=(51.3086,722.41))z11 and hide(z12=(50.9998,723.207))z12..hide(z13=(50.9998,728.089))z13 + --hide(z14=(50.9998,746.321))z14..controls hide(z15=(50.9998,760.867))z15 and hide(z16=(46.7913,766))z16..hide(z17=(35.1685,766))z17 + ..controls hide(z18=(30.8843,766))z18 and hide(z19=(26.8992,764.952))z19..hide(z20=(23.1133,762.76))z20 + --hide(z21=(17.9851,759.572))z21--hide(z22=(17.9851,753.096))z22--hide(z23=(20.4233,752.398))z23 + --hide(z24=(21.7185,755.487))z24..controls hide(z25=(23.8108,760.17))z25 and hide(z26=(24.8071,761))z26..hide(z27=(29.3901,761))z27 + ..controls hide(z28=(38.7554,761))z28 and hide(z29=(42.6409,757.275))z29..hide(z30=(42.9397,748.114))z30 + --hide(z31=(43.0007,744.926))z31--hide(z32=(43.0002,731.775))z32..controls hide(z33=(40.0977,727.69))z33 and hide(z34=(33.792,723.804))z34..hide(z35=(29.8887,723.804))z35 + ..controls hide(z36=(25.9036,723.804))z36 and hide(z37=(22.0002,727.537))z37..hide(z38=(22.0002,731.875))z38 + ..controls hide(z39=(22.0002,735.561))z39 and hide(z40=(24.1594,739.048))z40..hide(z41=(27.3982,740.941))z41 + ..controls hide(z42=(29.8984,742.436))z42 and hide(z43=(35.3994,743.83))z43..hide(z44=(43.0007,744.926))z44 + --hide(z45=(42.9397,748.114))z45--hide(z46=(33.0764,746.321))z46..controls hide(z47=(19.5269,743.83))z47 and hide(z48=(14,739.148))z48..hide(z49=(14,730.48))z49 + ..controls hide(z50=(14,722.709))z50 and hide(z51=(18.6257,717.804))z51..hide(z52=(26.4014,717.804))z52 + ..controls hide(z53=(28.1948,717.804))z53 and hide(z54=(29.8884,718.261))z54..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); + PreeditedPath2 = hide(z55=(61.1724,785.277))z55--hide(z56=(66.7517,785.277))z56..controls hide(z57=(68.5452,785.277))z57 and hide(z58=(69.0005,784.181))z58..hide(z59=(69.0005,781.192))z59 + --hide(z60=(69.0005,729.583))z60..controls hide(z61=(69.0005,723.307))z61 and hide(z62=(68.7212,722.609))z62..hide(z63=(65.5564,722.41))z63 + --hide(z64=(61.073,722.111))z64--hide(z65=(61.073,719.122))z65..controls hide(z66=(67.8479,719.321))z66 and hide(z67=(70.5378,719))z67..hide(z68=(73.427,719))z68 + ..controls hide(z69=(76.3162,719))z69 and hide(z70=(79.0061,719.041))z70..hide(z71=(85.781,719.122))z71 + --hide(z72=(85.781,722.111))z72--hide(z73=(81.2976,722.41))z73..controls hide(z74=(77.9102,722.609))z74 and hide(z75=(77,723.307))z75..hide(z76=(77,729.583))z76 + --hide(z77=(77,750.705))z77..controls hide(z78=(77,755.188))z78 and hide(z79=(83.8933,760))z79..hide(z80=(90.2644,760))z80 + ..controls hide(z81=(96.9397,760))z81 and hide(z82=(102,755.046))z82..hide(z83=(102,747.417))z83 + --hide(z84=(102,719.122))z84..controls hide(z85=(107.555,719.421))z85 and hide(z86=(107.646,719))z86..hide(z87=(109.194,719))z87 + ..controls hide(z88=(110.589,719))z88 and hide(z89=(110.589,719.299))z89..hide(z90=(117.463,719))z90 + --hide(z91=(117.463,722.111))z91--hide(z92=(113.379,722.41))z92..controls hide(z93=(109.991,722.609))z93 and hide(z94=(110,723.207))z94..hide(z95=(110,729.583))z95 + --hide(z96=(110,748.812))z96..controls hide(z97=(110,760.469))z97 and hide(z98=(104.419,766))z98..hide(z99=(93.0542,766))z99 + ..controls hide(z100=(89.3679,766))z100 and hide(z101=(87.2756,765.344))z101..hide(z102=(85.1833,763.657))z102 + --hide(z103=(77.0002,757.081))z103--hide(z104=(77.0002,790.955))z104--hide(z105=(76.7148,791.752))z105 + ..controls hide(z106=(72.3311,790.059))z106 and hide(z107=(69.0432,789.262))z107..cycle; + %renewcolore; + %draw PreeditedPath2; + %dotlabels.rt(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); + PreeditedPath3 = hide(z108=(146.256,766))z108--hide(z109=(144.463,763))z109..controls hide(z110=(153.629,763))z110 and hide(z111=(161,752.978))z111..hide(z112=(161,739.347))z112 + ..controls hide(z113=(161,727.889))z113 and hide(z114=(155.688,720.007))z114..hide(z115=(147.252,720.007))z115 + ..controls hide(z116=(137.489,720.007))z116 and hide(z117=(131,729.858))z117..hide(z118=(131,744.428))z118 + ..controls hide(z119=(131,756.383))z119 and hide(z120=(135.751,763))z120..hide(z121=(144.463,763))z121 + --hide(z122=(144.463,763))z122--hide(z123=(146.256,766))z123..controls hide(z124=(131.71,766))z124 and hide(z125=(122,755.798))z125..hide(z126=(122,741.04))z126 + ..controls hide(z127=(122,726.993))z127 and hide(z128=(130.723,717.007))z128..hide(z129=(143.367,717.007))z129 + ..controls hide(z130=(158.71,717.007))z130 and hide(z131=(170,727.843))z131..hide(z132=(170,743.033))z132 + ..controls hide(z133=(170,756.483))z133 and hide(z134=(160.098,766))z134..cycle; + %renewcolore; + %draw PreeditedPath3; + %dotlabels.rt(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); + PreeditedPath4 = hide(z135=(175.149,759.273))z135--hide(z136=(178.836,759.273))z136..controls hide(z137=(182.821,759.273))z137 and hide(z138=(183,758.576))z138..hide(z139=(183,752))z139 + --hide(z140=(183,729.583))z140..controls hide(z141=(183,723.307))z141 and hide(z142=(182.719,722.609))z142..hide(z143=(179.533,722.41))z143 + --hide(z144=(174.95,722.111))z144--hide(z145=(174.95,719.122))z145..controls hide(z146=(182.123,719.321))z146 and hide(z147=(184.714,719))z147..hide(z148=(187.204,719))z148 + ..controls hide(z149=(189.197,719))z149 and hide(z150=(189.197,719.298))z150..hide(z151=(201.451,719))z151 + --hide(z152=(201.451,722))z152--hide(z153=(196.271,722.41))z153..controls hide(z154=(191.787,722.709))z154 and hide(z155=(191,723.008))z155..hide(z156=(191,729.583))z156 + --hide(z157=(191,746.719))z157..controls hide(z158=(191,752.697))z158 and hide(z159=(195.249,758))z159..hide(z160=(200.455,758))z160 + ..controls hide(z161=(203.444,758))z161 and hide(z162=(205.536,756.508))z162..hide(z163=(207.13,753.096))z163 + --hide(z164=(209.223,753.096))z164--hide(z165=(210.119,765.051))z165..controls hide(z166=(209.023,765.749))z166 and hide(z167=(207.23,766))z167..hide(z168=(205.437,766))z168 + ..controls hide(z169=(202.448,766))z169 and hide(z170=(199.259,764.463))z170..hide(z171=(197.167,762.062))z171 + --hide(z172=(190.999,755.487))z172--hide(z173=(190.999,765.749))z173--hide(z174=(190.691,766.147))z174 + ..controls hide(z175=(185.61,764.055))z175 and hide(z176=(180.429,762.66))z176..cycle; + %renewcolore; + %draw PreeditedPath4; + %dotlabels.rt(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); + PreeditedPath5 = hide(z177=(244,727.591))z177--hide(z178=(243.994,719.122))z178..controls hide(z179=(250.47,719.421))z179 and hide(z180=(250.47,719))z180..hide(z181=(251.765,719))z181 + ..controls hide(z182=(252.263,719))z182 and hide(z183=(254.754,719.041))z183..hide(z184=(259.138,719.122))z184 + --hide(z185=(259.138,722))z185--hide(z186=(255.252,722.311))z186..controls hide(z187=(252.861,722.41))z187 and hide(z188=(252,723.207))z188..hide(z189=(252,728.089))z189 + --hide(z190=(252,746.321))z190..controls hide(z191=(252,760.867))z191 and hide(z192=(247.938,766))z192..hide(z193=(236.721,766))z193 + ..controls hide(z194=(232.437,766))z194 and hide(z195=(228.452,764.952))z195..hide(z196=(224.666,762.76))z196 + --hide(z197=(219.985,759.572))z197--hide(z198=(219.985,753.096))z198--hide(z199=(221.976,752.398))z199 + --hide(z200=(223.271,755.487))z200..controls hide(z201=(225.363,760.17))z201 and hide(z202=(226.36,761))z202..hide(z203=(230.943,761))z203 + ..controls hide(z204=(240.308,761))z204 and hide(z205=(244.193,757.275))z205..hide(z206=(244.492,748.114))z206 + --hide(z207=(244.001,744.926))z207--hide(z208=(244,731.775))z208..controls hide(z209=(241.22,727.69))z209 and hide(z210=(235.18,723.804))z210..hide(z211=(231.441,723.804))z211 + ..controls hide(z212=(227.456,723.804))z212 and hide(z213=(224,727.537))z213..hide(z214=(224,731.875))z214 + ..controls hide(z215=(224,735.561))z215 and hide(z216=(225.98,739.048))z216..hide(z217=(228.951,740.941))z217 + ..controls hide(z218=(231.362,742.436))z218 and hide(z219=(236.669,743.83))z219..hide(z220=(244.001,744.926))z220 + --hide(z221=(244.492,748.114))z221--hide(z222=(234.629,746.321))z222..controls hide(z223=(221.079,743.83))z223 and hide(z224=(216,739.148))z224..hide(z225=(216,730.48))z225 + ..controls hide(z226=(216,722.709))z226 and hide(z227=(220.459,717.804))z227..hide(z228=(227.954,717.804))z228 + ..controls hide(z229=(229.747,717.804))z229 and hide(z230=(231.441,718.261))z230..cycle; + %renewcolore; + %draw PreeditedPath5; + %dotlabels.rt(177,178,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,229,230); + PreeditedPath6 = hide(z231=(134.898,647.945))z231--hide(z232=(133.603,648.941))z232..controls hide(z233=(127.227,645.155))z233 and hide(z234=(124.935,644.008))z234..hide(z235=(120.651,644.008))z235 + ..controls hide(z236=(114.175,644.008))z236 and hide(z237=(108.795,646.99))z237..hide(z238=(106.006,652.029))z238 + ..controls hide(z239=(104.113,655.349))z239 and hide(z240=(103.415,658.166))z240..hide(z241=(103.216,664))z241 + --hide(z242=(117.762,664))z242..controls hide(z243=(124.636,664))z243 and hide(z244=(128.92,664.275))z244..hide(z245=(135.795,665.28))z245 + ..controls hide(z246=(135.895,666.675))z246 and hide(z247=(135.994,667.572))z247..hide(z248=(135.994,668.767))z248 + ..controls hide(z249=(135.994,680.225))z249 and hide(z250=(128.622,688))z250..hide(z251=(117.463,688))z251 + --hide(z252=(116.267,685))z252..controls hide(z253=(119.555,685))z253 and hide(z254=(122.145,683.513))z254..hide(z255=(123.939,680.424))z255 + ..controls hide(z256=(126.131,677.137))z256 and hide(z257=(126.828,674.247))z257..hide(z258=(127.127,667.572))z258 + --hide(z259=(127.127,667.572))z259..controls hide(z260=(121.946,667.373))z260 and hide(z261=(119.555,667))z261..hide(z262=(115.968,667))z262 + ..controls hide(z263=(111.385,667))z263 and hide(z264=(108.795,667.145))z264..hide(z265=(103.415,667.871))z265 + ..controls hide(z266=(103.415,672.553))z266 and hide(z267=(103.813,674.745))z267..hide(z268=(105.108,677.336))z268 + ..controls hide(z269=(107.201,681.719))z269 and hide(z270=(111.485,685))z270..hide(z271=(116.267,685))z271 + --hide(z272=(117.463,688))z272..controls hide(z273=(113.777,688))z273 and hide(z274=(109.493,686.598))z274..hide(z275=(105.408,684.011))z275 + ..controls hide(z276=(97.2383,679.328))z276 and hide(z277=(93.9504,673.151))z277..hide(z278=(93.9504,662.79))z278 + ..controls hide(z279=(93.9504,656.513))z279 and hide(z280=(95.4448,651.133))z280..hide(z281=(98.1348,647.347))z281 + ..controls hide(z282=(102.12,642.067))z282 and hide(z283=(108.795,639.007))z283..hide(z284=(116.267,639.007))z284 + ..controls hide(z285=(119.954,639.007))z285 and hide(z286=(123.64,639.796))z286..hide(z287=(127.725,641.569))z287 + ..controls hide(z288=(130.415,642.665))z288 and hide(z289=(132.507,643.96))z289..cycle; + %renewcolore; + %draw PreeditedPath6; + %dotlabels.rt(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,283,284,285,286,287,288,289); + PreeditedPath7 = hide(z290=(143.398,655.218))z290..controls hide(z291=(143.398,648.343))z291 and hide(z292=(143.037,645.354))z292..hide(z293=(142.072,641.369))z293 + ..controls hide(z294=(147.252,639.676))z294 and hide(z295=(151.138,639.007))z295..hide(z296=(155.721,639.007))z296 + ..controls hide(z297=(168.772,639.007))z297 and hide(z298=(178,645.969))z298..hide(z299=(178,655.716))z299 + ..controls hide(z300=(178,658.804))z300 and hide(z301=(177.115,661.096))z301..hide(z302=(175.248,663.089))z302 + ..controls hide(z303=(172.658,665.579))z303 and hide(z304=(169.37,666.775))z304..hide(z305=(160.603,668.468))z305 + ..controls hide(z306=(152.433,670.063))z306 and hide(z307=(150,672.055))z307..hide(z308=(150,676.638))z308 + ..controls hide(z309=(150,681.62))z309 and hide(z310=(153.393,685))z310..hide(z311=(159.307,685))z311 + ..controls hide(z312=(165.983,685))z312 and hide(z313=(170.907,681.261))z313..hide(z314=(170.907,676.239))z314 + --hide(z315=(170.907,673.948))z315--hide(z316=(173.853,673.948))z316..controls hide(z317=(173.953,679.727))z317 and hide(z318=(174.052,682.118))z318..hide(z319=(174.351,685.206))z319 + ..controls hide(z320=(169.071,687))z320 and hide(z321=(165.484,688))z321..hide(z322=(161.4,688))z322 + ..controls hide(z323=(149.843,688))z323 and hide(z324=(143,682.405))z324..hide(z325=(143,673.251))z325 + ..controls hide(z326=(143,668.468))z326 and hide(z327=(145.117,665.081))z327..hide(z328=(149.544,662.989))z328 + ..controls hide(z329=(152.234,661.793))z329 and hide(z330=(157.514,660.199))z330..hide(z331=(164.289,658.705))z331 + ..controls hide(z332=(168.772,657.708))z332 and hide(z333=(171,655.616))z333..hide(z334=(171,651.83))z334 + ..controls hide(z335=(171,646.45))z335 and hide(z336=(165.88,642.007))z336..hide(z337=(158.61,642.007))z337 + ..controls hide(z338=(151.337,642.007))z338 and hide(z339=(146.092,645.765))z339..hide(z340=(146.092,651.133))z340 + --hide(z341=(146.092,655.218))z341--cycle; + %renewcolore; + %draw PreeditedPath7; + %dotlabels.rt(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); + PreeditedPath8 = hide(z342=(51.708,574.571))z342--hide(z343=(54.1987,578.655))z343--hide(z344=(53.8003,579.851))z344 + --hide(z345=(39.6528,579.453))z345..controls hide(z346=(35.9666,582.442))z346 and hide(z347=(32.3799,583))z347..hide(z348=(27.498,583))z348 + ..controls hide(z349=(23.1143,583))z349 and hide(z350=(18.0332,581.84))z350..hide(z351=(13.9485,579.851))z351 + ..controls hide(z352=(8.36914,576.663))z352 and hide(z353=(6.00024,571.781))z353..hide(z354=(6.00024,565.704))z354 + ..controls hide(z355=(6.00024,558.331))z355 and hide(z356=(10.3838,553.25))z356..hide(z357=(17.4355,552.453))z357 + --hide(z358=(9.5647,546.376))z358..controls hide(z359=(8.56836,544.881))z359 and hide(z360=(8.59058,543.586))z360..hide(z361=(8.59058,542.092))z361 + ..controls hide(z362=(8.59058,539.302))z362 and hide(z363=(10.2419,537.708))z363..hide(z364=(14.646,536.314))z364 + --hide(z365=(5.97827,531.631))z365..controls hide(z366=(4.5835,530.834))z366 and hide(z367=(3.00049,527.148))z367..hide(z368=(3.00049,524.059))z368 + ..controls hide(z369=(3.00049,514.992))z369 and hide(z370=(11.9448,509.001))z370..hide(z371=(24.7087,509.001))z371 + --hide(z372=(25.406,512))z372..controls hide(z373=(16.7383,512))z373 and hide(z374=(11.0005,517.001))z374..hide(z375=(11.0005,524.258))z375 + ..controls hide(z376=(11.0005,528.741))z376 and hide(z377=(13.4961,532.826))z377..hide(z378=(17.3359,534.519))z378 + ..controls hide(z379=(18.9299,535.317))z379 and hide(z380=(21.72,535.694))z380..hide(z381=(28.5945,535.694))z381 + --hide(z382=(28.5945,535.605))z382..controls hide(z383=(39.8525,535.605))z383 and hide(z384=(44.0005,533.29))z384..hide(z385=(44.0005,526.748))z385 + ..controls hide(z386=(44.0005,518.18))z386 and hide(z387=(36.0168,512))z387..hide(z388=(25.406,512))z388 + --hide(z389=(24.7087,509.001))z389..controls hide(z390=(39.7529,509.001))z390 and hide(z391=(52.0002,518.341))z391..hide(z392=(52.0002,530.335))z392 + ..controls hide(z393=(52.0002,537.509))z393 and hide(z394=(47.0586,541.606))z394..hide(z395=(39.8525,541.606))z395 + --hide(z396=(23.9119,541.606))z396..controls hide(z397=(18.7312,541.606))z397 and hide(z398=(16.3401,543.073))z398..hide(z399=(16.3401,546.376))z399 + ..controls hide(z400=(16.3401,547.671))z400 and hide(z401=(17.1372,548.767))z401..hide(z402=(19.7275,550.959))z402 + ..controls hide(z403=(20.3254,551.457))z403 and hide(z404=(20.5247,551.656))z404..hide(z405=(20.9231,552.055))z405 + ..controls hide(z406=(21.9194,551.955))z406 and hide(z407=(22.5173,552))z407..hide(z408=(23.3145,552))z408 + --hide(z409=(25.0081,555))z409..controls hide(z410=(18.3328,555))z410 and hide(z411=(14.0005,560.279))z411..hide(z412=(14.0005,568.095))z412 + ..controls hide(z413=(14.0005,575.766))z413 and hide(z414=(17.6313,580))z414..hide(z415=(23.9119,580))z415 + --hide(z416=(23.9121,580))z416..controls hide(z417=(30.687,580))z417 and hide(z418=(35.001,574.52))z418..hide(z419=(35.001,566.202))z419 + ..controls hide(z420=(35.001,559.726))z420 and hide(z421=(30.926,555))z421..hide(z422=(25.0081,555))z422 + --hide(z423=(23.3145,552))z423..controls hide(z424=(27.5986,552))z424 and hide(z425=(32.8789,553.836))z425..hide(z426=(36.9636,556.637))z426 + ..controls hide(z427=(41.447,559.925))z427 and hide(z428=(43.0007,563.91))z428..hide(z429=(43.0007,569.191))z429 + ..controls hide(z430=(43.0007,571.183))z430 and hide(z431=(42.8757,572.478))z431..cycle; + %renewcolore; + %draw PreeditedPath8; + %dotlabels.rt(342,343,344,345,346,347,348,349,350,351,352,353,354,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,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431); + PreeditedPath9 = hide(z432=(57.6858,602.766))z432--hide(z433=(63.2651,602.766))z433..controls hide(z434=(65.0586,602.766))z434 and hide(z435=(66.0002,601.67))z435..hide(z436=(66.0002,598.681))z436 + --hide(z437=(66.0002,547.073))z437..controls hide(z438=(66.0002,540.796))z438 and hide(z439=(65.6814,540.099))z439..hide(z440=(62.0698,539.899))z440 + --hide(z441=(57.4868,539.601))z441--hide(z442=(57.4868,536.612))z442..controls hide(z443=(67.4497,536.91))z443 and hide(z444=(67.4497,537))z444..hide(z445=(69.9404,537))z445 + ..controls hide(z446=(72.4312,537))z446 and hide(z447=(72.4312,537.299))z447..hide(z448=(82.394,537))z448 + --hide(z449=(82.394,539.601))z449--hide(z450=(77.811,539.899))z450..controls hide(z451=(74.4236,540.099))z451 and hide(z452=(73.9998,540.796))z452..hide(z453=(73.9998,547.073))z453 + --hide(z454=(73.9998,608.445))z454--hide(z455=(73.228,609.242))z455..controls hide(z456=(68.8442,607.548))z456 and hide(z457=(65.5564,606.751))z457..cycle; + %renewcolore; + %draw PreeditedPath9; + %dotlabels.rt(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,457); + PreeditedPath10 = hide(z458=(112.183,583))z458--hide(z459=(110.389,580))z459..controls hide(z460=(119.555,580))z460 and hide(z461=(126,570.185))z461..hide(z462=(126,556.836))z462 + ..controls hide(z463=(126,545.379))z463 and hide(z464=(121.046,538.007))z464..hide(z465=(113.179,538.007))z465 + ..controls hide(z466=(103.416,538.007))z466 and hide(z467=(96.9998,547.652))z467..hide(z468=(96.9998,561.917))z468 + ..controls hide(z469=(96.9998,573.873))z469 and hide(z470=(101.725,580))z470..hide(z471=(110.389,580))z471 + --hide(z472=(110.389,580))z472--hide(z473=(112.183,583))z473..controls hide(z474=(97.637,583))z474 and hide(z475=(88,572.998))z475..hide(z476=(88,558.53))z476 + ..controls hide(z477=(88,544.482))z477 and hide(z478=(96.6931,535.007))z478..hide(z479=(109.294,535.007))z479 + ..controls hide(z480=(124.637,535.007))z480 and hide(z481=(135,545.63))z481..hide(z482=(135,560.523))z482 + ..controls hide(z483=(135,573.973))z483 and hide(z484=(125.485,583))z484..cycle; + %renewcolore; + %draw PreeditedPath10; + %dotlabels.rt(458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484); + PreeditedPath11 = hide(z485=(154,608.445))z485--hide(z486=(152.833,609.242))z486..controls hide(z487=(148.449,607.548))z487 and hide(z488=(145.161,606.751))z488..hide(z489=(137.29,605.556))z489 + --hide(z490=(137.29,602.766))z490--hide(z491=(142.87,602.766))z491..controls hide(z492=(144.663,602.766))z492 and hide(z493=(146,601.67))z493..hide(z494=(146,598.681))z494 + --hide(z495=(146,552.154))z495..controls hide(z496=(146,545.977))z496 and hide(z497=(145.82,543.287))z497..hide(z498=(144.563,536.313))z498 + --hide(z499=(146.157,535.715))z499--hide(z500=(150.143,539.302))z500..controls hide(z501=(154.128,536.711))z501 and hide(z502=(157.714,535.805))z502..hide(z503=(162.995,535.805))z503 + ..controls hide(z504=(166.88,535.805))z504 and hide(z505=(169.47,536.474))z505..hide(z506=(171.563,537.907))z506 + --hide(z507=(181.526,545.08))z507..controls hide(z508=(185.909,548.268))z508 and hide(z509=(190,556.538))z509..hide(z510=(190,563.811))z510 + ..controls hide(z511=(190,575.368))z511 and hide(z512=(182.277,583))z512..hide(z513=(171.364,583))z513 + ..controls hide(z514=(166.681,583))z514 and hide(z515=(161.799,581.468))z515..hide(z516=(159.209,579.253))z516 + --hide(z517=(153.999,573.674))z517--hide(z518=(156.319,572.578))z518..controls hide(z519=(159.109,575.468))z519 and hide(z520=(162.994,577))z520..hide(z521=(167.079,577))z521 + ..controls hide(z522=(175.448,577))z522 and hide(z523=(180.999,570.288))z523..hide(z524=(180.999,559.726))z524 + ..controls hide(z525=(180.999,548.567))z525 and hide(z526=(174.909,540.805))z526..hide(z527=(166.282,540.805))z527 + ..controls hide(z528=(161.101,540.805))z528 and hide(z529=(153.999,543.988))z529..hide(z530=(153.999,546.176))z530 + --hide(z531=(153.999,567.597))z531..controls hide(z532=(153.999,568.991))z532 and hide(z533=(154.892,570.785))z533..hide(z534=(156.319,572.578))z534 + --hide(z535=(153.999,573.674))z535--cycle; + %renewcolore; + %draw PreeditedPath11; + %dotlabels.rt(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); + PreeditedPath12 = hide(z536=(226,545.08))z536--hide(z537=(225.662,536.612))z537..controls hide(z538=(232.137,536.911))z538 and hide(z539=(232.137,537))z539..hide(z540=(233.433,537))z540 + ..controls hide(z541=(233.931,537))z541 and hide(z542=(236.421,537.259))z542..hide(z543=(240.805,537))z543 + --hide(z544=(240.805,540))z544--hide(z545=(236.92,539.8))z545..controls hide(z546=(234.529,539.9))z546 and hide(z547=(234,540.697))z547..hide(z548=(234,545.579))z548 + --hide(z549=(234,563.811))z549..controls hide(z550=(234,578.357))z550 and hide(z551=(229.85,583))z551..hide(z552=(218.388,583))z552 + ..controls hide(z553=(214.104,583))z553 and hide(z554=(210.119,582.11))z554..hide(z555=(206.333,580.249))z555 + --hide(z556=(200.985,577.061))z556--hide(z557=(200.985,570.585))z557--hide(z558=(203.643,569.888))z558 + --hide(z559=(204.938,572.976))z559..controls hide(z560=(207.031,577.659))z560 and hide(z561=(208.027,578))z561..hide(z562=(212.61,578))z562 + ..controls hide(z563=(221.975,578))z563 and hide(z564=(225.861,574.417))z564..hide(z565=(226.16,565.604))z565 + --hide(z566=(226.001,562.416))z566--hide(z567=(226,549.264))z567..controls hide(z568=(223.146,545.18))z568 and hide(z569=(216.947,541.804))z569..hide(z570=(213.109,541.804))z570 + ..controls hide(z571=(209.124,541.804))z571 and hide(z572=(205,545.301))z572..hide(z573=(205,549.364))z573 + ..controls hide(z574=(205,553.051))z574 and hide(z575=(207.247,556.538))z575..hide(z576=(210.618,558.431))z576 + ..controls hide(z577=(213.083,559.925))z577 and hide(z578=(218.507,561.32))z578..hide(z579=(226.001,562.416))z579 + --hide(z580=(226.16,565.604))z580--hide(z581=(216.296,563.81))z581..controls hide(z582=(202.747,561.32))z582 and hide(z583=(197,556.637))z583..hide(z584=(197,547.969))z584 + ..controls hide(z585=(197,540.198))z585 and hide(z586=(201.708,535.804))z586..hide(z587=(209.621,535.804))z587 + ..controls hide(z588=(211.415,535.804))z588 and hide(z589=(213.108,536.07))z589..cycle; + %renewcolore; + %draw PreeditedPath12; + %dotlabels.rt(536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,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,586,587,588,589); + PreeditedPath13 = hide(z590=(245.986,602.766))z590--hide(z591=(251.565,602.766))z591..controls hide(z592=(253.359,602.766))z592 and hide(z593=(254,601.67))z593..hide(z594=(254,598.681))z594 + --hide(z595=(254,547.073))z595..controls hide(z596=(254,540.796))z596 and hide(z597=(253.706,540.099))z597..hide(z598=(250.37,539.899))z598 + --hide(z599=(245.787,539.601))z599--hide(z600=(245.787,536.612))z600..controls hide(z601=(255.75,536.91))z601 and hide(z602=(255.75,537))z602..hide(z603=(258.24,537))z603 + ..controls hide(z604=(260.731,537))z604 and hide(z605=(260.731,537.299))z605..hide(z606=(270.694,537))z606 + --hide(z607=(270.694,539.601))z607--hide(z608=(266.111,539.899))z608..controls hide(z609=(262.724,540.099))z609 and hide(z610=(262,540.796))z610..hide(z611=(262,547.073))z611 + --hide(z612=(262,608.445))z612--hide(z613=(261.528,609.242))z613..controls hide(z614=(257.144,607.548))z614 and hide(z615=(253.856,606.751))z615..cycle; + %renewcolore; + %draw PreeditedPath13; + %dotlabels.rt(590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615); + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% second featpost part +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + fill rigorousfearpath( black, sray ); + numeric k; + for k = 1 upto 13: + unfill closedpathinspace( PreeditedPath[k], 8, converterfunc ); + endfor; + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% That's it! + +endfig; +end diff --git a/Master/texmf-dist/doc/metapost/featpost/example/aledlogo.mp b/Master/texmf-dist/doc/metapost/featpost/example/aledlogo.mp new file mode 100644 index 00000000000..15844686c0b --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/aledlogo.mp @@ -0,0 +1,183 @@ +% aledlogo.mp +% L. Nobre G. +% 2007 + +input featpost3Dplus2D; + +prologues := 1; + +verbatimtex +\documentclass{article} +\usepackage{marvosym} +\begin{document} +etex + +vardef calxtep( expr Beglim, Endlim, Instep ) = + ((Endlim-Beglim)/floor((Endlim-Beglim)/Instep)) +enddef; + +def drawfila( expr H, Ray, Astart, Afinis, Astep, Sray ) = + begingroup + save a, c, p, n, i, s, l, r, u, d, inc, rad, ba, bb, vertex; + numeric a, n, i, s, inc, sa, sb; + color c, p, l, r, u, d, rad, vertex; + path shape; + boolean ba, bb; + picture aux; + inc = -5; + sa = 2; + sb = 0.27; + vertex = (-0.7,0.9,0.15); + n = floor((Afinis-Astart)/Astep); + s = (Afinis-Astart)/n; + for i=0 upto n: + a := Astart+i*s; + p := (Ray*cosd(a),Ray*sind(a),H); + rad := (cosd(a),sind(a),0); + u := Sray*(blue*cosd(inc)+rad*sind(inc)); + r := Sray*ncrossprod( p-f, u ); + l := -r; + d := -u; + ba := (ypart rp(p)) < (ypart rp(vertex)) + + sa*((xpart rp(p))-(xpart rp(vertex))); + bb := (ypart rp(p)) > (ypart rp(vertex)) + + sb*((xpart rp(p))-(xpart rp(vertex))); + shape := rp(p+r+d)--rp(p+r+u)--rp(p+l+u)--rp(p+l+d)--cycle; + if ( uniformdeviate(1) < 0.5 ): +%% if ( uniformdeviate(1) < 0.7 ): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% if ( ba and bb ): + c := black; + unfill shape; + draw shape withcolor c; + aux := thelabel( btex \EyesDollar etex scaled (ps( p, 7 )), rp(p) ); + draw aux withcolor c; +%%%% fill rp(p+r+d)--rp(p+r+u)--rp(p+l)--cycle withcolor c; + else: +%%%% c := 0.5white; +%% c := 0.5red; + c := black; + unfill shape; + draw shape withcolor c; + aux := thelabel( btex \EURhv etex scaled (ps( p, 9 )), rp(p) ); + draw aux withcolor c; +%%%% fill rp(p+l+d)--rp(p+l+u)--rp(p+r)--cycle withcolor c; + fi; +%% fill rp(p+r+u)--rp(p+l+u)--rp(p+d)--cycle withcolor c; +%%%% fill rp(p+r)--rp(p+u)--rp(p+l)--rp(p+d)--cycle withcolor c; +%%%% fill shape withcolor c; +%%%% draw shape withcolor white withpen pensquare scaled 3pt; +%%%% fill rigorousfearpath( p, Sray ) withcolor c; + endfor + endgroup +enddef; + +%SphericalDistortion := true; + +beginfig(1); + numeric heig, bray, tray, vang, sray, ldis, fdis, cwid, cnum, ylen; + heig = 0.35; + bray = 0.95; + tray = 2.25; + vang = 95; + sray = 0.029; + ldis = 0.02; + fdis = 0.075; + cwid = 0.15; + cnum = 2; + ylen = -0.16; + f := (0,ylen,heig); + viewcentr := (0,tray,heig); + color thered; + thered = 0.66red; + numeric degperrad, asector, s; + degperrad = 180.0/3.14159; + numeric a, h, astep, ray, raystep, hstep, abeg, aend, astart, afinis, awid; + raystep = calxtep( bray, tray, fdis ); + hstep = raystep/(tray-bray); + h = 1; + abeg = 0.5*(180-vang); + aend = 180-abeg; + for ray=tray step -raystep until bray: + awid := degperrad*cwid/ray; + asector := (vang-cnum*awid)/(cnum+1); + astep := degperrad*(ldis+2*sray)/ray; + for s=0 upto cnum: + astart := abeg+s*(asector+awid); + afinis := astart+asector; + drawfila( h, ray, astart, afinis, astep, sray ); + endfor; + h := h - hstep; + endfor; + picture stor; + stor = currentpicture; + bboxmargin := 2cm; + fill bbox stor withcolor thered; + draw stor; +endfig; + +beginfig(2); + numeric angout, anglow, rayout, distra, lifactor, lidist, madist; + numeric maleng, numstp, madstp, malstp, mafrac, i, j, begy, endy, xcoord; + color cenpos, vechor, vecver, yela, yelb, dblu, mgre; + pair ulc, llc, urc; + picture block; + angout=30; + anglow=-6; + lifactor=2; + lidist=3.5; + mafrac=0.6; + numstp=25; + f:=(7,6,5); + viewcentr:=(0,-1.4,0); + Spread:=35; + yela=(1,1,0.7); + yelb=(1,1,0.45); + background:=yelb; + dblu=0.4blue; + mgre=0.6green; + rayout=sind(angout); + distra=cosd(angout); + llc = point 0 of VGAborder; + ulc = point 3 of VGAborder; + urc = point 2 of VGAborder; + madist = abs( ulc-llc ); + maleng = abs( urc-ulc ); + malstp = maleng/numstp; + madstp = 5*malstp/3; + z2 = mafrac*(malstp,madstp); + z1 = mafrac*(0,madstp); + z3 = mafrac*(malstp,0); + fill origin--z1--z2--z3--cycle shifted (0.5*(1-mafrac)*(malstp,madstp)) + withcolor mgre; + block = currentpicture; + currentpicture := nullpicture; + fill VGAborder withcolor dblu; + for i=0 upto numstp-1: + begy:= (ypart ulc) + madstp*(1+normaldeviate); + endy:= (ypart 0.5[llc,ulc]) + 4*madstp*normaldeviate; + xcoord:= (xpart llc) + i*malstp; + for j=begy step -madstp until endy: + draw block shifted (xcoord,j); + endfor; + endfor; + clip currentpicture to VGAborder; + cenpos:=distra*(-cosd(30)*cosd(anglow),-sind(30)*cosd(anglow),sind(anglow)); + vechor:=rayout*(sind(30),-cosd(30),0); + vecver:=rayout*(cosd(30)*sind(anglow),sind(30)*sind(anglow),cosd(anglow)); + drawoptions( withcolor yelb ); + whatisthis(cenpos,vechor,vecver,3lidist,1+3*(lifactor-1)); + fill rigorousfearpath( black, 1 ) withcolor yela; + cenpos:=distra*(cosd(30)*cosd(anglow),-sind(30)*cosd(anglow),sind(anglow)); + vechor:=rayout*(sind(30),cosd(30),0); + vecver:=rayout*(-cosd(30)*sind(anglow),sind(30)*sind(anglow),cosd(anglow)); + drawoptions( withcolor yelb ); + whatisthis(cenpos,vechor,vecver,lidist,lifactor); + cenpos:=distra*(0,cosd(anglow),sind(anglow)); + vechor:=rayout*(-1,0,0); + vecver:=rayout*(0,-sind(anglow),cosd(anglow)); + whatisthis(cenpos,vechor,vecver,lidist,lifactor); + drawoptions(); + produce_auto_scale; +endfig; + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp b/Master/texmf-dist/doc/metapost/featpost/example/anglinerigorouscircle.mp index 57548730161..60eec4dc2f0 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/anglinerigorouscircle.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/anglinerigorouscircle.mp @@ -1,12 +1,15 @@ -% angline_rigorouscircle.mp +% anglinerigorouscircle.mp % L. Nobre G. -% 2003 +% 2006 -%input featpost3Dplus2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex +%prologues := 3; +prologues := 0; + verbatimtex \documentclass{article} \usepackage{beton,concmath,ccfonts} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/antimattermeteor.mp b/Master/texmf-dist/doc/metapost/featpost/example/antimattermeteor.mp new file mode 100644 index 00000000000..6d1d06e59eb --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/antimattermeteor.mp @@ -0,0 +1,64 @@ +% antimattermeteor.mp +% L. Nobre G. +% 2008 + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +%prologues := 0; + +% verbatimtex +% \documentclass{article} +% \usepackage{beton,concmath,ccfonts} +% \begin{document} +% etex + +f := (30,0,0); +Spread := 100; + +numeric initdist, timestep, Gfactor, vprobe; +inidist = 10; +timestep = 0.1; +Gfactor = 2; +vprobe = 2.2; +numeric numsteps, numtries, diststep, i, sigma; +color inipos, inivel, dstp; +path traject; + +def gravitfield( expr relatposprobe ) = + ( Gfactor*relatposprobe/((conorm( relatposprobe ))**3) ) +enddef; + +vardef scalarfu( expr index ) = + traject:=trajectorypath( + numsteps, + inipos+index*dstp, + inivel, + timestep)(gravitfield); + draw traject; +enddef; + +beginfig(1); + numtries = 36; + numsteps = 95; + sigma = 3.15; + diststep = sigma/numtries; + dstp = (0,0,diststep); + inipos = (0,-inidist,0); + inivel = (0,vprobe,0); + drawoptions( withcolor blue ); + for i=-numtries upto numtries: + scalarfu( i ); + endfor; + drawoptions(); + fill fullcircle scaled (4cm) shifted (rp(black)); + produce_auto_scale; +endfig; + +% verbatimtex +% \end{document} +% etex + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.log b/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.log new file mode 100644 index 00000000000..5fe5102d83b --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.log @@ -0,0 +1,14 @@ +This is MetaPost, version 1.504 (kpathsea version 6.0.0) 24 NOV 2011 13:14 +**bananadimmer.mp +(mpost.mp (/usr/share/texmf-texlive/metapost/base/plain.mp +Preloading the plain mem file, version 1.004)) (./bananadimmer.mp +(/usr/share/texmf-texlive/metapost/featpost/featpost3Dplus2D.mp +Preloading FeatPost macros, version 0.6.7) +>> banana +! Isolated expression. +<to be read again> + ( +l.62 banana( + +? x + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp b/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp new file mode 100644 index 00000000000..3f9bc756235 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp @@ -0,0 +1,78 @@ +% bananadimmer.mp +% Pedro J. Sebastiao. +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{beton} +\usepackage{concmath} +\usepackage{ccfonts} +\begin{document} +etex + +beginfig(1); + color axxc, ayyc, azzc; + color nalfa, ngamma; + numeric radius, gammang, xxsize, yysize, zzsize; + numeric xxpos, yypos, zzpos; + numeric angulo; + numeric nalfapos; + picture xxlabel, yylabel, zzlabel, nalfalabel; + + f := (3,4,2); + Spread := 60; + + gammang = 0; + angulo = -90; + beta = 11.8; + nbeta = 1.3; + delta = 35; + nalfapos = 1; + xxsize = 0.8; + xxpos = 6; + yysize = 1.3; + yypos = 6; + zzsize = 1.3; + zzpos = 4; + + xxlabel = btex $\mbox{\protect \scriptsize light}$ etex; + yylabel = btex $\mbox{\protect \scriptsize analyser}$ etex; + zzlabel = btex $\mbox{\protect \scriptsize polariser}$ etex; + nalfalabel = btex $\mathbf{n}_a$ etex; + + axxc = (xxsize,0,0); + ayyc = (0,yysize,0); + azzc = (0,0,zzsize); + nalfa = (0,nbeta*cosd(beta)*sind(delta),nbeta*cosd(beta)*cosd(delta)); + radius = nbeta*sind(beta); + + ngamma := 0.5*(nalfa+(radius*cosd(angulo),radius*sind(angulo),0)); + drawarrow rp(black)..rp(axxc); + drawarrow rp(black)..rp(ayyc); + drawarrow rp(black)..rp(azzc); + drawarrow rp(black)..rp(nalfa); + labeln( xxlabel, rp(axxc), xxpos ); + labeln( yylabel, rp(ayyc), yypos ); + labeln( zzlabel, rp(azzc), zzpos ); + labeln( nalfalabel, rp(nalfa), nalfapos ); + + banana( + ngamma, + conorm(ngamma), + ( 90, -26, 90 ), + 0.2, + 150); + banana( + ngamma, + conorm(ngamma), + ( 0, 0, 66 ), + 0.2, + 135); +endfig; + +verbatimtex \end{document} etex + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp~ b/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp~ new file mode 100644 index 00000000000..b0d3973dc90 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/bananadimmer.mp~ @@ -0,0 +1,78 @@ +% bananadimmer.mp +% Pedro J. Sebastiao. +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{beton} +\usepackage{concmath} +\usepackage{ccfonts} +\begin{document} +etex + +beginfig(1); + color axxc, ayyc, azzc; + color nalfa, ngamma; + numeric radius, gammang, xxsize, yysize, zzsize; + numeric xxpos, yypos, zzpos; + numeric angulo; + numeric nalfapos; + picture xxlabel, yylabel, zzlabel, nalfalabel; + + f := (3,4,2); + Spread := 60; + + gammang = 0; + angulo = -90; + beta = 11.8; + nbeta = 1.3; + delta = 35; + nalfapos = 1; + xxsize = 0.8; + xxpos = 6; + yysize = 1.3; + yypos = 6; + zzsize = 1.3; + zzpos = 4; + + xxlabel = btex $\mbox{\protect \scriptsize light}$ etex; + yylabel = btex $\mbox{\protect \scriptsize analyser}$ etex; + zzlabel = btex $\mbox{\protect \scriptsize polariser}$ etex; + nalfalabel = btex $\mathbf{n}_a$ etex; + + axxc = (xxsize,0,0); + ayyc = (0,yysize,0); + azzc = (0,0,zzsize); + nalfa = (0,nbeta*cosd(beta)*sind(delta),nbeta*cosd(beta)*cosd(delta)); + radius = nbeta*sind(beta); + + ngamma := nalfa+(radius*cosd(angulo),radius*sind(angulo),0); + drawarrow rp(black)..rp(axxc); + drawarrow rp(black)..rp(ayyc); + drawarrow rp(black)..rp(azzc); + drawarrow rp(black)..rp(nalfa); + labeln( xxlabel, rp(axxc), xxpos ); + labeln( yylabel, rp(ayyc), yypos ); + labeln( zzlabel, rp(azzc), zzpos ); + labeln( nalfalabel, rp(nalfa), nalfapos ); + + banana( + 0.5[black,ngamma], + conorm(ngamma)/2, + ( 90, -26, 90 ), + 0.2, + 150); + banana( + 0.5[black,ngamma], + conorm(ngamma)/2, + ( 0, 0, 66 ), + 0.2, + 135); +endfig; + +verbatimtex \end{document} etex + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp b/Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp index 1c2331bdc17..4d81af39d76 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/borderframetest.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/borderframetest.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(0); Spread := 45; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/brownellips.mp b/Master/texmf-dist/doc/metapost/featpost/example/brownellips.mp new file mode 100644 index 00000000000..5ce5e32530b --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/brownellips.mp @@ -0,0 +1,128 @@ +% brownellips.mp +% L. Nobre G. +% IYP (2005) + +input featpost3Dplus2D; + +numeric ParameterA, ParameterB, ParameterC; +ParameterA = 0.5; % f +ParameterB = 0.5; % viewcentr +ParameterC = 405; % main arm angle + +f := ParameterA[6*(3,4,2),4*(2,-3,1)]; +viewcentr := ParameterB[black,(-2,-3,1)]; +Spread := 16; + +beginfig(0); + numeric sray, armb, mara, flen, pif, pers, perb, rads, radb, pert, j; + numeric nums, lens, i, bray, unan, stan, acta, arms, mang, actl, coun; + numeric rrat, auxd, anga, sqsd, k; + color c[][], vr, vt, vi, vb, auxc; + path elo[]; + string inde, comm; + stan = 0; + nums = 30; + sray = 0.95; + bray = 2; % bray must be 2*sray if you want ellipses + armb = 5; + arms = 2.5; + sqsd = 0.3; + pif = 3.14159/180; + rrat = 1-bray/sray; + flen = armb +-+ (bray-sray); + mara = angle( bray-sray, flen ); + rads = pif*2*mara; + radb = pif*(360-2*mara); + pers = rads*sray; + perb = radb*bray; + pert = pers + perb + 2*flen; + lens = pert/nums; + unan = lens/bray/pif; + acta = stan + ParameterC; + mang = acta mod unan; + drawoptions( withcolor 0.7white ); + setthestage( 20, 2*(armb+2*arms) ); + drawoptions(); + draw + rp((armb*cosd(stan)+arms*cosd(rrat*stan), + armb*sind(stan)+arms*sind(rrat*stan), + 0)) + for i=stan+2 step 2 until acta: + ...rp((armb*cosd(i)+arms*cosd(rrat*i),armb*sind(i)+arms*sind(rrat*i),0)) + endfor; + auxc:=(armb*cosd(acta)+arms*cosd(rrat*acta), + armb*sind(acta)+arms*sind(rrat*acta), + 0); + verygoodcone(false,auxc+2*sqsd*blue,-blue,sqsd,auxc); + vb := (armb*cosd(acta),armb*sind(acta),2*sqsd); + vi := 0.5*sqsd*(sind(rrat*acta),-cosd(rrat*acta),0); + kindofcube(false,true,vb+vi,rrat*acta,0,0,arms,sqsd,sqsd); + coun = 0; + for i=unan-mang+mara-180 step unan until 180-mara: + coun := incr( coun ); + vr := (-bray*cosd(i),-bray*sind(i),3*sqsd); + vt := 0.25*lens*(-sind(i),cosd(i),0); + c[coun]1 = vt+vr; + c[coun]2 = vt+vr+lens*blue; + c[coun]3 = vr-vt+lens*blue; + c[coun]4 = vr-vt; + c[coun]5 = 0.25*(c[coun]1+c[coun]2+c[coun]3+c[coun]4); + j := i; + endfor; + auxd = lens-pif*(180-mara-j)*bray; + vi := (-bray*cosd(180-mara),-bray*sind(180-mara),3*sqsd); + for i=auxd step lens until flen: + coun := incr( coun ); + vr := vi + (i*sind(mara),i*cosd(mara),0); + vt := 0.25*lens*(sind(mara),cosd(mara),0); + c[coun]1 = vt+vr; + c[coun]2 = vt+vr+lens*blue; + c[coun]3 = vr-vt+lens*blue; + c[coun]4 = vr-vt; + c[coun]5 = 0.25*(c[coun]1+c[coun]2+c[coun]3+c[coun]4); + j := i; + endfor; + anga := (lens-flen+j)/sray/pif; + for i=anga-mara step lens/sray/pif until mara: + coun := incr( coun ); + vr := armb*red + (sray*cosd(i),sray*sind(i),3*sqsd); + vt := 0.25*lens*(-sind(i),cosd(i),0); + c[coun]1 = vt+vr; + c[coun]2 = vt+vr+lens*blue; + c[coun]3 = vr-vt+lens*blue; + c[coun]4 = vr-vt; + c[coun]5 = 0.25*(c[coun]1+c[coun]2+c[coun]3+c[coun]4); + j := i; + endfor; + auxd := lens-pif*(mara-j)*sray; + vi := armb*red + (sray*cosd(mara),sray*sind(mara),3*sqsd); + for i=auxd step lens until flen: + coun := incr( coun ); + vr := vi + (-i*sind(mara),i*cosd(mara),0); + vt := 0.25*lens*(-sind(mara),cosd(mara),0); + c[coun]1 = vt+vr; + c[coun]2 = vt+vr+lens*blue; + c[coun]3 = vr-vt+lens*blue; + c[coun]4 = vr-vt; + c[coun]5 = 0.25*(c[coun]1+c[coun]2+c[coun]3+c[coun]4); + endfor; + for i=1 upto coun: + for j=1 upto 4: + c[i][j] := eulerrotation( acta, 0, 0, c[i][j] ); + endfor; + elo[i] = for k=1 upto 4: rp(c[i][k])-- endfor cycle; + inde := decimal( i ); + comm := "unfill elo[" & inde & "]; draw elo[" & inde & "];"; + getready( comm, c[i]5 ); + endfor; + doitnow; + produce_vga_border +endfig; +end; + + + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bstr.mp b/Master/texmf-dist/doc/metapost/featpost/example/bstr.mp new file mode 100644 index 00000000000..7a4a46e26cf --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/bstr.mp @@ -0,0 +1,15 @@ +% bstr.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +beginfig(1); + boolean tb; + tb = true; + draw origin; + label( bstr( tb ) & cstr((1,2,3)), origin ); +endfig; + +end. + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp b/Master/texmf-dist/doc/metapost/featpost/example/bughunt.mp index 2afa2bcd62d..11a153fa304 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/bughunt.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/bughunt.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; %SphericalDistortion := true; %f := 0.3*(5,4,2); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp b/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp deleted file mode 100644 index b0cf81a4674..00000000000 --- a/Master/texmf-dist/doc/metapost/featpost/example/bugtrack/gstr.mp +++ /dev/null @@ -1,9 +0,0 @@ - -beginfig(1); - boolean tb; - tb = true; - draw origin; - show bstr( tb ); -endfig; -end. - diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp b/Master/texmf-dist/doc/metapost/featpost/example/cartaxes.mp index af8576e06c2..6d01feda62d 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/cartaxes.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/cartaxes.mp @@ -1,12 +1,15 @@ -verbatimtex -\documentclass{article} -\begin{document} +% cartaxes.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +verbatimtex \documentclass{article}\begin{document} etex -%input featpost3Dplus2D; -etex beginfig(1); cartaxes(1,1,1); endfig; + f := (5,3.5,1); beginfig(2); cartaxes(1,1,1); @@ -22,7 +25,7 @@ beginfig(2); squareangline( va, vc, black, 0.15 ); angline( va, red, black, 0.75, decimal getangle( va, red ), lft ); endfig; -verbatimtex -\end{document} -etex + +verbatimtex \end{document} etex + end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/closingbox.mp b/Master/texmf-dist/doc/metapost/featpost/example/closingbox.mp new file mode 100644 index 00000000000..98b2e0b986e --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/closingbox.mp @@ -0,0 +1,59 @@ +% closingbox.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +beginfig(1); + f := 1.5*(5,-6,2); + Spread := 80; + numeric ang; + color auxa, auxb, auxc, auxd; + ang = 48; + V1 := (-1,1,0); + V3 := (-1,-1,0); + V2 := (-3,1,0); + V2 := V1 + rotvecaroundanother( ang, V2-V1, V1-V3 ); + V4 := (-3,-1,0); + V4 := V3 + rotvecaroundanother( ang, V4-V3, V1-V3 ); + V6 := (-1,-3,0); + V6 := V3 + rotvecaroundanother( ang, V6-V3, V4-V3 ); + V7 := V4 + V3 - V1; + V7 := V4 + rotvecaroundanother( ang, V7-V4, V4-V3 ); + auxa = N( V4-V3 ); + V5 := V4 + auxa; + V5 := V4 + rotvecaroundanother( ang, auxa, V4-V7 ); + auxb = N( V7-V6 ); + V8 := V7 + auxb; + V8 := V7 + rotvecaroundanother( ang, auxb, V4-V7 ); + + V11:= (1,-1,0); + V13:= (1,1,0); + V12 := (3,-1,0); + V12 := V11 + rotvecaroundanother( ang, V12-V11, V11-V13 ); + V14 := (3,1,0); + V14 := V13 + rotvecaroundanother( ang, V14-V13, V11-V13 ); + V16 := (1,3,0); + V16 := V13 + rotvecaroundanother( ang, V16-V13, V14-V13 ); + V17 := V14 + V13 - V11; + V17 := V14 + rotvecaroundanother( ang, V17-V14, V14-V13 ); + auxc = N( V14-V13 ); + V15 := V14 + auxc; + V15 := V14 + rotvecaroundanother( ang, auxc, V14-V17 ); + auxd = N( V17-V16 ); + V18 := V17 + auxd; + V18 := V17 + rotvecaroundanother( ang, auxd, V14-V17 ); + + makeface1(1,3,11,13); + makeface2(1,2,4,3); + makeface3(3,4,7,6); + makeface4(4,5,8,7); + makeface5(11,12,14,13); + makeface6(13,14,17,16); + makeface7(14,15,18,17); + + draw_invisible( false, false, TableC3, black ); + +endfig; + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cmykropes.mp b/Master/texmf-dist/doc/metapost/featpost/example/cmykropes.mp new file mode 100644 index 00000000000..ee99d874568 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/cmykropes.mp @@ -0,0 +1,287 @@ +% cmykropes.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +verbatimtex +\documentclass{article} +\usepackage{palatino,mathpazo} +\begin{document} +etex + +Spread := 39; +f := 3*(3,5,4); + +color ki[]t[]; +numeric inum, icen, bnum, knum, frame, keytime, maxtetradimstep, atime; +inum = 18; +icen = 9; +bnum = inum*8; +knum = 5; +maxtetradimstep = 0.2; +atime = 4.5; + +ki0t0 = (-6.6,2.0,0.3); +ki1t0 = (-5.3,1.5,0.0); +ki2t0 = (-2.3,1.0,-0.4); +ki3t0 = (-0.5,0.6,0.8); +ki4t0 = (0.3,-0.2,-0.4); +ki5t0 = (0.9,-0.2,-1.1); +ki6t0 = (0.9,1.8,-0.6); +ki7t0 = (-0.4,1.8,0.4); +ki8t0 = (-0.4,0.3,-0.2); +ki9t0 = (0.3,-6.0,0.1); +ki10t0 = (5.7,-5.5,0.6); +ki11t0 = (5.8,0.9,0.6); +ki12t0 = (1.6,1.2,0.4); +ki13t0 = (0.1,1.1,-0.6); +ki14t0 = (-2.4,1.4,0.3); +ki15t0 = (-2.4,0.0,0.1); +ki16t0 = (0.2,0.3,-0.9); +ki17t0 = (1.6,0.3,0.3); +ki18t0 = (3.9,0.4,0.4); + +ki0t1 = (-6.6,2.0,0.3); +ki1t1 = (-5.3,1.5,0.0); +ki2t1 = (-2.3,1,-0.4); +ki3t1 = (-0.5,0.6,0.8); +ki4t1 = (0.3,-0.2,-0.4); +ki5t1 = (0.9,-0.2,-1.1); +ki6t1 = (0.9,1.8,-0.6); +ki7t1 = (-0.4,1.8,0.4); +ki8t1 = (-0.4,0.3,-0.2); +ki9t1 = (0.3,-6.0,0.1); +ki10t1 = (5.7,-5.5,0.6); +ki11t1 = (5.8,0.9,0.6); +ki12t1 = (1.6,1.2,0.4); +ki13t1 = (0.1,1.1,-0.6); +ki14t1 = (-2.4,1.8,0.3); +ki15t1 = (-5.4,2.0,0.3); +ki16t1 = (-7.2,2.2,0.3); +ki17t1 = (-8.6,2.4,0.3); +ki18t1 = (-9.9,2.8,0.4); + +ki0t2 = (-6.6,2,0.3); +ki1t2 = (-5.3,1.5,0.0); +ki2t2 = (-2.3,1.0,-0.4); +ki3t2 = (-0.5,0.6,0.8); +ki4t2 = (0.3,-0.2,-0.4); +ki5t2 = (0.9,-0.2,-1.1); +ki6t2 = (0.9,1.8,-0.6); +ki7t2 = (-0.4,1.8,0.4); +ki8t2 = (-0.4,0.3,-0.2); +ki9t2 = (0.3,-6.0,0.1); +ki10t2 = (5.7,-5.5,0.6); +ki11t2 = (5.8,0.9,0.6); +ki12t2 = (1.6,1.2,0.4); +ki13t2 = (0.1,1.1,-0.6); +ki14t2 = (-2.4,1.8,0.3); +ki15t2 = (-5.4,1.4,0.3); +ki16t2 = (-5.2,1,0.4); +ki17t2 = (-3.6,0.8,0.4); +ki18t2 = (-2.4,0.8,0.4); + +ki0t3 = (-6.6,2,0.3); +ki1t3 = (-5.3,1.5,0.0); +ki2t3 = (-2.3,1.0,-0.4); +ki3t3 = (-0.5,0.6,0.8); +ki4t3 = (0.3,-0.2,-0.4); +ki5t3 = (0.9,-0.2,-1.1); +ki6t3 = (0.9,1.8,-0.6); +ki7t3 = (-0.4,1.8,0.4); +ki8t3 = (-0.4,0.3,-0.2); +ki9t3 = (0.3,-6.0,0.1); +ki10t3 = (5.7,-5.5,0.6); +ki11t3 = (5.8,0.9,0.6); +ki12t3 = (1.6,1.2,0.4); +ki13t3 = (0.1,1.1,-0.6); +ki14t3 = (-2.4,1.8,0.3); +ki15t3 = (-3.4,1.4,0.3); +ki16t3 = (-2.4,0.8,0.3); +ki17t3 = (0.1,0.8,-0.6); +ki18t3 = (1.6,0.8,0.4); + +ki0t4 = (-6.6,2,0.3); +ki1t4 = (-5.3,1.5,0.0); +ki2t4 = (-2.3,1.0,-0.4); +ki3t4 = (-0.5,0.6,0.8); +ki4t4 = (0.3,-0.2,-0.4); +ki5t4 = (0.9,-0.2,-1.1); +ki6t4 = (0.9,1.8,-0.6); +ki7t4 = (-0.4,1.8,0.4); +ki8t4 = (-0.4,0.3,-0.2); +ki9t4 = (0.3,-6.0,0.1); +ki10t4 = (5.7,-5.5,0.6); +ki11t4 = (5.8,0.9,0.6); +ki12t4 = (1.6,1.2,0.4); +ki13t4 = (0.1,1.1,-0.6); +ki14t4 = (-2.4,1.8,0.3); +ki15t4 = (-2.4,0.8,0.3); +ki16t4 = (0.1,0.8,-0.6); +ki17t4 = (1.6,0.8,0.4); +ki18t4 = (5.0,0.8,0.4); + +ki0t5 = (-6.6,2,0.3); +ki1t5 = (-5.3,1.5,0.0); +ki2t5 = (-2.3,1.0,-0.4); +ki3t5 = (-0.5,0.6,0.8); +ki4t5 = (0.3,-0.2,-0.4); +ki5t5 = (0.9,-0.2,-1.1); +ki6t5 = (0.9,1.8,-0.6); +ki7t5 = (-0.4,1.8,0.4); +ki8t5 = (-0.4,0.3,-0.2); +ki9t5 = (0.3,-6.0,0.1); +ki10t5 = (5.7,-5.5,0.6); +ki11t5 = (5.8,0.9,0.6); +ki12t5 = (1.6,1.2,0.4); +ki13t5 = (0.1,1.1,-0.6); +ki14t5 = (-2.4,1.3,0.3); +ki15t5 = (-2.4,0.8,0.3); +ki16t5 = (0.1,0.8,-0.6); +ki17t5 = (1.6,0.8,0.4); +ki18t5 = (5.0,0.8,0.4); + + +% Hermite polynomials + +vardef Pne( expr pr ) = ( (2*pr-3)*(pr**2)+1 ) enddef; +vardef Pwo( expr pr ) = ( (3-2*pr)*(pr**2) ) enddef; +vardef Tne( expr pr ) = ( pr*(pr*(pr-2)+1) ) enddef; +vardef Two( expr pr ) = ( (pr-1)*(pr**2) ) enddef; + +% Derivatives + +vardef Pone( expr pr ) = ( 6*pr*(pr-1) ) enddef; +vardef Ptwo( expr pr ) = ( 6*pr*(1-pr) ) enddef; +vardef Tone( expr pr ) = ( pr*(3*pr-4)+1 ) enddef; +vardef Ttwo( expr pr ) = ( pr*(3*pr-2) ) enddef; + +vardef Wei( expr pre, nex ) = + ( 0.5*( nex - pre ) ) +enddef; + +vardef Hermite( expr pr, zer, one, two, thr ) = + ( Pne(pr)*one+Pwo(pr)*two+Tne(pr)*Wei(zer,two)+Two(pr)*Wei(one,thr) ) +enddef; + +vardef HermiteRate( expr pr, zer, one, two, thr ) = + ( Pone(pr)*one+Ptwo(pr)*two+Tone(pr)*Wei(zer,two)+Ttwo(pr)*Wei(one,thr) ) +enddef; + +vardef RopeThisWay( expr Sens, Istart, Bnum )( text KP ) = + numeric pstep, p, ap, bray; + numeric istart, ifinis, thfac, vhfac, sf; + color actp, newpoi; + pstep = 0.002; + bray = 0.12; + thfac = 15.5; + vhfac = 0.8; + if Sens: sf = 1; else: sf = -1; fi; + istart = Istart; + ifinis = Istart+sf; + ap := 0; + forever: + ap := ap+pstep; + actp := Hermite(ap,KP[istart-sf],KP[istart],KP[ifinis],KP[ifinis+sf]); + exitif conorm(actp-KP[istart])>bray; + endfor; + getready("signalvertex(" + & cstr(actp) + & "," & decimal(thfac) + & ",(0,0,0));signalvertex(" + & cstr(actp) + & "," & decimal(thfac*vhfac) + & ",(1,1,1));", actp); + p = 1; + forever: + ap := ap+pstep; + if ap>1: + ap := ap-1; + istart := ifinis; + ifinis := istart+sf; + fi; + exitif (ifinis>inum-1) or (p>Bnum) or (ifinis<1); + newpoi := Hermite(ap,KP[istart-sf],KP[istart],KP[ifinis],KP[ifinis+sf]); + if conorm(newpoi-actp)>2*bray: + actp := newpoi; + getready("signalvertex(" + & cstr(actp) + & "," & decimal(thfac) + & ",(0,0,0));signalvertex(" + & cstr(actp) + & "," & decimal(thfac*vhfac) + & ",(1,1,1));", actp); + p := incr( p ); + fi; + endfor; +enddef; + +def RopeBothWays( expr Icen, Tnum )( text VKP ) = + begingroup + save bnumpos, bnumneg; + numeric bnumpos, bnumneg; + bnumpos = floor(Tnum*(inum-Icen)/inum); + bnumneg = Tnum-bnumpos; + RopeThisWay( true, Icen, bnumpos, VKP ); + RopeThisWay( false, Icen, bnumneg, VKP ) + endgroup +enddef; + +beginfig(1); + MalcomX := false; + numeric i, a, b, c, d, rate, ratenorm, counter; + cmykcolor ca, cb, cc, cd, aux; + color kp[]; + frame = 0; + keytime = 0; + counter = 0; + forever: + a := keytime-1; + if a<0: a := 0; fi; + b := keytime; + c := keytime+1; + d := keytime+2; + if d>knum: d := knum; fi; + ratenorm := 0; + for i=0 upto inum: + ca := makecmyk( ki[i]t[a], a ); + cb := makecmyk( ki[i]t[b], b ); + cc := makecmyk( ki[i]t[c], c ); + cd := makecmyk( ki[i]t[d], d ); + aux := HermiteRate( frame, ca, cb, cc, cd ); + rate := cmyknorm( aux ); + if rate>ratenorm: ratenorm := rate; fi; + endfor; + frame := frame + W( aux )*maxtetradimstep/ratenorm; + if frame>1: + frame := frame-1; + keytime := keytime+1; + fi; + exitif (keytime>knum-1) or (keytime+frame>atime); + endfor; + a := keytime-1; + if a<0: a := 0; fi; + b := keytime; + c := keytime+1; + d := keytime+2; + if d>knum: d := knum; fi; + for i=0 upto inum: + kp[i] := Hermite( frame, ki[i]t[a], ki[i]t[b], ki[i]t[c], ki[i]t[d] ); + endfor; +% counter := incr( counter ); +% beginfig(counter); + setthearena( 15, 14 ); + RopeBothWays( icen, bnum, kp ); + doitnow; +% endfig; + endfig; + +verbatimtex +\end{document} +etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp b/Master/texmf-dist/doc/metapost/featpost/example/cone.mp index 883f01ff625..96722d0c003 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/cone.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/cone.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + verbatimtex \documentclass{article}\begin{document}{\sffamily etex beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp b/Master/texmf-dist/doc/metapost/featpost/example/conegetready.mp index 17e7fea51b3..f0669633318 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/conegetready.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/conegetready.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric radiusin, fac, i, xcoor, ycoor, radc, numc, baz; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp b/Master/texmf-dist/doc/metapost/featpost/example/conicurv.mp index 15aea824d14..937226a702b 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/conicurv.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/conicurv.mp @@ -1,8 +1,8 @@ % conicurv.mp % L. Nobre G. -% Y2K +% Y2K, 2008 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} @@ -17,7 +17,7 @@ beginfig(1); Spread := 30; numeric shortradius, longradius, theta, width, height; numeric updiff, refsize, vecsize, anglar, bord, totup; - color rn, fa, fc, pg, centre, speed, refx, refy; + color rn, fa, fc, pg, centre, speed, refx, refy, refz, refY, refX; color iplow, iphig, oplow,ophig, anglebase, central, refo; color eplow, ephig, aplow,aphig, anglebase, central, refo; theta = 30; @@ -46,6 +46,9 @@ beginfig(1); refo = (0,0.5*Y(centre),Z(centre)); refx = refsize*(0,cosd(theta),sind(theta)); refy = refsize*(0,-sind(theta),cosd(theta)); + refz = refsize*(1,0,0); + refX = refsize*green; + refY = refsize*blue; % anglinen( iplow, oplow, (0,0,0), shortradius, "", 0 ); % anglinen( iphig, ophig, (0,0,updiff), longradius, "", 0 ); angline(iphig,anglebase,iplow,width/anglar,btex $\theta$ etex,rt); @@ -64,8 +67,14 @@ beginfig(1); --rp((0,longradius+bord,totup))--rp((0,0,totup))--cycle; drawarrow rp(refo)..rp(refo+refy); drawarrow rp(refo)..rp(refo+refx); + drawarrow rp(black)..rp(refX); + drawarrow rp(black)..rp(refY); + drawarrow rp(refo)..rp(refo+refz); label.llft(btex $y$ etex, rp(refo+refy)); label.lrt(btex $x$ etex, rp(refo+refx)); + label.lft(btex $Y$ etex, rp(refY)); + label.bot(btex $X$ etex, rp(refX)); + label.llft(btex $z$ etex, rp(refo+refz)); rn = centre+vecsize*refy; fa = centre+vecsize*refx; fc = centre+vecsize*(0,1,0); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/crossingline.mp b/Master/texmf-dist/doc/metapost/featpost/example/crossingline.mp new file mode 100644 index 00000000000..422422c277a --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/crossingline.mp @@ -0,0 +1,112 @@ +% crossingline.mp +% L. Nobre G. +% 2007 + +input featpost3Dplus2D; + +prologues := 1; + +beginfig(3); +path foi, mar, foimar; +foi= +(-2.09207,0)..controls (-0.8113,1.52635) and (0.46948,3.05269) + ..(1.75026,4.57904)..controls (16.50494,-7.80182) and (31.25961,-20.18265) + ..(46.01431,-32.5635)..controls (47.72202,-30.52838) and (49.42972,-28.49324) + ..(51.13742,-26.45813)..controls (36.38272,-14.07727) and (21.62805,-1.69644) + ..(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.17989,4.26926) and (-4.63599,2.13463) + ..cycle; +mar = +(0,-12.55302)..controls (-0.6404,-11.78986) and (-1.28078,-11.02667) + ..(-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 (28.64638,-44.3316) and (76.49767,8.8977) + ..(12.84161,37.23851)..controls (64.17233,7.60352) and (23.4439,-32.40083) + ..(3.05269,-9.99147)..controls (2.03513,-10.84532) and (1.01756,-11.69917) + ..cycle; +foimar = crossingline( mar, foi, 0.001 ); +draw foimar; +show foimar; +endfig; + +beginfig(2); + 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; + pen penpoint, pendot; + path togetp; + 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; + penpoint = pencircle scaled 0.5u; + pendot = pencircle scaled u; + 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; + draw ba; + draw horns; + drawarrow subpath (0,1) of ba withpen pendot withcolor red; + drawarrow subpath (0,1) of horns withpen pendot withcolor red; + togetp = crossingline( ba, horns, 0.001 ); + draw togetp withpen penpoint; + show togetp; +endfig; + +beginfig(1); + numeric u, oray, odev, nl, circrot, i; + pair vect; + u = 1cm; + oray = 1.1u; + odev = 0.4*oray; + nl = 5; + vect = (oray,0); + circrot = -90; +% circrot = -180/nl; + path outerp, innerp, togetp; + innerp = fullcircle scaled 2u rotated circrot shifted vect; + outerp = for i=0 upto nl-1: + (oray-odev)*dir(i*360/nl){dir(i*360/nl+90)}... + (oray+odev)*dir((i+0.5)*360/nl){dir((i+0.5)*360/nl+90)}... + endfor cycle; + togetp = crossingline( outerp, innerp, 0.001 ); + fill togetp; + draw outerp withcolor red withpen pencircle scaled 1.2pt; + drawarrow subpath (0,1) of outerp + withcolor green withpen pencircle scaled 0.7pt; + draw innerp withcolor blue; + draw point 0 of innerp withcolor green withpen pencircle scaled 1pt; +endfig; +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp b/Master/texmf-dist/doc/metapost/featpost/example/cubicfacecentered.mp index ac359c3ddf2..cd252c4f021 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfacecentered.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/cubicfacecentered.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; % verbatimtex % \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp b/Master/texmf-dist/doc/metapost/featpost/example/cubicfigures.mp index 93aebeb28a0..b39088c1833 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/cubicfigures.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/cubicfigures.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := ( 1.2 , 2.0 , 1.6 ); Spread := 75; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cubicstructurefcc.mp b/Master/texmf-dist/doc/metapost/featpost/example/cubicstructurefcc.mp new file mode 100644 index 00000000000..28cabe25f0e --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/cubicstructurefcc.mp @@ -0,0 +1,64 @@ +% cubicstructurefcc.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +prologues := 1; + +f := 2*(5,3,3.5); +Spread := 20; + +beginfig(1); + color Ve[], va, vb, vc, vu; + numeric i, j, k, e[]p[]; + string comm, comn, como, a, b; + Ve1 = (2,1,-1); + Ve2 = (0,1,-1); + Ve3 = (-2,1,-1); + Ve4 = (-2,-1,-1); + Ve5 = (0,-1,-1); + Ve6 = (2,-1,-1); + Ve7 = (1,1,0); + Ve8 = (-1,1,0); + Ve9 = (-2,0,0); + Ve10 = (-1,-1,0); + Ve11 = (1,-1,0); + Ve12 = (2,0,0); + Ve13 = (2,1,1); + Ve14 = (0,1,1); + Ve15 = (-2,1,1); + Ve16 = (-2,-1,1); + Ve17 = (0,-1,1); + Ve18 = (2,-1,1); + Ve19 = (1,0,1); + Ve20 = (0,0,0); + Ve21 = (-1,0,1); + Ve22 = (1,0,-1); + Ve23 = (-1,0,-1); + for i=1 upto 23: + comm := "unfill rigorousfearpath(" & cstr(Ve[i]) & ",0.08);"; + comn := "draw rigorousfearpath(" & cstr(Ve[i]) & ",0.08);"; + getready( comm & comn, Ve[i] ); + endfor; + e1p1 = 1; e2p1 = 2; e3p1 = 3; e4p1 = 4; e5p1 = 5; e6p1 = 6; + e1p2 = 2; e2p2 = 3; e3p2 = 4; e4p2 = 5; e5p2 = 6; e6p2 = 1; + e7p1 = 13; e8p1 = 14; e9p1 = 15; e10p1 = 16; e11p1 = 17; e12p1 = 18; + e7p2 = 14; e8p2 = 15; e9p2 = 16; e10p2 = 17; e11p2 = 18; e12p2 = 13; + e13p1 = 1; e14p1 = 2; e15p1 = 3; e16p1 = 4; e17p1 = 5; e18p1 = 6; + e13p2 = 13; e14p2 = 14; e15p2 = 15; e16p2 = 16; e17p2 = 17; e18p2 = 18; + e19p1 = 2; e19p2 = 5; e20p1 = 14; e20p2 = 17; + for i=1 upto 20: + vc := Ve[e[i]p2]-Ve[e[i]p1]; + vu := N(vc); + va := Ve[e[i]p1]+0.2*vu; + vb := Ve[e[i]p2]-0.2*vu; + a := cstr( va ); + b := cstr( vb-va ); + comm := "rigorousdisc( 0, true," & a & ",0.08," & b & ");"; + getready( comm, 0.5[va,vb] ); + endfor; + doitnow; +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/cubicstructures.mp b/Master/texmf-dist/doc/metapost/featpost/example/cubicstructures.mp new file mode 100644 index 00000000000..86cc649f574 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/cubicstructures.mp @@ -0,0 +1,410 @@ +% cubicstructures.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +prologues := 1; + +f := 2*(5,3,3.5); +Spread := 20; + +beginfig(1); + numeric csr, ind; + color xv, yv, zv, Ve[]; + path p[]; + csr := sqrt(3)*0.5; + xv := (csr,0,0); + yv := (0,csr,0); + zv := (0,0,csr); + Ve1 := (-1,-1,-1); + Ve2 := (-1,1,-1); + Ve3 := (1,-1,-1); + Ve4 := (1,1,-1); + Ve5 := (-1,-1,1); + Ve6 := (-1,1,1); + Ve7 := (1,-1,1); + Ve8 := (1,1,1); + Ve9 := (0,0,0); + for ind=1 upto 9: + p[ind] := rigorousfearpath( Ve[ind], csr ); + endfor; + unfill p1; + draw p1; + draw rp(Ve1+yv)--rp(Ve2-yv); + draw rp(Ve1+xv)--rp(Ve3-xv); + unfill p2; + draw p2; + draw rp(Ve1+zv)--rp(Ve5-zv); + unfill p5; + draw p5; + draw rp(Ve5+yv)--rp(Ve6-yv); + draw rp(Ve5+xv)--rp(Ve7-xv); + unfill p9; + draw p9; + unfill p3; + draw p3; + draw rp(Ve4-yv)--rp(Ve3+yv); + draw rp(Ve4-xv)--rp(Ve2+xv); + unfill p4; + draw p4; + draw rp(Ve2+zv)--rp(Ve6-zv); + draw rp(Ve3+zv)--rp(Ve7-zv); + draw rp(Ve4+zv)--rp(Ve8-zv); + unfill p6; + draw p6; + unfill p7; + draw p7; + draw rp(Ve8-yv)--rp(Ve7+yv); + draw rp(Ve8-xv)--rp(Ve6+xv); + unfill p8; + draw p8; +endfig; + +beginfig(2); + numeric csr, ind; + color xv, yv, zv, Ve[]; + path p[]; + csr := 1; + xv := (csr,0,0); + yv := (0,csr,0); + zv := (0,0,csr); + Ve1 := (-1,-1,-1); + Ve2 := (-1,1,-1); + Ve3 := (1,-1,-1); + Ve4 := (1,1,-1); + Ve5 := (-1,-1,1); + Ve6 := (-1,1,1); + Ve7 := (1,-1,1); + Ve8 := (1,1,1); + for ind=1 upto 8: + p[ind] := rigorousfearpath( Ve[ind], csr ); + endfor; + unfill p1; + draw p1; + draw rp(Ve1+yv)--rp(Ve2-yv); + draw rp(Ve1+xv)--rp(Ve3-xv); + unfill p2; + draw p2; + draw rp(Ve1+zv)--rp(Ve5-zv); + unfill p5; + draw p5; + draw rp(Ve5+yv)--rp(Ve6-yv); + draw rp(Ve5+xv)--rp(Ve7-xv); + unfill p3; + draw p3; + draw rp(Ve4-yv)--rp(Ve3+yv); + draw rp(Ve4-xv)--rp(Ve2+xv); + unfill p4; + draw p4; + draw rp(Ve2+zv)--rp(Ve6-zv); + draw rp(Ve3+zv)--rp(Ve7-zv); + draw rp(Ve4+zv)--rp(Ve8-zv); + unfill p6; + draw p6; + unfill p7; + draw p7; + draw rp(Ve8-yv)--rp(Ve7+yv); + draw rp(Ve8-xv)--rp(Ve6+xv); + unfill p8; + draw p8; +endfig; + +beginfig(3); + numeric csr, ind; + color xv, yv, zv, Ve[]; + path p[]; + csr := sqrt(2)*0.5; + xv := (csr,0,0); + yv := (0,csr,0); + zv := (0,0,csr); + Ve1 := (-1,-1,-1); + Ve2 := (-1,1,-1); + Ve3 := (1,-1,-1); + Ve4 := (1,1,-1); + Ve5 := (-1,-1,1); + Ve6 := (-1,1,1); + Ve7 := (1,-1,1); + Ve8 := (1,1,1); + Ve9 := (-1,0,0); + Ve10 := (0,0,-1); + Ve11 := (0,0,1); + Ve12 := (0,1,0); + Ve13 := (0,-1,0); + Ve14 := (1,0,0); + for ind=1 upto 14: + p[ind] := rigorousfearpath( Ve[ind], csr ); + endfor; + unfill p1; + draw p1; + draw rp(Ve1+yv)--rp(Ve2-yv); + draw rp(Ve1+xv)--rp(Ve3-xv); + unfill p2; + draw p2; + draw rp(Ve1+zv)--rp(Ve5-zv); + unfill p9; + draw p9; + unfill p5; + draw p5; + draw rp(Ve2+zv)--rp(Ve6-zv); + draw rp(Ve5+yv)--rp(Ve6-yv); + unfill p6; + draw p6; + unfill p10; + draw p10; + draw rp(Ve5+xv)--rp(Ve7-xv); + unfill p13; + draw p13; + unfill p3; + draw p3; + draw rp(Ve4-yv)--rp(Ve3+yv); + draw rp(Ve4-xv)--rp(Ve2+xv); + unfill p4; + draw p4; + unfill p11; + draw p11; + draw rp(Ve3+zv)--rp(Ve7-zv); + unfill p12; + draw p12; + unfill p14; + draw p14; + unfill p7; + draw p7; + draw rp(Ve8-yv)--rp(Ve7+yv); + draw rp(Ve8-xv)--rp(Ve6+xv); + draw rp(Ve4+zv)--rp(Ve8-zv); + unfill p8; + draw p8; +endfig; + +beginfig(4); + numeric csr, ind; + color xv, yv, zv, Ve[]; + path p[]; + csr := 0.21; + xv := (csr,0,0); + yv := (0,csr,0); + zv := (0,0,csr); + Ve1 := (-1,-1,-1); + Ve2 := (-1,1,-1); + Ve3 := (1,-1,-1); + Ve4 := (1,1,-1); + Ve5 := (-1,-1,1); + Ve6 := (-1,1,1); + Ve7 := (1,-1,1); + Ve8 := (1,1,1); + Ve21:= (0,0,0); + Ve9 := (-1,-0.5,0); Ve15 := (-1,0.5,0); + Ve10 := (-0.5,0,-1);Ve16 := (0.5,0,-1); + Ve11 := (-0.5,0,1); Ve17 := (0.5,0,1); + Ve12 := (0,1,-0.5); Ve18 := (0,1,0.5); + Ve13 := (0,-1,-0.5);Ve19 := (0,-1,0.5); + Ve14 := (1,-0.5,0); Ve20 := (1,0.5,0); + for ind=1 upto 21: + p[ind] := rigorousfearpath( Ve[ind], csr ); + endfor; + unfill p1; + draw p1; + draw rp(Ve1+yv)--rp(Ve2-yv); + draw rp(Ve1+xv)--rp(Ve3-xv); + unfill p2; + draw p2; + draw rp(Ve1+zv)--rp(Ve5-zv); + unfill p9; + draw p9; + draw rp(Ve9+yv)--rp(Ve15-yv); + unfill p15; + draw p15; + unfill p5; + draw p5; + draw rp(Ve2+zv)--rp(Ve6-zv); + draw rp(Ve5+yv)--rp(Ve6-yv); + unfill p6; + draw p6; + unfill p10; + draw p10; + draw rp(Ve10+xv)--rp(Ve16-xv); + unfill p16; + draw p16; + draw rp(Ve5+xv)--rp(Ve7-xv); + unfill p13; + draw p13; + draw rp(Ve13+zv)--rp(Ve19-zv); + unfill p19; + draw p19; + unfill p21; + draw p21; + unfill p3; + draw p3; + draw rp(Ve4-yv)--rp(Ve3+yv); + draw rp(Ve4-xv)--rp(Ve2+xv); + unfill p4; + draw p4; + unfill p11; + draw p11; + draw rp(Ve11+xv)--rp(Ve17-xv); + unfill p17; + draw p17; + draw rp(Ve3+zv)--rp(Ve7-zv); + unfill p12; + draw p12; + draw rp(Ve12+zv)--rp(Ve18-zv); + unfill p18; + draw p18; + unfill p14; + draw p14; + draw rp(Ve14+yv)--rp(Ve20-yv); + unfill p20; + draw p20; + unfill p7; + draw p7; + draw rp(Ve8-yv)--rp(Ve7+yv); + draw rp(Ve8-xv)--rp(Ve6+xv); + draw rp(Ve4+zv)--rp(Ve8-zv); + unfill p8; + draw p8; +endfig; + +beginfig(5); + color Ve[], violet, va, vb, vc, vu; + numeric i, j, k, e[]p[]; + string comm, comn, como, a, b, col[]; + violet = red+blue; + col1 = "violet"; + col2 = "red"; + col3 = "green"; + col4 = "blue"; + Ve1 = (2,1,-1); + Ve2 = (0,1,-1); + Ve3 = (-2,1,-1); + Ve4 = (-2,-1,-1); + Ve5 = (0,-1,-1); + Ve6 = (2,-1,-1); + Ve7 = (1,1,0); + Ve8 = (-1,1,0); + Ve9 = (-2,0,0); + Ve10 = (-1,-1,0); + Ve11 = (1,-1,0); + Ve12 = (2,0,0); + Ve13 = (2,1,1); + Ve14 = (0,1,1); + Ve15 = (-2,1,1); + Ve16 = (-2,-1,1); + Ve17 = (0,-1,1); + Ve18 = (2,-1,1); + Ve19 = (1,0,1); + Ve20 = (0,0,0); + Ve21 = (-1,0,1); + Ve22 = (1,0,-1); + Ve23 = (-1,0,-1); + for i=1 upto 23: + comm := "unfill rigorousfearpath(" & cstr(Ve[i]) & ",0.08);"; + comn := "draw rigorousfearpath(" & cstr(Ve[i]) & ",0.08);"; + getready( comm & comn, Ve[i] ); + endfor; + e1p1 = 1; e2p1 = 2; e3p1 = 3; e4p1 = 4; e5p1 = 5; e6p1 = 6; + e1p2 = 2; e2p2 = 3; e3p2 = 4; e4p2 = 5; e5p2 = 6; e6p2 = 1; + e7p1 = 13; e8p1 = 14; e9p1 = 15; e10p1 = 16; e11p1 = 17; e12p1 = 18; + e7p2 = 14; e8p2 = 15; e9p2 = 16; e10p2 = 17; e11p2 = 18; e12p2 = 13; + e13p1 = 1; e14p1 = 2; e15p1 = 3; e16p1 = 4; e17p1 = 5; e18p1 = 6; + e13p2 = 13; e14p2 = 14; e15p2 = 15; e16p2 = 16; e17p2 = 17; e18p2 = 18; + e19p1 = 2; e19p2 = 5; e20p1 = 14; e20p2 = 17; + e101p1 = 22; e201p1 = 10; e301p1 = 5; e401p1 = 5; + e101p2 = 2; e201p2 = 17; e301p2 = 23; e401p2 = 22; + e102p1 = 2; e202p1 = 17; e302p1 = 23; e402p1 = 22; + e102p2 = 8; e202p2 = 19; e302p2 = 8; e402p2 = 7; + e103p1 = 8; e203p1 = 19; e303p1 = 8; e403p1 = 7; + e103p2 = 21; e203p2 = 7; e303p2 = 14; e403p2 = 14; + e104p1 = 21; e204p1 = 7; e304p1 = 14; e404p1 = 14; + e104p2 = 17; e204p2 = 2; e304p2 = 19; e404p2 = 21; + e105p1 = 17; e205p1 = 2; e305p1 = 19; e405p1 = 21; + e105p2 = 11; e205p2 = 23; e305p2 = 11; e405p2 = 10; + e106p1 = 11; e206p1 = 23; e306p1 = 11; e406p1 = 10; + e106p2 = 22; e206p2 = 10; e306p2 = 5; e406p2 = 5; + for i=1 upto 20: + vc := Ve[e[i]p2]-Ve[e[i]p1]; + vu := N(vc); + va := Ve[e[i]p1]+0.2*vu; + vb := Ve[e[i]p2]-0.2*vu; + a := cstr( va ); + b := cstr( vb-va ); + comm := "rigorousdisc( 0, true," & a & ",0.08," & b & ");"; + getready( comm, 0.5[va,vb] ); + endfor; + for j=1 upto 4: + for i=1 upto 6: + k := 100*j+i; + vc := Ve[e[k]p2]-Ve[e[k]p1]; + vu := N(vc); + va := Ve[e[k]p1]+0.2*vu; + vb := Ve[e[k]p2]-0.2*vu; + a := cstr( va ); + b := cstr( vb-va ); + comm := "rigorousdisc( 0, true," & a & ",0.08," & b & ");"; + comn := "drawoptions( withcolor " & col[j] & " );"; + como := "drawoptions();"; + getready( comn & comm & como, 0.5[va,vb] ); + endfor; + endfor; + doitnow; +endfig; + +Nobjects := 0; + +beginfig(6); + numeric i, j, k, c, Mx, My, Mz, is; + string comm, comn, this; + boolean jisodd, kisodd; + color there, ref, aux, Ve[]; + path pa, pb, pc, pd; + Mx = 3; + My = 3; + Mz = 3; + kisodd = false; + c = 0.5*sqrt(2); + ref = -0.5*c*(Mx,My,Mz); + aux = ref-0.5*(1,1,1); + Ve0 = aux; + Ve1 = (-X(aux),Y(aux),Z(aux)); + Ve2 = (X(aux),-Y(aux),Z(aux)); + Ve3 = (X(aux),Y(aux),-Z(aux)); + Ve4 = (X(aux),-Y(aux),-Z(aux)); + Ve5 = (-X(aux),Y(aux),-Z(aux)); + Ve6 = (-X(aux),-Y(aux),Z(aux)); + Ve7 = (-X(aux),-Y(aux),-Z(aux)); + pa = rp(Ve0)--rp(Ve1)--rp(Ve6)--rp(Ve2)--cycle; + pb = rp(Ve0)--rp(Ve2)--rp(Ve4)--rp(Ve3)--cycle; + pc = rp(Ve0)--rp(Ve3)--rp(Ve5)--rp(Ve1)--cycle; + pd = rp(Ve7)--rp(Ve4)--rp(Ve2)--rp(Ve6)--cycle; + unfill pa; draw pa; + unfill pb; draw pb; + unfill pc; draw pc; + for k=0 upto Mz: + if kisodd: + jisodd := true; + else: + jisodd := false; + fi; + for j=0 upto My: + if jisodd: + is := 1; + else: + is := 0; + fi; + for i=is step 2 until Mx: + there := c*(i,j,k)+ref; + this := "rigorousfearpath(" & cstr(there); + comm := "unfill " & this & ",0.5);"; + comn := "draw " & this & ",0.5);"; + getready( comm & comn, there ); + endfor; + jisodd := not jisodd; + endfor; + kisodd := not kisodd; + endfor; + doitnow; + unfill pd; draw pd; +endfig; + +end; + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp b/Master/texmf-dist/doc/metapost/featpost/example/cylimple.mp index bef31891c97..973b5f32aa4 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/cylimple.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/cylimple.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; SphericalDistortion := true; f := 0.3*(5,4,2); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/daliasensor.mp b/Master/texmf-dist/doc/metapost/featpost/example/daliasensor.mp new file mode 100644 index 00000000000..ef7a7900833 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/daliasensor.mp @@ -0,0 +1,70 @@ +%jose samuel perez huerta +%mayo 2007 +%paladium lattice in hydrogen + +input featpost3Dplus2D; + +% Under the adsorption process, +% the hydrogen molecules are retained in the surface of the +% metal forming a gaseous layer. Nevertheless, the hydrogen molecule is +% too great to get up in the structure of a solid. When the amount of +% hydrogen is increased, the palladium dissociates molecules of the gas +% so that now in its atomic form, they are diffused between the +% interstitial sites of lattice formation of palladium hydrides In this +% process, the lattice undergoes to isotropic expansion, lattice +% constant is increased until a 3\% in each space direction, increasing +% the total volume until in a 10\% + +beginfig(1); + numeric sph, sphc, ind, indos, suma, intres, i, j, coos, size, num; + color xdelta, ydelta, zdelta, W[], fro, pro; + path p[], pp[], ppp, pppp; + f := 1.5*(10,5,3); +% ParallelProj := true; + Spread := 50; + sph := 0.15; + sphc := 0.07; + size = 6; + num=200;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + xdelta := (sph,0,0); + ydelta := (0,sph,0); + zdelta := (0,0,sph); + suma:=0; + for ind=1 upto 3: + for indos=1 upto 10: + for intres=1 upto 10: + suma:=suma+1; + V[suma] :=0.5*(indos,intres,ind); + W[suma] :=0.5*((indos-1,intres-1,ind-1)+0.5*(1,1,1)); + endfor; + endfor; + endfor; + + for ind=1 upto suma: + p[ind] := rigorousfearpath( V[ind], sph ); + pp[ind] := rigorousfearpath( W[ind], sphc ); + endfor; + + for ind=1 upto suma: + fill pp[ind] withcolor red; + draw pp[ind] withcolor black; + fill p[ind] withcolor .75white; + draw p[ind] withcolor blue; + endfor; +%%%%%%%%%%%%%%%%%%%%%% + for i=1 upto num: + for j=1 upto 2: + coos[j] := 1.7*uniformdeviate(size*.5); + endfor; + fro := (coos1,coos2, 4*(.5)+(.3)*normaldeviate); + pro := fro+(0,sph,0); + ppp := rigorousfearpath( fro, sphc); + pppp := rigorousfearpath( pro, sphc); + fill ppp withcolor red; + draw ppp withcolor (.5,.4,0); + fill pppp withcolor red; + draw pppp withcolor black; + endfor; +%%%%%%%%%%%%%%%%%%%%%%%% +endfig; +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/deperspective.mp b/Master/texmf-dist/doc/metapost/featpost/example/deperspective.mp new file mode 100644 index 00000000000..aaf486f9fd7 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/deperspective.mp @@ -0,0 +1,94 @@ +% deperspective.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +defaultscale := 1.5; + +verbatimtex \documentclass{article}\begin{document} etex + +numeric cont, cmax; +cmax = 4; +color focus[]; +focus1 = (5, 3.5,1); +focus2 = 0.4*(5, 3.5,3); +focus3 = 0.4*(5, 1.5,1.5); +focus4 = 0.4*(2.5,5, 1.5); +for cont= 1 upto cmax: + f := focus[cont]; + beginfig(cont); + numeric gridnum, axesmarg, xlen, ylen; + gridnum = 15; + axesmarg = 0.5; + xlen = 1.0; + ylen = 1.5; + cartaxes(xlen+axesmarg,ylen+axesmarg,1); + color va, vb, vc, vd; + + va = ( 0, 0,0); + vb = ( 0,ylen,0); + vc = (xlen,ylen,0); + vd = (xlen, 0,0); + + z3 = rp(va); + z4 = rp(vb); + z5 = rp(vc); + z6 = rp(vd); + + draw z3--z4--z5--z6--cycle dashed evenly; + z1 = whatever[z3,z4]; + z1 = whatever[z6,z5]; + z2 = whatever[z6,z3]; + z2 = whatever[z5,z4]; + draw z1--z3 dashed evenly; + draw z1--z6 dashed evenly; + draw z2--z3 dashed evenly; + draw z2--z4 dashed evenly; + + numeric aonei, atwoi, bonei, btwoi, conei, ctwoi, donei, dtwoi; + aonei = 1/abs(z3-z1); + atwoi = 1/abs(z3-z2); + bonei = 1/abs(z4-z1); + btwoi = 1/abs(z4-z2); + conei = 1/abs(z5-z1); + ctwoi = 1/abs(z5-z2); + donei = 1/abs(z6-z1); + dtwoi = 1/abs(z6-z2); + + numeric aone, atwo, bone, btwo, cone, ctwo, done, dtwo; + aone = abs(z3-z1); + atwo = abs(z3-z2); + bone = abs(z4-z1); + btwo = abs(z4-z2); + cone = abs(z5-z1); + ctwo = abs(z5-z2); + done = abs(z6-z1); + dtwo = abs(z6-z2); + + numeric i, wei, aux, good; + for i=0 upto gridnum-1: + wei := (0.5+i)/gridnum; + draw z1--rp(wei[vb,vc]) withcolor red; + draw z2--rp(wei[vd,vc]) withcolor red; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The following lines +%%%%%%%%%%%%%%%%%%%%%% show how rounding error can destroy accuracy! +% aux := dtwoi/((1-wei)*atwoi+wei*dtwoi); +% good := dtwoi/(atwoi+wei*(dtwoi-atwoi)); +% show (aux,good); +% draw z1--(good[z2,z6]); +% draw z2--((bonei/((1-wei)*aonei+wei*bonei))[z1,z4]); + draw z1--((1/((1-wei)*abs(z6-z2)/abs(z3-z2)+wei))[z2,z6]) withcolor blue; + draw z2--((1/((1-wei)*abs(z4-z1)/abs(z3-z1)+wei))[z1,z4]) withcolor blue; + endfor; + labels.top(1,2,3,4,5,6); + show ((atwo/dtwo)*(ctwo/btwo),(aone/bone)*(cone/done)); +%show ylen/xlen-(bonei-aonei)/(dtwoi-atwoi); +%show (abs(z2-z6)/abs(z1-z4))*(abs(z1-z4)-abs(z1-z3))/(abs(z2-z6)-abs(z2-z3)); +%show sqrt(abs(z3-z4))*sqrt(abs(z5-z6))/(sqrt(abs(z6-z3))*sqrt(abs(z5-z4))); + endfig; +endfor; + +verbatimtex \end{document} etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp b/Master/texmf-dist/doc/metapost/featpost/example/doitnow.mp index 7cfec23a39d..1fe1a420bf6 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/doitnow.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/doitnow.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 1.5*(1.5,0,1); Spread := 100; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp b/Master/texmf-dist/doc/metapost/featpost/example/downloadicon.mp index 78b9be800e7..d4fa559c686 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/downloadicon.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/downloadicon.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 0.4[(12,3,2),(2,5,6)]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Max: 0.8 Spread := 30; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp b/Master/texmf-dist/doc/metapost/featpost/example/eemcsblabla.mp index cb35011cc44..2641f7bf30d 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/eemcsblabla.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/eemcsblabla.mp @@ -6,6 +6,8 @@ % Hacked by L. Nobre G. % 2004 +input featpost3Dplus2D; + numeric zmax, rmax; zmax = 1; rmax = 1; @@ -273,7 +275,7 @@ PreeditedPath17 = hide(z587=(331.211,-292.211))z587..controls hide(z588=(331.21 numeric k; drawoptions( withcolor blue ); for k = 1 upto 17: - fill closedpathinspace( PreeditedPath[k], converterfunc ); + fill closedpathinspace( PreeditedPath[k], 4, converterfunc ); endfor; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% That's it! diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp b/Master/texmf-dist/doc/metapost/featpost/example/electricpotential.mp index 01caaab0c5e..1bf47c2e013 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/electricpotential.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/electricpotential.mp @@ -4,7 +4,7 @@ % PAY ATTENTION: THESE FIGURES ARE INDEPENDANT. CONDUCTOR SURFACE POTENTIAL % CHANGES UNDER THE INFLUENCE OF EXTERNAL CHARGES. -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 16*(4,1,1); Spread := 35; @@ -144,8 +144,10 @@ beginfig(3); hexagonaltrimesh( false, np, ssize, zc ); endfig; -beginfig(4); - hexagonaltrimesh( false, np, ssize, zd ); -endfig; +% Going into "MetaPost capacity exceeded!" +% +%beginfig(4); +% hexagonaltrimesh( false, np, ssize, zd ); +%endfig; end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp b/Master/texmf-dist/doc/metapost/featpost/example/ellipticprism.mp index 6106c980adf..cd24128e025 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/ellipticprism.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/ellipticprism.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + verbatimtex \documentclass{article}\begin{document}{\sffamily etex beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp b/Master/texmf-dist/doc/metapost/featpost/example/embroncordada.mp index ccc08d09d80..f154cf605e6 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/embroncordada.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/embroncordada.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp b/Master/texmf-dist/doc/metapost/featpost/example/emptylines.mp index df8e02695dd..08154ad560a 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/emptylines.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/emptylines.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2001 -%input featpost3Dplus2D; +input featpost3Dplus2D; def closec( expr TheVal ) = diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp b/Master/texmf-dist/doc/metapost/featpost/example/experimental.mp index 106e7574f2a..66bb9ad3500 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/experimental.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/experimental.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; %verbatimtex %\documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp b/Master/texmf-dist/doc/metapost/featpost/example/fakehole.mp index c1d28ea33c1..cd4365d3abc 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/fakehole.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/fakehole.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 23; f := (13,6,4.5); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/fallinthewind.mp b/Master/texmf-dist/doc/metapost/featpost/example/fallinthewind.mp new file mode 100644 index 00000000000..4e54429b3ed --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/fallinthewind.mp @@ -0,0 +1,102 @@ +% fallinthewind.mp +% L. Nobre G. +% 2007 + +input featpost3Dplus2D; + +Spread := 40; +%f := 0.5[0.3*(15,10,5),0.3*(1.5,1,15)]; +f := 1.5*(2.5,1.7,1.5); +viewcentr := (0,0,0.96); +%show f; + +prologues := 1; + +color referencewind; +numeric dragcoeff, horangle, quadcoef; +horangle = 90; +referencewind = red*cosd( horangle ) + green*sind( horangle ); +dragcoef = 0.045; +quadcoef = 0.99; + +def vecfunc( expr posit, veloc )= + begingroup + save heig, wind, field, wint, blow; + color wind, field, blow; + numeric heig, wint; + heig = Z( posit ); + wind = referencewind*quadcoef*(( heig+0.0001 )**2); + wind := wind-veloc; + wint = conorm( wind ); + blow = N( wind ); + field = dragcoef*blow*wint-blue; + ( field ) + endgroup +enddef; + +beginfig(1); + numeric i, numa, sa, ea, diffstep, ray; + color stp, svl, arrbe, arren; + path oneline; + pen grossa, fina; + arrbe = (0,-5,1); + arren = (0,-3,1); + TDAtiplen := 0.5; + TDAhalftipbase := 0.2; + TDAhalfthick := 0.1; + grossa = pencircle scaled 3pt; + fina = pencircle scaled 2pt; + diffstep = 0.03; + ray = 2.2; +% numa = 0.02; +% sa = 106.4; +% ea = 106.6; + numa = 2; + sa = 80.5; + ea = 130.5; + setthestage( 20, 10 ); + for i=sa step numa until ea: + stp := black; + svl := ray*(green*cosd(i)+blue*sind(i)); + oneline := dragtrajectorypath( stp, svl, diffstep, vecfunc ); + draw oneline; +% draw oneline withpen fina withcolor background; + endfor; + tdarrow( arrbe, arren ); + produce_vga_border; +endfig; + +ray := 3.25; +numeric min, rst; +min = 0.5; +rst = 0.1; +for i=min step rst until ray: + %show i; + numeric xa, xb, xc, fa, fb, fc; + xa = 85; + svl := i*(green*cosd(xa)+blue*sind(xa)); + oneline := dragtrajectorypath( black, svl, diffstep, vecfunc ); + fa = PrintStep; + xb = 89; + svl := i*(green*cosd(xb)+blue*sind(xb)); + oneline := dragtrajectorypath( black, svl, diffstep, vecfunc ); + fb = PrintStep; + xc = 0; + forever: + exitif ( abs( fb - fa ) < 0.005 ); + xc := xb - fb*(xb-xa)/(fb-fa); + svl := i*(green*cosd(xc)+blue*sind(xc)); + oneline := dragtrajectorypath( black, svl, diffstep, vecfunc ); + fc := PrintStep; + exitif ( abs( fc - fa ) < 0.0005 ); + xa := xb; + fa := fb; + xb := xc; + fb := fc; + endfor; + message decimal( i ) & " " & decimal( xc ); +endfor; +message " "; + +end. + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp b/Master/texmf-dist/doc/metapost/featpost/example/featpostlogo.mp index 9e68e9899e6..b5304e100da 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/featpostlogo.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/featpostlogo.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp b/Master/texmf-dist/doc/metapost/featpost/example/ffcbob.mp index 3e4eff5a828..36a95734300 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/ffcbob.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/ffcbob.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 2*(15,0,2); Spread := 20; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp b/Master/texmf-dist/doc/metapost/featpost/example/fieldlines.mp index bcb018a0f7f..ca33c92a9a8 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/fieldlines.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/fieldlines.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 30; f := (10,0,0); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp b/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnorma.mp index ca3e1edb9b6..8f6acc8eaaa 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/fieldlinesnorma.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnorma.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 25; f := (10,-2,7); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaper.mp b/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaper.mp new file mode 100644 index 00000000000..85fab7de40e --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaper.mp @@ -0,0 +1,183 @@ +% fieldlinesnormapaper.mp +% L. Nobre G. +% 2009 + +input featpost3Dplus2D; + +Spread := 25; +f := (20,0,0); + +color posa, posb, perpd; +numeric limy, limz, bord; +posa = (0,-3,3); %%%%%%%% allways make Y(posa) < Y(posb) %%%%%%%%%%% +posb = (0,3,-2); %%%%%%%%%%%% never make Y(posa) = Y(posb) %%%%%%%%% +perpd = (1,0,0); +limy = 7; +limz = 5; +bord = 2.5; + +def vecfunc( expr posit )= + begingroup + save field; + color field, horiz, verti, vech, vecv; + numeric modula, modulb, ypos, zpos, hd, hf, vd, vf, zref, yref; + modula = conorm( posit-posa ); + modulb = conorm( posit-posb ); + field = N( ( posit-posa )/(modula**3)-( posit-posb )/(modulb**3) ); + ypos = Y( posit ); + zpos = Z( posit ); + if Z(posa) <> Z(posb): + (ypos,zref) = whatever[(Y(posa),Z(posa)),(Y(posb),Z(posb))]; + (yref,zpos) = whatever[(Y(posa),Z(posa)),(Y(posb),Z(posb))]; + if ( abs(zpos) > limz-bord ): + hd = abs(zpos)-limz+bord; + if ypos < yref: + if zpos > 0: + vech = -green; + else: + vech = green; + fi; + else: + if zpos > 0: + vech = green; + else: + vech = -green; + fi; + fi; + else: + hd = 0; + vech = black; + fi; + else: + zref = Z(posa); + vech = green; + if ( abs(zpos) > limz-bord ): + hd = abs(zpos)-limz+bord; + else: + hd = 0; + fi; + fi; + if ( abs(ypos) > limy-bord ): + vd = abs(ypos)-limy+bord; + if zpos > zref: + if ypos < 0: + vecv = blue; + else: + vecv = -blue; + fi; + else: + if ypos < 0: + vecv = -blue; + else: + vecv = blue; + fi; + fi; + else: + vd = 0; + vecv = black; + fi; + hf = (hd/bord)**2; + vf = (vd/bord)**2; + ( N(field*(0.975-hf)*(0.975-vf)+hf*vech+vf*vecv) ) + endgroup +enddef; + +def potfunc( expr posit )= + begingroup + color field; + field = vecfunc( posit ); + ( ncrossprod( field, perpd ) ) + endgroup +enddef; + +beginfig(1); + numeric i, lena, lenb, numa, numb, sa, sb, diffstep, ray; + numeric j, gridstep, fac; + color stp, grdp, locv; + path oneline; + pen grossa, fina; + grossa = pencircle scaled 3pt; + fina = pencircle scaled 2pt; + lena = 60; + lenb = 40; + numa = 15; + numb = 30; + diffstep = 0.1; + ray = 0.5; + sa = 40; + sb = 5; + fac = 0.275; + gridstep = 0.3; + for i=-limy+0.5*gridstep step gridstep until limy-0.5*gridstep: + for j=-limz+0.5*gridstep step gridstep until limz-0.5*gridstep: + grdp := (0,i,j); + locv := 0.5*fac*vecfunc( grdp ); + drawarrow rp(grdp-locv)--rp(grdp+locv); + endfor; + endfor; + for i=sa step numa until (360-sa): + stp := posa+( 0, ray*cosd(i), ray*sind(i) ); + oneline := fieldlinepath( lena, stp, diffstep, vecfunc ); + draw oneline withpen grossa; + draw oneline withpen fina withcolor background; + endfor; + for i=sb step numb until (360-sb): + stp := posb+( 0, ray*cosd(i), ray*sind(i) ); + oneline := fieldlinepath( lenb, stp, -diffstep, vecfunc ); + draw oneline withpen grossa; + draw oneline withpen fina withcolor background; + endfor; + drawoptions(withpen grossa); + draw rp(posa); + draw rp(posb); + draw rp((0,-limy,-limz))--rp((0, limy,-limz))-- + rp((0, limy, limz))--rp((0,-limy, limz))--cycle; + drawoptions(); +endfig; + +beginfig(2); + numeric i, lena, numa, diffstep, fac, gridstep, margnum; + color stp, grdp, locv; + path oneline, twoline, bordeline; + pen grossa, fina; + grossa = pencircle scaled 3pt; + fina = pencircle scaled 2pt; + lena = 85; + numa = 13; + margnum = 2; + diffstep = 0.2; + fac = 0.275; + gridstep = 0.3; + for i=-limy+0.5*gridstep step gridstep until limy-0.5*gridstep: + for j=-limz+0.5*gridstep step gridstep until limz-0.5*gridstep: + grdp := (0,i,j); + locv := 0.5*fac*potfunc( grdp ); + drawarrow rp(grdp-locv)--rp(grdp+locv); + endfor; + endfor; + for i=margnum upto numa-margnum: + stp := (i/numa)[posa,posb]; + oneline := fieldlinepath( lena, stp, diffstep, potfunc ); + twoline := fieldlinepath( lena, stp, -diffstep, potfunc ); + draw oneline withpen grossa; + draw twoline withpen grossa; + endfor; + drawoptions(withpen grossa); + draw rp(posa); + draw rp(posb); + bordeline = rp((0,-limy,-limz))--rp((0, limy,-limz))-- + rp((0, limy, limz))--rp((0,-limy, limz))--cycle; + clip currentpicture to bordeline; + draw bordeline; + drawoptions(withpen fina); + numeric side; + path aux, electri; + side = 10mm; + aux = origin--(side,0)--(side,side)--cycle; + z0 = 0.667[origin,(side,0.5*side)]; + electri = aux shifted (-z0) rotated (45+angle(rp(posb)-rp(posa))); + fill electri shifted rp(posb); + fill electri rotated 180 shifted rp(posa); +endfig; + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaperwork.mp b/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaperwork.mp new file mode 100644 index 00000000000..a2451a4607c --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/fieldlinesnormapaperwork.mp @@ -0,0 +1,134 @@ +% fieldlinesnormapaperwork.mp +% L. Nobre G. +% 2009 + +input featpost3Dplus2D; + +prologues := 1; + +Spread := 25; +f := (20,0,0); + +color posa, posb, perpd; +numeric limy, limz, bord; +posa = (0,-4,0); %%%%%%%% allways make Y(posa) < Y(posb) %%%%%%%%%%% +posb = (0,4,0); %%%%%%%%%%%% never make Y(posa) = Y(posb) %%%%%%%%% +perpd = (1,0,0); +limy = 7; +limz = 5; +bord = 2.5; + +def vecfunc( expr posit )= + begingroup + save field; + color field, horiz, verti, vech, vecv; + numeric modula, modulb, ypos, zpos, hd, hf, vd, vf, zref, yref; + modula = conorm( posit-posa ); + modulb = conorm( posit-posb ); + field = N( ( posit-posa )/(modula**3)-( posit-posb )/(modulb**3) ); + ypos = Y( posit ); + zpos = Z( posit ); + if Z(posa) <> Z(posb): + (ypos,zref) = whatever[(Y(posa),Z(posa)),(Y(posb),Z(posb))]; + (yref,zpos) = whatever[(Y(posa),Z(posa)),(Y(posb),Z(posb))]; + if ( abs(zpos) > limz-bord ): + hd = abs(zpos)-limz+bord; + if ypos < yref: + if zpos > 0: + vech = -green; + else: + vech = green; + fi; + else: + if zpos > 0: + vech = green; + else: + vech = -green; + fi; + fi; + else: + hd = 0; + vech = black; + fi; + else: + zref = Z(posa); + vech = green; + if ( abs(zpos) > limz-bord ): + hd = abs(zpos)-limz+bord; + else: + hd = 0; + fi; + fi; + if ( abs(ypos) > limy-bord ): + vd = abs(ypos)-limy+bord; + if zpos > zref: + if ypos < 0: + vecv = blue; + else: + vecv = -blue; + fi; + else: + if ypos < 0: + vecv = -blue; + else: + vecv = blue; + fi; + fi; + else: + vd = 0; + vecv = black; + fi; + hf = (hd/bord)**2; + vf = (vd/bord)**2; + ( N(field*(0.975-hf)*(0.975-vf)+hf*vech+vf*vecv) ) + endgroup +enddef; + +def potfunc( expr posit )= + begingroup + color field; + field = vecfunc( posit ); + ( ncrossprod( field, perpd ) ) + endgroup +enddef; + +beginfig(1); + numeric i, lena, numa, diffstep, ray; + color stp; + path bordeline; + pen grossa, fina; + pair auxp; + grossa = pencircle scaled 3pt; + fina = pencircle scaled 1pt; + lena = 80; + numa = 13; + diffstep = 0.2; + ray = 0.05; + drawoptions(withpen grossa); + for i=1 upto numa-1: + auxp := (i/numa)[rp(posa),rp(posb)]; + draw auxp; + endfor; + drawoptions(withpen fina); + for i=2 step 2 until numa-2: + stp := (i/numa)[posa,posb]; + draw fieldlinepath( lena, stp, diffstep, potfunc ); + draw fieldlinepath( lena, stp, -diffstep, potfunc ); + endfor; +% draw fieldlinepath( lena, (0,Y(posa),Z(posa)+ray), diffstep, vecfunc ); + bordeline = rp((0,-limy,-limz))--rp((0, limy,-limz))-- + rp((0, limy, limz))--rp((0,-limy, limz))--cycle; + clip currentpicture to bordeline; + draw bordeline; + drawoptions(withpen fina); + numeric side; + path aux, electri; + side = 10mm; + aux = origin--(side,0)--(side,side)--cycle; + z0 = 0.667[origin,(side,0.5*side)]; + electri = aux shifted (-z0) rotated (45+angle(rp(posb)-rp(posa))); + draw electri shifted rp(posb); + draw electri rotated 180 shifted rp(posa); +endfig; + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp b/Master/texmf-dist/doc/metapost/featpost/example/fis1prex.mp index cff9d672d88..61c23b56e9c 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/fis1prex.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/fis1prex.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} @@ -69,6 +69,73 @@ beginfig(1); label.urt(btex $\alpha$ etex scaled 3, (0,alpharadi/2) ); endfig; +beginfig(3); + numeric u, largtecto, altutecto, espetecto, largmolas, rcd, largnum; + numeric spfraca, spfracb, angex, lenfactor, lenspringb, largfac; + numeric lenfel, lenwei; + pen mainp, auxip; + path molapatha, molapathb, rcpa, rcpb, boxtecto, traco; + pair esqutecto, diretecto, espessvec, fixpoi, springbextreme, fel, wei, res; + color graycol; + mainp = pencircle scaled 0.4mm; + auxip = pencircle scaled 0.2mm; + angex = 36; + lenfactor = 1.35; + largtecto = 100mm; + espetecto = 10mm; + altutecto = 50mm; + largmolas = 7mm; + rcd = 6mm; + lenfel = 34.5mm; + lenwei = 20mm; + largnum = 100; + spfraca = 0.65; + graycol = 0.67white; + largfac = 0.5*(1+lenfactor); + fel = lenfel*dir(90+angex); + wei = lenwei*down; + res = fel+wei; + lenspringb = altutecto*lenfactor; + spfracb = 1-altutecto*(1-spfraca)/lenspringb; + randomseed := 3976; + esqutecto = (-largtecto/2,altutecto); + diretecto = (largtecto/2,altutecto); + espessvec = (0,espetecto); + fixpoi = (0,altutecto); + springbextreme = fixpoi+lenspringb*dir(angex-90); + fel := springbextreme+fel; + wei := springbextreme+wei; + res := springbextreme+res; + boxtecto = esqutecto-- + diretecto-- + (diretecto+espessvec)-- + (esqutecto+espessvec)--cycle; + traco = (origin--(dir(45))) scaled 6in; + for i=-largnum upto largnum: + draw traco shifted (2*i*mm,0) withpen auxip; + endfor; + clip currentpicture to boxtecto; + pickup mainp; + draw esqutecto--diretecto; + molapatha = springpath(fixpoi,origin,11,largmolas,spfraca); + draw molapatha withcolor graycol; + rcpa = randomcirc( rcd, 0.1*rcd, 24 ); + unfill rcpa; + draw rcpa withcolor graycol; + molapathb = springpath(fixpoi,springbextreme,11,largmolas/largfac,spfracb); + draw molapathb; + rcpb = rcpa rotated angex shifted springbextreme; + unfill rcpb; + draw rcpb; + drawoptions( withcolor blue ); + drawarrow springbextreme--fel; + drawarrow springbextreme--wei; + drawarrow springbextreme--res; + label.urt( btex $\vec{F}_{el}$ etex, fel ); + label.llft( btex $\vec{F}_{R}$ etex, res ); + label.ulft( btex $\vec{F}_{g}$ etex, wei ); +endfig; + beginfig(2); numeric u, basesize, baseheight, alphang, thetang, sfearsize; numeric armsize, marginraise, totalraise, axeray, cardansize; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp b/Master/texmf-dist/doc/metapost/featpost/example/fis3prex.mp index 0fbc862c3b2..f1381b10d53 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/fis3prex.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/fis3prex.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp b/Master/texmf-dist/doc/metapost/featpost/example/fis3prey.mp index c1b32219687..c7e1ebea16f 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/fis3prey.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/fis3prey.mp @@ -1,14 +1,12 @@ % fis3prey.mp % L. Nobre G. -% IYP (2005) +% 2006 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} -\usepackage{beton} -\usepackage{concmath} -\usepackage{ccfonts} +\usepackage{palatino,mathpazo} \begin{document} etex @@ -71,6 +69,7 @@ beginfig(1); drawarrow z1--tx withpen negat; drawarrow z1--ty withpen negat; drawarrow z1--tz withpen negat; + %show "alert for fis3prey.mp"; label.lrt(btex $x$ etex scaled lscal, tx); label.llft(btex $y$ etex scaled lscal, ty); label.lft(btex $z$ etex scaled lscal, tz); @@ -114,11 +113,42 @@ beginfig(2); draw rp((cray,0,0))--rp((lpos,0,0)) dashed evenly; draw subpath (1,15) of circ withpen pena withcolor outcol; draw subpath (0,16) of circ withpen penb withcolor incol; - - - % label.top( btex $+$ etex, point 3 of rigcirc ); +endfig; +beginfig(3); + TDAtiplen := 0.26; % tdarrow + TDAhalftipbase := 0.12; % Three-Dimensional + TDAhalfthick := 0.05; % Arrow + Spread := 23; + numeric len, rad, tle, tcr, tof; + len = 10; + rad = 0.15; + tle = 1.5; + tcr = 4; + tof = 0.35; + f := 10*(1.7,0.8,1.05); + tdarrow( (tcr,-1-tof,-1), (tcr-tle,-1-tof,-1) ); + rigorousdisc( 0, true, (-2*len,-1,-1), rad, 3*len*red ); + tdarrow( (tcr,1-tof,-1), (tcr-tle,1-tof,-1) ); + draw rp((-1,-1+rad,-1))--rp((-1,1-rad,-1)) dashed evenly; + draw rp((1,-1+rad,-1))--rp((1,1-rad,-1)) dashed evenly; + rigorousdisc( 0, true, (-2*len,1,-1), rad, 3*len*red ); + tdarrow( (-1,-tcr,1+tof), (-1,-tcr+tle,1+tof) ); + draw rp((-1,-1,-1+rad))--rp((-1,-1,1-rad)) dashed evenly; + draw rp((-1,1,-1+rad))--rp((-1,1,1-rad)) dashed evenly; + draw rp((1,-1,-1+rad))--rp((1,-1,1-rad)) dashed evenly; + draw rp((1,1,-1+rad))--rp((1,1,1-rad)) dashed evenly; + rigorousdisc( 0, true, (-1,-len,1), rad, 2*len*green ); + draw rp((-1+rad,-1,1))--rp((1-rad,-1,1)) dashed evenly; + draw rp((-1+rad,1,1))--rp((1-rad,1,1)) dashed evenly; + rigorousdisc( 0, true, (1,-len,1), rad, 2*len*green ); + tdarrow( (1,-tcr,1-tof), (1,-tcr+tle,1-tof) ); + label( btex $I_A$ etex, rp((tcr-0.5*tle,-1-2*tof,-1)) ); + label( btex $I_B$ etex, rp((tcr-0.5*tle,1-2*tof,-1)) ); + label( btex $I_C$ etex, rp((-1,-tcr+0.5*tle,1+2*tof)) ); + label( btex $I_D$ etex, rp((1,-tcr+0.5*tle,1-2*tof)) ); + produce_vga_border; endfig; verbatimtex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp b/Master/texmf-dist/doc/metapost/featpost/example/frustum.mp index 90da3d74440..e48dd809edf 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/frustum.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/frustum.mp @@ -2,6 +2,8 @@ % L. Nobre G. % IYP (2005) +input featpost3Dplus2D; + verbatimtex \documentclass{article} \begin{document} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/galvanometro-inducao.mp b/Master/texmf-dist/doc/metapost/featpost/example/galvanometro-inducao.mp new file mode 100644 index 00000000000..f47ca02d4dc --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/galvanometro-inducao.mp @@ -0,0 +1,245 @@ +% galvanometro-inducao.mp +% Pedro Sebastiao +% 2008 + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +verbatimtex +\documentclass{article} +\usepackage{beton,concmath,ccfonts} +\begin{document} +etex + +beginfig(1); + color orig, axxc, ayyc, azzc,hum,hdois,pnove,pdez; + color field, nalfa, ngamma, alfacnt, gammacnt, nazy, nax,pum,pdois,ptres,pquatro,pcinco,pseis,psete,poito,zpos,zppos,gammacnt; + path alfa, gamma, circ; + numeric nalfad, theta, radius, gammang, xxsize, yysize, zzsize, phi,teta; + numeric xxpos, yypos, zzpos, fieldpos, deltarad, deltapos,inc,resize,sum,sdois; + numeric thetarad, thetapos, nalfapos, ngammapos,aux,alpha,ia,iz; + numeric etalpharad, etalphapos, alphapos, gammapos; + picture xxlabel, yylabel, zzlabel, fieldlabel, alphalabel; + picture rlabel, ngammalabel, etalphalabel, philabel; + picture gammalabel, thetalabel; + + f := (2,2.5,2.0); + % f := (2,2,20.0); + Spread := 100; + xxsize = 1.1; + xxpos = 6; + yysize = 1.1; + yypos = 6; + zzsize = 1; + zzpos = 4; + field = (0.7,0,0.3); + fieldpos = 2; + deltarad = 0.45; + deltapos = 3; + nalfad = 1.0; + theta = 25; + thetarad = 0.3; + thetapos = 2; + nalfapos = 7; + gammang = 65; + ngammapos = 7; + etalpharad = 0.4; + etalphapos = 2; + alphapos = 6; + gammapos = 0; + radius =0.5; + alpha := 60; + + xxlabel = btex $x$ etex; + yylabel = btex $y$ etex; + zzlabel = btex $z$ etex; + alphalabel = btex $2\alpha$ etex; + fieldlabel = btex $\mathbf{B}$ etex; + thetalabel = btex $\theta$ etex; + rlabel = btex $r$ etex; + ngammalabel = btex $\vec{n}_\gamma$ etex; + etalphalabel= btex $\eta_\alpha$ etex; + philabel = btex $\phi$ etex; + gammalabel = btex $\gamma$ etex; + orig = (0,0,0); + axxc = (xxsize,0,0); + ayyc = (0,yysize,0); + azzc = (0,0,zzsize); + hum = 0.9*azzc; + hdois = -0.9*azzc; + resize:=0.85; + + + pum := (resize*cosd(alpha),resize*sind(alpha),0.9); + pdois := (-resize*cosd(alpha),resize*sind(alpha),0.9); + ptres :=(resize*cosd(alpha),resize*sind(alpha),-0.9); + pquatro :=(-resize*cosd(alpha),resize*sind(alpha),-0.9); + draw rp(pum)..rp(ptres); + draw rp(pdois)..rp(pquatro); + pcinco := (resize*cosd(alpha),resize*sind(-alpha),0.9); + pseis := (-resize*cosd(alpha),resize*sind(-alpha),0.9); + psete :=(resize*cosd(alpha),resize*sind(-alpha),-0.9); + poito :=(-resize*cosd(alpha),resize*sind(-alpha),-0.9); + draw rp(pcinco)..rp(psete); + draw rp(pseis)..rp(poito); + + anglinen( pum, pdois, hum, resize, alphalabel, 4 ); + anglinen( ptres, pquatro, -hum, resize, "", deltapos ); + anglinen( pcinco, pseis, hum, resize, "", deltapos ); + anglinen( psete, poito, -hum, resize, "", deltapos ); + + draw rp(hum)..rp(pdois) dashed evenly; + draw rp(hum)..rp(pcinco) dashed evenly; + + alpha:=60; + resize:=0.80; + + pickup pencircle scaled 3; + + pum := (resize*cosd(alpha),resize*sind(alpha),0.9); + pdois := (-resize*cosd(alpha),-resize*sind(alpha),0.9); + ptres :=(resize*cosd(alpha+180),-resize*sind(alpha),-0.9); + pquatro :=(resize*cosd(alpha),resize*sind(alpha),-0.9); + draw rp(pum)..rp(pdois); + draw rp(pdois)..rp(ptres); + draw rp(ptres)..rp(pquatro); + draw rp(pquatro)..rp(pum); + + pickup pencircle scaled 1.5; + resize:=0.85; + + for ia=60 step 10 until (120): + for iz=-0.0 step 1.4 until (0.71): + pum := (resize*cosd(ia),resize*sind(ia),iz); + pdois := (cosd(ia),sind(ia), iz); + ptres := (resize*cosd(ia+180),resize*sind(ia+180),iz); + pquatro := (cosd(ia+180),sind(ia+180), iz); + drawarrow rp(pum)..rp(pdois) withcolor red; + draw rp(pdois)..rp(pdois+(0,yysize,0)) withcolor red; + drawarrow rp(pquatro)..rp(ptres) withcolor red; + draw rp(pquatro-(0,yysize,0))..rp(pquatro) withcolor red; + hdois:=pum; + pcinco := (0.5*resize*cosd(ia),0.5*resize*sind(ia),iz); + pseis := (0.5*resize*cosd(360-ia),0.5*resize*sind(360-ia),iz); + pdez := (resize*cosd(360-ia),resize*sind(360-ia),iz); + for i=0 step 0.01 until 1: + poito := ((1-i)**3)*pum+3*i*((1-i)**2)*pcinco+3*(i**2)*(1-i)*pseis+(i**3)*pdez; + draw rp(hdois)..rp(poito) withcolor red; + hdois:=poito; + endfor + endfor + endfor + + for ia=40 step 10 until (50): + for iz=-0.0 step 1.4 until (0.71): + pum := (resize*cosd(ia),resize*sind(ia),iz); + pdois := (cosd(ia),sind(ia), iz); + ptres := (resize*cosd(ia+180),resize*sind(ia+180),iz); + pquatro := (cosd(ia+180),sind(ia+180), iz); + drawarrow rp(pum)..rp(pdois) withcolor black; + draw rp(pdois)..rp(pdois+(0,yysize,0)) withcolor black; + drawarrow rp(pquatro)..rp(ptres) withcolor black; + draw rp(pquatro-(0,yysize,0))..rp(pquatro) withcolor black; + hdois:=pum; + pcinco := (0.5*resize*cosd(ia),0.5*resize*sind(ia),iz); + pseis := (0.5*resize*cosd(360-ia),0.5*resize*sind(360-ia),iz); + pdez := (resize*cosd(360-ia),resize*sind(360-ia),iz); + for i=0 step 0.01 until 1: + poito := ((1-i)**3)*pum+3*i*((1-i)**2)*pcinco+3*(i**2)*(1-i)*pseis+(i**3)*pdez; + draw rp(hdois)..rp(poito) withcolor black; + hdois:=poito; + endfor + endfor + endfor + for ia=130 step 10 until (140): + for iz=-0.0 step 1.4 until (0.71): + pum := (resize*cosd(ia),resize*sind(ia),iz); + pdois := (cosd(ia),sind(ia), iz); + ptres := (resize*cosd(ia+180),resize*sind(ia+180),iz); + pquatro := (cosd(ia+180),sind(ia+180), iz); + drawarrow rp(pum)..rp(pdois) withcolor black; + draw rp(pdois)..rp(pdois+(0,yysize,0)) withcolor black; + drawarrow rp(pquatro)..rp(ptres) withcolor black; + draw rp(pquatro-(0,yysize,0))..rp(pquatro) withcolor black; + hdois:=pum; + pcinco := (0.5*resize*cosd(ia),0.5*resize*sind(ia),iz); + pseis := (0.5*resize*cosd(360-ia),0.5*resize*sind(360-ia),iz); + pdez := (resize*cosd(360-ia),resize*sind(360-ia),iz); + for i=0 step 0.01 until 1: + poito := ((1-i)**3)*pum+3*i*((1-i)**2)*pcinco+3*(i**2)*(1-i)*pseis+(i**3)*pdez; + draw rp(hdois)..rp(poito) withcolor black; + hdois:=poito; + endfor + endfor + endfor + + + ia=60; + iz = 0.7; + pnove := (resize*cosd(ia),resize*sind(ia),iz); + pdez := (resize*cosd(360-ia),resize*sind(360-ia),iz); + pcinco := (0.5*resize*cosd(ia),0.5*resize*sind(ia),iz); + pseis := (0.5*resize*cosd(360-ia),0.5*resize*sind(360-ia),iz); + pickup pencircle scaled 5.5; +% draw rp(pdois); +% draw rp(pquatro); +% draw rp(pnove); +% draw rp(pdez); + + pickup pencircle scaled 0.5; + + draw rigorouscircle( (0,0,0), (0,0,1), 1) dashed evenly; + resize:=1; + alpha := 60; + + iz:=0.0; + pum := (resize*cosd(alpha),resize*sind(alpha),iz); + pdois := (-resize*cosd(alpha),resize*sind(alpha),iz); + ptres :=(resize*cosd(alpha),resize*sind(alpha),-iz); + pquatro :=(-resize*cosd(alpha),resize*sind(alpha),-iz); + pcinco := (resize*cosd(alpha),resize*sind(-alpha),iz); + pseis := (-resize*cosd(alpha),resize*sind(-alpha),iz); + psete :=(resize*cosd(alpha),resize*sind(-alpha),-iz); + poito :=(-resize*cosd(alpha),resize*sind(-alpha),-iz); + + anglinen( pum, pdois, hum-(0.9-iz)*azzc, resize, "", deltapos ); + anglinen( ptres, pquatro, -hum+(0.9-iz)*azzc, resize, "", deltapos ); + anglinen( pcinco, pseis, hum-(0.9-iz)*azzc, resize, "", deltapos ); + anglinen( psete, poito, -hum+(0.9-iz)*azzc, resize, "", deltapos ); + + resize:=0.85; + alpha := 60; + pickup pencircle scaled 0.5; + iz:=0.0; + pum := (resize*cosd(alpha),resize*sind(alpha),iz); + pdois := (-resize*cosd(alpha),resize*sind(alpha),iz); + ptres :=(resize*cosd(alpha),resize*sind(alpha),-iz); + pquatro :=(-resize*cosd(alpha),resize*sind(alpha),-iz); + pcinco := (resize*cosd(alpha),resize*sind(-alpha),iz); + pseis := (-resize*cosd(alpha),resize*sind(-alpha),iz); + psete :=(resize*cosd(alpha),resize*sind(-alpha),-iz); + poito :=(-resize*cosd(alpha),resize*sind(-alpha),-iz); + + anglinen( pum, pdois, hum-(0.9-iz)*azzc, resize, "", deltapos ); + anglinen( ptres, pquatro, -hum+(0.9-iz)*azzc, resize, "", deltapos ); + anglinen( pcinco, pseis, hum-(0.9-iz)*azzc, resize, "", deltapos ); + anglinen( psete, poito, -hum+(0.9-iz)*azzc, resize, "", deltapos ); + + + pickup pencircle scaled 1; + drawarrow rp(-azzc)..rp(1.3*azzc); +% drawarrow rp(-axxc)..rp(axxc); +% drawarrow rp(-ayyc)..rp(ayyc); + pickup pencircle scaled 1.5; +% draw rp(alfacnt); +% draw rp(gammacnt); +% produce_auto_scale; +endfig; + +verbatimtex +\end{document} +etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/gausslawframe.mp b/Master/texmf-dist/doc/metapost/featpost/example/gausslawframe.mp new file mode 100644 index 00000000000..37b0c837943 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/gausslawframe.mp @@ -0,0 +1,145 @@ +% gausslawframe.mp +% adapted from an ANEEMATE example +% L. Nobre G. +% IYP (2005) + +input featpost3Dplus2D; + +numeric ParameterA, ParameterB, ParameterC, ParameterD, ParameterE; +ParameterA = 0; % +ParameterB = 0.02; % escala geral +ParameterC = 0.8; % avanco da superficie +ParameterD = 1; % deslocamento do viewcentr +ParameterE = 3.1; % capitulo + +verbatimtex +\documentclass{article} +\usepackage{mathpazo} +\newfont{\featfont}{logod10 scaled 500} +\begin{document} +etex + +def sfsur( expr H, V ) = + ( (cosd(H)*cosd(V),sind(H)*cosd(V),sind(V)) ) +enddef; + +primarydef a joi b = a & "," & b enddef; +primarydef a empstr b = a & ditto & ditto & b enddef; + +beginfig(1); + color auxb, auxc, pa, pb, pc, pd; + numeric aux, i, j, cou, lim, max, numc, numofdiarr, radratio; + numeric astepv, asteph, radiub, arch, starter, coverlim, fieldlen; + numeric refav, refah, actad, minad, actav, actah, cop, lscale, maxlscale; + pen thickp; + string a, b, auxs; + picture AM, DPHI; + path p[]; + pair auxp, lasp, lpoi, lvec;; + f := (2,3.5,4.6); + Spread := ParameterB[9,880]; + fieldlen = 0.95; + radius = 1; + radratio = 3.5; + numc = 9; + numofdiarr = 120; + refah = 50; + refav = 30; + actad = ((refav+90)/180) ++ (refah/180); + minad = actad; + actah = refah; + actav = refav; + cop = 0; + thickp = pencircle scaled (ParameterB[0.2mm,1.2mm]); + maxlscale = 3; + lscale = ParameterB[1,maxlscale]; + max = ceiling( radratio*numc*0.5 ); + astepv = 180/max; + radiub = radius*radratio; + arch = radiub*astepv; + coverlim = ParameterC[3*astepv-90,89]; + viewcentr := ParameterD[black,0.5*(radiub+fieldlen)*sfsur(actah,actav)]; + pickup thickp; + getready( "tropicalglobe( numc, black, radius, blue );", black ); + TDAtiplen := 0.15; + TDAhalftipbase := 0.06; + TDAhalfthick := 0.03; + cou = 0; + for j=1.5*astepv-90 step astepv until coverlim: + asteph := arch/(radiub*cosd(j-0.5*astepv)); + lim := ceiling(360/asteph); + asteph := 360/lim; + starter := uniformdeviate( asteph ); + for i=starter-180 step asteph until 180: + cou := incr( cou ); + pa := radiub*sfsur(i-asteph,j-astepv); + pb := radiub*sfsur(i,j-astepv); + pc := radiub*sfsur(i,j); + pd := radiub*sfsur(i-asteph,j); + actad := ((i-0.5*asteph-refah)/180) ++ ((j-0.5*astepv-refav)/180); + if actad < minad: + minad := actad; + actav := j-0.5*astepv; + actah := i-0.5*asteph; + cop := cou; + fi; + auxc := radiub*sfsur( i-0.5*asteph, j-0.5*astepv ); + p[cou] = rp(pa)--rp(pb)--rp(pc)--rp(pd)--cycle; + auxs := decimal( cou ); + getready( "unfill p" & auxs & "; draw p" & auxs & ";", auxc ); + a := cstr( auxc ); + b := cstr( auxc+fieldlen*N(auxc) ); + getready( "tdarrow(" & a joi b & ");", 1.1*auxc ); + endfor; + endfor; + doitnow; + draw VGAborder; + AM = btex {\featfont ANEEMATE} etex; + label.ulft( AM rotated 90, point 1 of VGAborder); + unfill p[cop]; + draw p[cop]; + auxb := radiub*sfsur(actah,actav); + auxc := (radiub+fieldlen)*sfsur(actah,actav); + tdarrow( auxb, auxc ); + drawoptions( withcolor blue ); + label.lft( btex $\vec{E}$ etex scaled lscale, rp( auxc ) ); + drawoptions( withpen thickp withcolor red ); + auxc := (radiub+0.5*fieldlen)*sfsur(actah,actav); + drawarrow rp(auxb)--rp(auxc); + label.rt( btex $d\vec{A}$ etex scaled lscale, rp( auxc ) ); + drawoptions( withcolor blue ); + if (ParameterE>0.5) and (ParameterE<1.5): + DPHI = btex $d\Phi=\vec{E}\cdot d\vec{A} = E\,dA$ etex scaled maxlscale; + label.lrt( DPHI, point 3 of VGAborder); + fi; + if (ParameterE>1.5) and (ParameterE<3.5): + DPHI = btex $\Phi=\int d\Phi + =\int \vec{E}\cdot d\vec{A} + =\int E\,dA + =E\int dA + =4\pi R^2 E + =\frac{Q}{\mathcal{E}_0} + \Leftrightarrow + E= \frac{Q}{4\pi R^2\mathcal{E}_0}$ etex scaled maxlscale; + auxp = ( lrcorner DPHI ) - ( llcorner DPHI ); + lasp = ( point 3 of VGAborder ) + auxp; + lvec = lasp - ( point 2 of VGAborder ); + lpoi = ( point 3 of VGAborder ) - (ParameterE-2)*lvec; + label.lrt( DPHI, lpoi ); + fi; + + produce_vga_border; +endfig; + +verbatimtex +\end{document} +etex + +end; + + + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp b/Master/texmf-dist/doc/metapost/featpost/example/geombasic.mp index 168f1cc9fc5..413714c21ef 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/geombasic.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/geombasic.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp b/Master/texmf-dist/doc/metapost/featpost/example/geomcasq.mp index bdc52c58d89..c02416b6f92 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_casq.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/geomcasq.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 1999 -%input featpost3Dplus2D; +input featpost3Dplus2D; %input la3Dmacros; %input hlr3Dmacros; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/geometricaverage.mp b/Master/texmf-dist/doc/metapost/featpost/example/geometricaverage.mp new file mode 100644 index 00000000000..88bd19d0d1f --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/geometricaverage.mp @@ -0,0 +1,57 @@ +% geometricaverage.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +verbatimtex \documentclass{article}\begin{document} etex + +%f := (5,3.5,1); +%f := 0.4*(5,3.5,3); +%f := 0.4*(5,1.5,1.5); +f := 0.4*(2.5,5,1.5); +beginfig(1); + cartaxes(1.5,2,1); + color va, vb, vc, vd, ve, vf; + va = black; + vb = (0,1.5,0); + vc = (1,1.5,0); + vd = red; + ve = (1,0.75,0); + vf = (0.5,1.5,0); + z3 = rp(va); + z4 = rp(vb); + z5 = rp(vc); + z6 = rp(vd); + z7 = rp(ve); + z9 = rp(vf); + draw z3--z4--z5--z6--cycle dashed evenly; + z1 = whatever[z3,z4]; + z1 = whatever[z6,z5]; + z2 = whatever[z6,z3]; + z2 = whatever[z5,z4]; + draw z1--z3 dashed evenly; + draw z1--z6 dashed evenly; + draw z2--z3 dashed evenly; + draw z2--z4 dashed evenly; + draw z2--z7 withcolor red; + draw z1--z9 withcolor red; + numeric laa, lba, lca; + laa = abs(z3-z1); + lba = abs(z4-z1); + lca = sqrt( laa )*sqrt( lba ); + z8 = (lca/lba)[z1,z4]; + draw z2--z8; + + laa := 1/abs(z3-z2); + lba := 1/abs(z6-z2); + lca := 0.5*( laa + lba ); % What works is the arithmetic average of + % reciprocal distances!! + z10 = (lba/lca)[z2,z6]; + draw z1--z10; + labels.top(1,2,3,4,5,6,7,8,9,10); +endfig; + +verbatimtex \end{document} etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp b/Master/texmf-dist/doc/metapost/featpost/example/geomfiguei.mp index 81abd780492..5bc1c58a34b 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/geomfiguei.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/geomfiguei.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp b/Master/texmf-dist/doc/metapost/featpost/example/geomfreder.mp index 9a834001aab..3fb9f616a41 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/geom_freder.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/geomfreder.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2000 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp b/Master/texmf-dist/doc/metapost/featpost/example/geommine.mp index 939fc35ed94..9aaf962b435 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/geommine.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/geommine.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp b/Master/texmf-dist/doc/metapost/featpost/example/globe.mp index 22d0cf2bee1..81aa3440fce 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/globe.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/globe.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); color gammacnt; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/gnupost3Dlogo.mp b/Master/texmf-dist/doc/metapost/featpost/example/gnupost3Dlogo.mp new file mode 100644 index 00000000000..aca279ef0e9 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/gnupost3Dlogo.mp @@ -0,0 +1,125 @@ +% gnupost3Dlogo.mp +% 2006 +% L. Nobre G. + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +prologues := 1; + +def converterfunc( expr Pair ) = + begingroup + save factconv, angstart, ystart, cx, cy, raux, aaux, xaux, yaux, zaux; + numeric factconv, angstart, ystart, cx, cy, raux, aaux, xaux, yaux, zaux; + save overtang, factang; + numeric overtang, factang; + ystart = 2; + factconv = 0.0046; + angstart = 70; + overtang = 55; + factang = 12; + cx = factconv*(ypart Pair); + cy = ystart+factconv*(xpart Pair); + raux = cy*sind(overtang); + aaux = angstart-factang*factconv*(xpart Pair)-(180/3.14159)*cx/raux; + zaux = cy*cosd(overtang); + yaux = raux*sind(aaux); + xaux = raux*cosd(aaux); + ( rp( ( xaux, yaux, zaux ) ) ) + endgroup +enddef; + +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[], backpath; + 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; + backpath = origin--(0,xmax)--(ymax,xmax)--(ymax,0)--cycle; + 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] ); + endfor; + fill backpath withcolor (0.55blue); + for i=nstripes+1 upto nstripes+50: + strp[i] = fullcircle scaled cdiam shifted + (u+uniformdeviate(ymax-2u),u+uniformdeviate(xmax-2u)); + fill strp[i]; + endfor; + ShiftV := (0.3*ymax,0); + viewcentr := (0,0.7,1); + f := (3,0,0); + Spread := 70; + for i=1 upto nstripes: + fill closedpathinspace( strp[i], 8, converterfunc ) withcolor red; + endfor; + clip currentpicture to backpath; +endfig; + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/graphene.mp b/Master/texmf-dist/doc/metapost/featpost/example/graphene.mp new file mode 100644 index 00000000000..8bab59cb0aa --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/graphene.mp @@ -0,0 +1,78 @@ +% graphene.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +f := (9,13,7); +Spread := 23; + +beginfig(1); + numeric s, c, rs, rc, i, j; + boolean isodd; + color ua, ub, uc, ta, tb; + path t; + s = 0.5; + c = sqrt(3)/2; + rs = 0.23; + rc = 0.15; + ua = (-s,c,0); + ub = (s,c,0); + uc = (1,0,0); + isodd = true; + j = 1; + ta = (-4.5,-5,0); + t = rigorousfearpath( ta, rs ); + unfill t; draw t; + forever: + if isodd: + tb := ta + ua; + rigorousdisc( 0, true, ta+rs*ua, rc, ua*(1-2*rs)); + else: + tb := ta + ub; + rigorousdisc( 0, true, ta+rs*ub, rc, ub*(1-2*rs)); + fi; + t := rigorousfearpath( tb, rs ); + unfill t; draw t; + isodd := not isodd; + ta := tb; + j := incr( j ); + exitif j>11; + endfor; + for i=1 upto 6: + for j=1 upto 6: + if isodd: + ta := ((i-1)*1.5-4.5,(j-1)*2*c-5+c,0); + else: + ta := ((i-1)*1.5-4.5,(j-1)*2*c-5,0); + fi; + tb := ta + uc; + rigorousdisc( 0, true, ta+rs*uc, rc, uc*(1-2*rs)); + endfor; + j := 1; + if isodd: + ta := ((i-1)*1.5-3,j-6,0); + else: + ta := ((i-1)*1.5-3.5,j-6,0); + fi; + t := rigorousfearpath( ta, rs ); + unfill t; draw t; + forever: + if isodd: + tb := ta + ua; + rigorousdisc( 0, true, ta+rs*ua, rc, ua*(1-2*rs)); + else: + tb := ta + ub; + rigorousdisc( 0, true, ta+rs*ub, rc, ub*(1-2*rs)); + fi; + t := rigorousfearpath( tb, rs ); + unfill t; draw t; + isodd := not isodd; + ta := tb; + j := incr( j ); + exitif j>11; + endfor; + endfor; +endfig; + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp b/Master/texmf-dist/doc/metapost/featpost/example/graphexample.mp index 6591ed5d0f9..2dd9b2b9735 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/graphexample.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/graphexample.mp @@ -2,9 +2,9 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; -input mp-tool; +%input mp-tool; beginfig(1); path thezigzag; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp b/Master/texmf-dist/doc/metapost/featpost/example/halfcirclesfear.mp index 7074987e166..7194d79336e 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/halfcirclesfear.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/halfcirclesfear.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2001 -%input featpost3Dplus2D; +input featpost3Dplus2D; % input la3Dmacros; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/hermitespliknot.mp b/Master/texmf-dist/doc/metapost/featpost/example/hermitespliknot.mp new file mode 100644 index 00000000000..dd9f4f47a44 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/hermitespliknot.mp @@ -0,0 +1,117 @@ +% hermitespliknot.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +verbatimtex +\documentclass{article} +\usepackage{palatino,mathpazo} +\begin{document} +etex + +numeric param; +param = 0.7; + +Spread := 39; +f := 1.1*(3,5,4); + +vardef Pne( expr pr ) = ( (2*pr-3)*(pr**2)+1 ) enddef; +vardef Pwo( expr pr ) = ( (3-2*pr)*(pr**2) ) enddef; +vardef Tne( expr pr ) = ( pr*(pr*(pr-2)+1) ) enddef; +vardef Two( expr pr ) = ( (pr-1)*(pr**2) ) enddef; + +vardef Wei( expr pre, thi, nex ) = + ( 0.5*( nex - pre ) ) +enddef; + +vardef Hermite( expr pr, zer, one, two, thr ) = + ( Pne(pr)*one+Pwo(pr)*two+Tne(pr)*Wei(zer,one,two)+Two(pr)*Wei(one,two,thr) ) +enddef; + +beginfig(1); + color ki[], actpoi, newpoi; + numeric inum, bnum, del, halz, totz, pstep, p, bray; + numeric icen, ap, istart, ifinis, thfac, vhfac; + inum = 12; + bnum = 500; + del = 8; + halz = 1.5; + totz = 3.0; + pstep = 0.002; + bray = 0.05; + icen = 1; + thfac = 3.5; + vhfac = 0.8; + ki0 = (-6,0,0); + ki1 = (-5,0,0); + ki2 = (-1.5-1.5*cosd((180-del)*param)-cosd((180+del)*param), + -sind((180+del)*param)+1.5*sind((180-del)*param),halz); + ki3 = (-1.5-1.5*cosd((180-del)*param), + 1.5*sind((180-del)*param),totz); + ki4 = (-1.5-1.5*cosd((180-del)*param)+cosd((180+del)*param), + sind((180+del)*param)+1.5*sind((180-del)*param),halz); + ki5 = (cosd((180-del)*param),sind((180-del)*param),0); + ki6 = (0,0,0); + ki7 = (-cosd((180-del)*param),-sind((180-del)*param),0); + ki8 = (1.5+1.5*cosd((180-del)*param)-cosd((180+del)*param), + -sind((180+del)*param)+1.5*sind((180-del)*param),halz); + ki9 = (1.5+1.5*cosd((180-del)*param), + 1.5*sind((180-del)*param),totz); + ki10= (1.5+1.5*cosd((180-del)*param)+cosd((180+del)*param), + sind((180+del)*param)+1.5*sind((180-del)*param),halz); + ki11= (5,0,0); + ki12= (6,0,0); + + istart = icen; + ifinis = icen+1; + ap := 0; + forever: + ap := ap+pstep; + actpoi := Hermite(ap,ki[istart-1],ki[istart],ki[ifinis],ki[ifinis+1]); + exitif conorm(actpoi-ki[istart])>bray; + endfor; + getready("signalvertex(" + & cstr(actpoi) + & "," & decimal(thfac) + & ",(0,0,0));signalvertex(" + & cstr(actpoi) + & "," & decimal(thfac*vhfac) + & ",(1,1,1));", actpoi); + p = 1; + forever: + ap := ap+pstep; + if ap>1: + ap := ap-1; + istart := ifinis; + ifinis := istart+1; + fi; + exitif (ifinis>inum-1) or (p>bnum); + newpoi := Hermite(ap,ki[istart-1],ki[istart],ki[ifinis],ki[ifinis+1]); + if conorm(newpoi-actpoi)>2*bray: + actpoi := newpoi; + getready("signalvertex(" + & cstr(actpoi) + & "," & decimal(thfac) + & ",(0,0,0));signalvertex(" + & cstr(actpoi) + & "," & decimal(thfac*vhfac) + & ",(1,1,1));", actpoi); + p := incr( p ); + fi; + endfor; + doitnow; +% for p=0 upto inum: +% dotlabel.top( decimal(p), rp(ki[p]) ); +% endfor; +% produce_auto_scale; +endfig; + +verbatimtex +\end{document} +etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp b/Master/texmf-dist/doc/metapost/featpost/example/hexagonaltrimesh.mp index 316ca97482e..f51ed83c132 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/hexagonaltrimesh.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/hexagonaltrimesh.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; def zsurface( expr xc, yc ) = cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4) diff --git a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp b/Master/texmf-dist/doc/metapost/featpost/example/hiddenlinegraph.mp index efa5cea3727..8c0823c3ef4 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/hiddenlinegraph.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/hiddenlinegraph.mp @@ -3,6 +3,8 @@ % 2003 % The application of the big nice trick to draw 3D hidden line surfaces +input featpost3Dplus2D; + verbatimtex \documentclass{article} \usepackage{beton} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp b/Master/texmf-dist/doc/metapost/featpost/example/hiddensurface.mp index b0d64e95612..de52af3dcf3 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurface.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/hiddensurface.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; % The big nice trick to draw 3D hidden line surfaces diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp b/Master/texmf-dist/doc/metapost/featpost/example/hiddensurfaces.mp index df698f038bf..d57526c5347 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/hiddensurfaces.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/hiddensurfaces.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; def zsurface( expr xc, yc ) = begingroup diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp b/Master/texmf-dist/doc/metapost/featpost/example/inductionbob.mp index 19b47c44105..b482373072c 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/inductionbob.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/inductionbob.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/integerbars.mp b/Master/texmf-dist/doc/metapost/featpost/example/integerbars.mp new file mode 100644 index 00000000000..a8475fba75a --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/integerbars.mp @@ -0,0 +1,58 @@ +% integerbars.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +prologues := 1; + +def randcolor = + (0.1+uniformdeviate(0.8),0.1+uniformdeviate(0.8),0.1+uniformdeviate(0.8)) +enddef; + +beginfig(1); + numeric u, ltl, ltr, lsl, lsr, lbmin, lbmax, lbtop, i, j, k, a; + numeric hist[], hclass, aaux, r; + color pickc; + pair tcross; + pickup pencircle scaled 1.5pt; + u = 5mm; + r = 5mm; + ltl = 9; + ltr = 9; + lsl = 4; + lsr = 1; + lbmin = 4; + lbtop = 7; + lbmax = ltl+ltr-1; + hclass = 2; + if lbtop > lbmax: lbtop := lbmax; fi; + draw origin; + for a=0 step hclass until 180-hclass: + hist[a] = 0; + endfor; + for i=lbmin upto lbtop: + pickc := randcolor; + drawoptions( withcolor pickc ); + draw (i*u,0); + for j=lsl upto ltl: + for k=lsr upto ltr: + if (j+k > i) and (j < i+k) and (k < i+j): + tcross := radialcross( origin, j*u, (i*u,0), k*u, true ); + draw tcross; + aaux := angle( tcross ); + a := 0; + forever: + a := a + hclass; + exitif aaux < a; + endfor; + hist[a] := incr( hist[a] ); + fi; + endfor; + endfor; + endfor; + fill origin-- for a=hclass step hclass until 180-hclass: + (r*dir(a)*hist[a-hclass])--(r*dir(a)*hist[a])-- endfor cycle; +endfig; + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/integratorfigures.mp b/Master/texmf-dist/doc/metapost/featpost/example/integratorfigures.mp new file mode 100644 index 00000000000..0ce13609e33 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/integratorfigures.mp @@ -0,0 +1,112 @@ +% integratorfigures.mp +% L. Nobre G. +% 2007 + +input featpost3Dplus2D; + +verbatimtex + \documentclass{article} + \begin{document} +etex + +beginfig(1); + f := (5,3,2); + Spread := 90; + numeric axlen, disclen, discpos, dradius, dxo, dy; + color dcenter, xlim, dxr, dxco, dxro, vdy, dxa, dxb; + path xtip, neadx, fardx, dx; + axlen = 1.65; + disclen = 0.15; + discpos = 0.85; + dy = 0.02; + vdy = -dy*green; + dradius = 1 +-+ discpos; + dxo = dradius + 0.5; + cartaxes( axlen, axlen, axlen ); + dcenter = discpos*red; + xlim = axlen*red; + xtip = rp(dcenter)--rp(xlim); + drawoptions( withpen pencircle scaled 1.2pt ); + rigorousdisc( 0, true, discpos*red, dradius, -disclen*red ); + drawoptions(); +% draw goodcirclepath( black, blue, 1 ) dashed evenly; +% draw goodcirclepath( black, red, 1 ) dashed evenly; +% draw goodcirclepath( black, green, 1 ) dashed evenly; +% drawoptions( withpen pencircle scaled 1.2pt ); + draw spatialhalfcircle( black, blue, 1, true ); + draw spatialhalfcircle( black, red, 1, true ); + draw spatialhalfcircle( black, green, 1, true ); + drawoptions(); + drawarrow xtip; +% draw rp(black)--rp(dcenter) dashed evenly; + draw rigorousfearpath( black, 1 ); + dxco = (discpos,dxo,0); + dxr = (discpos-disclen,dradius,0); + dxro = (discpos-disclen,dxo,0); + neadx = rp(dcenter)--rp(dxco); + fardx = rp(dxr)--rp(dxro); + dxa = dxco+vdy; + dxb = dxro+vdy; + draw fardx; + draw neadx; + dx = rp(dxa)--rp(dxb); + drawdblarrow dx; +% label.rt( btex $dx$ etex, rp(0.5[dxa,dxb]) ); + label.rt( "dx", rp(0.5[dxa,dxb]) ); + label.bot( "x" ,rp(xlim)); +endfig; + +input boxes; + +beginfig(2); + f := (3,2.05,2.35); + Spread := 140; + numeric labscal, bray, sray, angb, phi, phib; + picture labrb, labrs, plb, pls; + color cenb, momb, lpos, hpos; + path vaa, vb, ha, hb, hapart; + labscal = 2; + ahlength := 8pt; + ahangle := 30; + bray = 0.95; + sray = 0.4; + angb = 9; + phi = 55; + phib = 83; + labrb= btex $(b+r\cos\phi)d\theta$ etex scaled labscal; + labrs= btex $r\,d\phi$ etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + smoothtorus( black, blue, bray, sray ); +% drawoptions( withpen pencircle scaled 1.3pt dashed evenly ); + drawoptions( ); + vaa = goodcirclepath( bray*red, green, sray ); + draw vaa withcolor red; + cenb = bray*(red*cosd(angb)+green*sind(angb)); + momb = green*cosd(angb)-red*sind(angb); + lpos = cenb*(1+sray*cosd(phi)/bray)+blue*sray*sind(phi); + hpos = cenb*(1+sray*cosd(phib)/bray)+blue*sray*sind(phib); + vb = goodcirclepath( cenb, momb, sray ); + draw vb withcolor (blue+green); + ha = goodcirclepath( blue*sray*sind(phi), blue, bray+sray*cosd(phi) ); + draw ha; + hb = goodcirclepath( blue*sray*sind(phib), blue, bray+sray*cosd(phib) ); + draw hb withcolor green; +% show length ha; + hapart = subpath (3,6) of ha; + drawarrow hapart withpen pencircle scaled 1.3pt; + fill buildcycle( vaa, hb, vb, reverse hapart ) withcolor 0.5white; + plb = thelabel.llft( labrb, rp(lpos) ); + pls = thelabel.lrt( labrs, rp(hpos) ); + boxit.bb( plb ); + boxit.bs( pls ); + unfill bpath bb; + unfill bpath bs; + drawboxed( bb, bs ); +endfig; + +verbatimtex + \end{document} +etex + +end; +
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp b/Master/texmf-dist/doc/metapost/featpost/example/intersection2D.mp index d482fde6ed0..d482fde6ed0 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/intersection2D.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/intersection2D.mp diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp b/Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp index a4a629d8afb..970f862c5a9 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/joinedemptylines.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2001 -%input featpost3Dplus2D; +input featpost3Dplus2D; numeric altura; altura = 1; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp b/Master/texmf-dist/doc/metapost/featpost/example/kindofcube.mp index c2e6a99f5a9..3fdb6078276 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/kindofcube.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/kindofcube.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp b/Master/texmf-dist/doc/metapost/featpost/example/kindofcuber.mp index c29d727bd61..c6b066a28da 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/kindofcube.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/kindofcuber.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + verbatimtex \documentclass{article}\begin{document}{\sffamily etex beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp b/Master/texmf-dist/doc/metapost/featpost/example/labelconstruct.mp index 45213320942..4233d40baeb 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/labelconstruct.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/labelconstruct.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp b/Master/texmf-dist/doc/metapost/featpost/example/labelinspace.mp index da51f50633f..b1ab6c6b2ab 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/labelinspace.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/labelinspace.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex @@ -12,7 +12,7 @@ ParallelProj := true; verbatimtex \documentclass{article} -\usepackage{beton,concmath,ccfonts} +%\usepackage{beton,concmath,ccfonts} \begin{document} etex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/lasermachine.mp b/Master/texmf-dist/doc/metapost/featpost/example/lasermachine.mp new file mode 100644 index 00000000000..eb9c18fd5d4 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/lasermachine.mp @@ -0,0 +1,27 @@ +% lasermachine.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +beginfig(1); + numeric devi; + devi = 0.1; + path hart, it; + numeric u, abot, atop, delta, i; + u = 1in; + abot = 60; + atop = 145; + delta = 23; + z1 = ( 0, 2u); + z2 = ( -1u, 1.25u ); + z3 = ( 1u, 1.25u ); + hart = origin{dir(abot-delta)} + ...z3...{dir(-atop)}z1{dir(atop)} + ...z2...{dir(-abot)}cycle; + it = hart yscaled 0.85; + for i=4 downto -6: + fill lasermachine( it, devi*u*i, 0.3 ) withcolor uniformdeviate(1)*red; + endfor; +endfig; +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp b/Master/texmf-dist/doc/metapost/featpost/example/lcurvature.mp index ca6d5670457..14fc30e7752 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/lcurvature.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/lcurvature.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp b/Master/texmf-dist/doc/metapost/featpost/example/magneticflux.mp index c5f62220794..2266ed50cb6 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/magneticflux.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/magneticflux.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp b/Master/texmf-dist/doc/metapost/featpost/example/mainmemtest.mp index d4ab2a9e4cf..c6ec246fafd 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/mainmemtest.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/mainmemtest.mp @@ -1,8 +1,8 @@ % mainmemtest.mp % L. Nobre G. -% 2003 +% 2007 -%input featpost3D; +input featpost3Dplus2D; beginfig(1); @@ -13,10 +13,15 @@ beginfig(1); color gridvec, sizevec, currpos, starpos, bordpos; numeric i, j, k, counter, theta, phi, thetamin, thetamax, thetastp, long, base; -% It works with sizevec := (8,6,1); +% It should work with sizevec := (8,6,1); % with (9,6,1) and sharpraytrace it says % ! MetaPost capacity exceeded, sorry [main memory size=2199001]. - sizevec := (7,6,1); +% sizevec := (7,6,1); +% This has been degrading all along the growth of FeatPost. +% Now the message is +% ! MetaPost capacity exceeded, sorry [independent variables=33554431]. +% sizevec := (6,6,1); + sizevec := (4,4,1); gridvec := (0.05,0.1,0.1); thetamin := 55; thetamax := 125; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/matricskoc.mp b/Master/texmf-dist/doc/metapost/featpost/example/matricskoc.mp new file mode 100644 index 00000000000..d4bb386717e --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/matricskoc.mp @@ -0,0 +1,22 @@ +% matricskoc.mp +% Pedro Mendonca +% 2006 + +input featpost3Dplus2D; + +prologues:=2; + +beginfig(1); + ParallelProj := false; + SphericalDistortion := false; + Spread:=256; + f:=(5,-2,2); + cartaxes(-.5,.5,.5); + for $=-8 step 1 until 0: + kindofcube(true,true,($,0,0),90,0,0,.3,.05,0.1); + endfor; +endfig; + +end; + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/metalcharge.mp b/Master/texmf-dist/doc/metapost/featpost/example/metalcharge.mp new file mode 100644 index 00000000000..a02ad4a50cd --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/metalcharge.mp @@ -0,0 +1,98 @@ +% metalcharge.mp +% L. Nobre G. +% IYP (2005) + +input featpost3Dplus2D; + +def parabolline( expr ParC, FracofLen ) = + begingroup + numeric Xlengh, Xcontx, Xconty, Xpos, Xa, Xb, Xyfin; + Xlengh = X( ParC ); + Xcontx = Y( ParC ); + Xconty = Z( ParC ); + Xpos = Xlengh*FracofLen; + if FracofLen < Xcontx/Xlengh : + Xa = Xconty*(2/Xcontx - 1/(Xcontx-Xlengh)); + Xb = Xconty*(Xcontx/(Xcontx-Xlengh)-1)/(Xcontx**2); + Xyfin = Xa*Xpos+Xb*(Xpos**2); + else: + Xyfin = Xconty*((Xpos-Xcontx)/(Xcontx-Xlengh)+1); + fi; + ( Xyfin ) + endgroup +enddef; + +beginfig(1); + numeric i, j, k, ang, lengh, contx, conty, resol, pot[], lim, resola, u; + numeric ringcharg[], rinray[], lstep, coun, sumc, dist, sump, fact, sca; + color actpoi, scanpoi, dirv; + pair shiv; + path form, chargedensity, simetr, revolenvel; + lengh = 1.6; + contx = 0.5; +% contx = 0.9; + conty = 0.75; + fact = 0.3; + lim = 30; + resol = 30; + sca = 0.17; + u = 6cm; + shiv = (4cm, 12cm); + resola = 12; %make it even + viewcentr := (0,contx,0); + lstep = lengh/resol; + coun = 0; + for i = 1 upto resol: + rinray[i] = parabolline( (lengh, contx, conty), (i-0.5)/resol ); + ringcharg[i] = 1; + endfor; + forever: + coun := incr( coun ); + sump := 0; + for k=1 upto resol: + actpoi := green*lengh*(k-0.5)/resol + blue*rinray[k]; + pot[k] := 0; + for i=1 upto resol: + for j=1 upto resola: + ang := 360*(j-0.5)/resola-180; + scanpoi:=green*lengh*(i-0.5)/resol+rinray[i]*(sind(ang),0,cosd(ang)); + dirv := actpoi - scanpoi; + dist := 50*conorm( dirv ); + pot[k] := pot[k] + ringcharg[i]/dist; + endfor; + endfor; + sump := sump + pot[k]; + endfor; + sump := sump/resol; + sumc := 0; + for k=1 upto resol: + ringcharg[k] := ringcharg[k]*(1+fact*(sump-pot[k])/sump); + sumc := sumc + ringcharg[k]; + endfor; + for k=1 upto resol: + ringcharg[k] := ringcharg[k]*resol/sumc; + endfor; + exitif coun>lim; + show ringcharg[resol]; + endfor; + for i=1 upto resol: + ringcharg[i] := ringcharg[i]/rinray[i]; + endfor; + chargedensity = ((lstep*u,sca*ringcharg1*u) + for i=2 upto resol: + --(i*lstep*u,sca*ringcharg[i]*u) + endfor) shifted shiv; + draw chargedensity; + form = ((lstep*u,rinray1*u) + for i=2 upto resol: + ..(i*lstep*u,rinray[i]*u) + endfor) shifted shiv; + simetr = ((lstep*u,-rinray1*u) + for i=2 upto resol: + ..(i*lstep*u,-rinray[i]*u) + endfor) shifted shiv; + revolenvel = form...(reverse simetr)...cycle; + draw revolenvel withcolor red; +endfig; + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp b/Master/texmf-dist/doc/metapost/featpost/example/mptoolcone.mp index 4053632efb5..2ddf4bf4f22 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/mptoolcone.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/mptoolcone.mp @@ -2,13 +2,13 @@ % L. Nobre G. % Y2K -%input featpost3Dplus2D; +input featpost3Dplus2D; -input mp-tool; +%input mp-tool; defaultscale := 1.1; % defaultfont := "putr8r"; - defaultfont := "bchr8r"; +% defaultfont := "bchr8r"; beginfig(0); color orig, axxc, ayyc, azzc; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/mpxerr.tex b/Master/texmf-dist/doc/metapost/featpost/example/mpxerr.tex new file mode 100644 index 00000000000..8053d5f92b8 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/mpxerr.tex @@ -0,0 +1,31 @@ +\documentclass{article} +\usepackage{beton} +\usepackage{concmath} +\usepackage{ccfonts} +\begin{document} + +\gdef\mpxshipout{\shipout\hbox\bgroup% + \setbox0=\hbox\bgroup}% +\gdef\stopmpxshipout{\egroup \dimen0=\ht0 \advance\dimen0\dp0 + \dimen1=\ht0 \dimen2=\dp0 + \setbox0=\hbox\bgroup + \box0 + \ifnum\dimen0>0 \vrule width1sp height\dimen1 depth\dimen2 + \else \vrule width1sp height1sp depth0sp\relax + \fi\egroup + \ht0=0pt \dp0=0pt \box0 \egroup} +\mpxshipout% line 41 ./bananadimmer.mp +$\mbox{\protect \scriptsize light}$% +\stopmpxshipout +\mpxshipout% line 42 ./bananadimmer.mp +$\mbox{\protect \scriptsize analyser}$% +\stopmpxshipout +\mpxshipout% line 43 ./bananadimmer.mp +$\mbox{\protect \scriptsize polariser}$% +\stopmpxshipout +\mpxshipout% line 44 ./bananadimmer.mp +$\mathbf{n}_a$% +\stopmpxshipout +% line 76 ./bananadimmer.mp + \end{document} +\end{document} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/mypatent.mp b/Master/texmf-dist/doc/metapost/featpost/example/mypatent.mp new file mode 100644 index 00000000000..703d172acc9 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/mypatent.mp @@ -0,0 +1,319 @@ +% mypatent.mp +% L. Nobre G. +% IYP (2005) + +input featpost3Dplus2D; + +verbatimtex +\documentclass[12pt]{article} +\usepackage{courier} +\begin{document} +{\ttfamily +etex + +vardef P@# = rp(V@#) enddef; + +picture pecaa, pecab, pecabe; + +f := 2*(14,5,10); +Spread := 36; +ahangle := 30; +ahlength := 1.8mm; + +pen pendot, penedge, pendist; +penedge= pencircle scaled 1pt; +pendot = pencircle scaled 1.7pt; +pendist= pencircle scaled 0.4pt; + +numeric u, marg, leves, elast; +u = 0.1; +marg = 16u; +%leves = 410; +leves = 22u; +elast = 1u; + +vardef elastf( expr Ca, Cb ) = Cb + N( Cb-Ca )*elast enddef; + +V1 := (0,0,0); +V2 := (0,0,4u); +V3 := (0,16u,4u); +V4 := (4u,16u,4u); +V5 := (4u,16u,8u); +V6 := (0,16u,8u); +V7 := (0,24u,16u); +V8 := (4u,24u,16u); +V9 := (4u,35u,4u); +V10:= (4u,35u,0); +V11:= (16u,23u,0); +V12:= (16u,23u,4u); +V13:= (16u,0,4u); +V14:= (16u,0,0); +V15:= (0,43u,8u); +V16:= (4u,43u,8u); +V17:= (8u,8u,0); +V18:= (4u,43u,16u); +V19:= (0,43u,16u); + +beginfig(1); + path pat[]; + pat1 = P3--P2--P13--P14--P11--P10--P9--P12--P13; + pat2 = P11--P12; + pat3 = P9--P4--P5--P6--P7--P8--P5; + numeric i; + pat8 = P1-- for i=-90 step 5 until 85: + rp(V15+(0,8u*cosd(i),8u*sind(i))).. + endfor P19--P7; + pat5 = P10-- for i=-90 step 5 until 85: + rp(V16+(0,8u*cosd(i),8u*sind(i))).. + endfor P18--P8; + pat6 = pat1 cutbefore pat3; + pair auxp,auxP; + auxp = point 0 of spatialhalfcircle(V15,red,8.05u,true); + auxP = point 0 of spatialhalfcircle(V16,red,8.05u,true); + pat9 = rp(V15)--auxp; + pat4 = pat8 cutbefore pat9; + pat7 = auxp--auxP; + drawoptions( withpen penedge ); + for i=2 upto 7: + draw pat[i]; + endfor; + fakehole(V15,red*4u, 2u ); + fakehole(V17,blue*4u, 2u ); + pecab = currentpicture; +endfig; + +beginfig(2); + numeric i; + for i=1 upto 19: + V[i+100] := (X(V[i]),-Y(V[i]),Z(V[i]))-(0,marg,0); + endfor; + path pat[]; + pat1 = P109--P112--P113--P102--P101--P114--P111--P110--P109--P104--P103 + --P106--P107--P108--P105--P104; + pat2 = P105--P106; + pat3 = P113--P114; + pat4 = P111--P112; + pat5 = P102--P103; + pat10 = P101-- for i=-90 step 5 until 85: + rp(V115+(0,-8u*cosd(i),8u*sind(i))).. + endfor P119--P107; + pat6 = P110-- for i=-90 step 5 until 85: + rp(V116+(0,-8u*cosd(i),8u*sind(i))).. + endfor P118--P108; + pair auxp,auxP; + auxp = point 0 of spatialhalfcircle(V115,red,8.05u,false); + auxP = point 0 of spatialhalfcircle(V116,red,8.05u,false); + pat9 = P115--auxp; + pat8 = pat10 cutbefore pat9; + pat7 = auxp--auxP; + drawoptions( withpen penedge ); + for i=1 upto 8: + draw pat[i]; + endfor; + fakehole(V115,red*4u, 2u ); + fakehole(V117,blue*4u, 2u ); + pecabe = currentpicture; +% draw pecab; +endfig; + +beginfig(3); + V21:= (24u+marg,0,0); + V22:= (X(V21),Y(V115)+16u,0); + V23:= (X(V21),Y(V15)-16u,0); + V24:= (X(V21),Y(V115),0); + V25:= (X(V21),Y(V15),0); + V26:= (X(V21),Y(V115),4u); + V27:= (X(V21),Y(V15),4u); + V28:= (X(V21),Y(V115)+16u,4u); + V29:= (X(V21),Y(V15)-16u,4u); + path pat[]; + pat1 = for i=-90 step 2 until 90: + rp(V22+(2u*sind(i),-2u*cosd(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V23+(2u*sind(-i),2u*cosd(i),0))... + endfor + cycle; + pat2 = for i=-90 step 2 until 90: + rp(V28+(2u*sind(i),-2u*cosd(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V29+(2u*sind(-i),2u*cosd(i),0))... + endfor + cycle; + pat3 = for i=-90 step 2 until 90: + rp(V24+(8u*sind(i),-8u*cosd(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V25+(8u*sind(-i),8u*cosd(i),0))... + endfor + cycle; + pat4 = for i=-90 step 2 until 90: + rp(V26+(8u*sind(i),-8u*cosd(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V27+(8u*sind(-i),8u*cosd(i),0))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V24,blue,8.05u,true); + auxP = point 0 of spatialhalfcircle(V26,blue,8.05u,true); + auxm = point 0 of spatialhalfcircle(V25,blue,8.05u,false); + auxM = point 0 of spatialhalfcircle(V27,blue,8.05u,false); + pat5 = P24--auxp; + pat6 = P25--auxm; + pat7 = pat3 cutbefore pat5 cutafter pat6; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + drawoptions( withpen penedge ); +% draw pat1; + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V24,blue*4u, 2u ); + fakehole(V25,blue*4u, 2u ); + pecaa = currentpicture; +% draw pecab; +% draw pecabe; +endfig; + +beginfig(4); + V31:= V26-(5u,0,0); + V32:= 0.25*(V105+V106+V107+V108); + V33:= 0.25*(V5+V6+V7+V8); + pair paa, pab, pabe, angs, pn[]; + numeric anxy, angz; + color veca, vecb, auxc, vecc; + angs = getanglepair( f-viewcentr ); + anxy = xpart angs; + angz = ypart angs; + vecb = eulerrotation( anxy, angz+85.5, 0, red ); + veca = eulerrotation( anxy, angz+83.5, 0, red ); + vecc = eulerrotation( anxy, angz+93, 0, red ); + drawoptions( withpen pendist ); + pn2 = rp( lineintersectplan( V26, blue, f, vecb ) ); + draw P26--pn2; + label.top( btex 3 etex, pn2 ); + pn3 = rp( lineintersectplan( V27, blue, f, vecc ) ); + draw P27--pn3; + label.top( btex 3' etex, pn3 ); + auxc = 0.65[V26,V27]; + pn4 = rp( lineintersectplan( auxc, blue, f, vecb ) ); + draw rp(auxc)--pn4; + label.top( btex 4 etex, pn4 ); + pn5 = rp( lineintersectplan( V116, blue, f, vecb ) ); + draw P116--pn5; + label.top( btex 5 etex, pn5 ); + pn6 = rp( lineintersectplan( V117+(0,0,4u), blue, f, vecb ) ); + draw rp(V117+(0,0,4u))--pn6; + label.top( btex 6 etex, pn6 ); + pn7 = rp( lineintersectplan( 0.25*(V103+V104+V105+V106), blue, f, vecb ) ); + draw rp(0.25*(V103+V104+V105+V106))--pn7; + label.top( btex 7 etex, pn7 ); + pn8 = rp( lineintersectplan( 0.5*(V102+V117+(0,0,4u)), blue, f, vecb ) ); + draw rp(0.5*(V102+V117+(0,0,4u)))--pn8; + label.top( btex 8 etex, pn8 ); + + +% paa = rp((X(V31),Y(V31),leves)); +% pab = rp((X(V33),Y(V33),leves)); +% pabe= rp((X(V32),Y(V32),leves)); + paa = rp( lineintersectplan( V31, blue, f, veca ) ); + pab = rp( lineintersectplan( V33, blue, f, veca ) ); + pabe= rp( lineintersectplan( V32, blue, f, veca ) ); + drawoptions( withpen pendot ); + draw P31; + draw P32; + draw P33; + draw paa; + draw pab; + draw pabe; + drawoptions( withpen pendist ); + draw P31--paa; + draw P32--pabe; + draw P33--pab; + label.top( btex 1 etex, paa ); + label.top( btex 2 etex, pabe ); + label.top( btex 2' etex, pab ); +% draw pecaa; +% draw pecab; +% draw pecabe; + V34:= V26+(marg,0,0); + V35:= V27+(marg,0,0); + V36:= elastf(V26,V34 ); + V37:= elastf( V27,V35 ); + V38:= V27+(8u,0,0); + V39:= V25+(8u,0,0); + V40:= V27-(8u,0,0); + V41:= V38+(0,marg,0); + V42:= V39+(0,marg,0); + V43:= V40+(0,marg,0); + V44:= elastf( V38,V41 ); + V45:= elastf( V39,V42 ); + V46:= elastf( V40,V43 ); + V47:= 0.5[V34,V35]; + V48:= 0.5[V41,V42]; + V49:= 0.5[V41,V43]; + draw P26--P36; + draw P27--P37; + draw P38--P44; + draw P39--P45; + draw P40--P46; + drawdblarrow P34--P35; + drawdblarrow P41--P42; + drawdblarrow P41--P43; + label.bot( btex C etex, P47 ); + label.rt( btex E etex, P48 ); + label.rt( btex L etex, P49 ); + V50:= V109 - (0,4u,0); + V51:= V115 + (4u,0,0); + V52:= V51 + (0,4u,0); + V53:= elastf( V109,V50 ); + V54:= elastf( V51,V52 ); + V55:= (8u,8u,4u); + V56:= (8u,8u,8u); + V57:= elastf( V55,V56 ); + V58:= V15+(4u,0,0); + V59:= V58+(4u,0,0); + V60:= elastf( V58,V59 ); + + + drawoptions( withpen penedge ); + draw pecaa; + draw pecab; + draw pecabe; + drawoptions( withpen pendist ); + draw P109--P53; + draw P51--P54; + drawdblarrow P50--P52; + label.rt( btex E etex, 0.5[P52,P50] ); + draw P55--P57; + draw P58--P60; + drawdblarrow P56--P59; + label.top( btex D etex, 0.5[P56,P59] ); + +endfig; + +verbatimtex +} +\end{document} +etex + +end; + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/mypatentpieces.mp b/Master/texmf-dist/doc/metapost/featpost/example/mypatentpieces.mp new file mode 100644 index 00000000000..c2af24f77c7 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/mypatentpieces.mp @@ -0,0 +1,634 @@ +% mypatentpieces.mp +% L. Nobre G. +% IYP (2005) + +input featpost3Dplus2D; + +prologues := 1; + +vardef P@# = rp(V@#) enddef; + +%f := 2*(17,7,9); +f := 2*(21,5,8); +Spread := 36; +background := white; + +numeric u, i; +u = 0.1; +V1 := (0,0,0); +V2 := (0,0,4u); +V3 := (0,16u,4u); +V4 := (4u,16u,4u); +V5 := (4u,16u,8u); +V6 := (0,16u,8u); +V7 := (0,24u,16u); +V8 := (4u,24u,16u); +V9 := (4u,35u,4u); +V10:= (4u,35u,0); +V11:= (16u,23u,0); +V12:= (16u,23u,4u); +V13:= (16u,0,4u); +V14:= (16u,0,0); +V15:= (0,43u,8u); +V16:= (4u,43u,8u); +V17:= (8u,8u,0); +V18:= (4u,43u,16u); +V19:= (0,43u,16u); + +V22:= (-62.5u+16u,0,0); +V23:= (62.5u-16u,0,0); +V24:= (-62.5u,0,0); +V25:= (62.5u,0,0); +V26:= (-62.5u,0,4u); +V27:= (62.5u,0,4u); +V28:= (-62.5u+16u,0,4u); +V29:= (62.5u-16u,0,4u); + +V40:= (95.5u,-43u,-8u); % zero +V42:= (-62.5u+21u,-43u,8u); % 200 +V43:= (-62.5u+17u,-8u,-43u); %300 +V44:= (95.5u,8u,-43u); % 400 +V55:= (-32u,-4u,-35u); % 500 +V56:= (82u,-35.25u,-4u); % 600 %%% +V57:= (50u,0,-35u); % 700 +V58:= (0,-35.13u,0); % 800 %%% + +def indicp( expr Ind ) = + ( rp(V[Ind])--rp( (X(V[Ind]),Y(V[Ind]),40u) ) ) +enddef; + +def indicl( expr Ind ) = + ( rp((X(V[Ind]),Y(V[Ind]),40u)) ) +enddef; + +% 100 +for i=1 upto 19: + V[i+100] := (X(V[i]),-Y(V[i]),Z(V[i])); +endfor; + +% 200 +for i=101 upto 119: + V[i+100] := (X(V[i]),-Y(V[i]),-Z(V[i])); +endfor; + +% 300 +for i=101 upto 119: + V[i+200] := (X(V[i]),Z(V[i]),-Y(V[i])); +endfor; + +% 400 +for i=301 upto 319: + V[i+100] := (-X(V[i]),-Y(V[i]),Z(V[i])); +endfor; + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% zero +for i=1 upto 19: + V[i] := V[i]+V40; +endfor; + +% 200 +for i=201 upto 219: + V[i] := V[i]+V42; +endfor; + +% 300 +for i=301 upto 319: + V[i] := V[i]+V43; +endfor; + +% 400 +for i=401 upto 419: + V[i] := V[i]+V44; +endfor; + +% 500 +for i=22 upto 29: + V[i+500] := (X(V[i]),Z(V[i]),-Y(V[i]))+V55; +endfor; + +% 600 +for i=22 upto 29: + V[i+600] := V[i]+V56; +endfor; + +% 700 +for i=22 upto 29: + V[i+700] := (X(V[i]),Z(V[i]),-Y(V[i]))+V57; +endfor; + +% 800 +for i=22 upto 29: + V[i+800] := V[i]+V58; +endfor; + +numeric dhip, dcat, dhei, dang; +dhip = X(V627)-X(V824); +dcat = X(V25)-X(V24); +dhei = dcat +-+ (0.5*dhip); +dang = angle(0.5*dhip,dhei); + +% 1000 +for i=822 upto 829: + V[i+100] := (X(V[i])*cosd(dang)-Y(V[i])*sind(dang), + X(V[i])*sind(dang)+Y(V[i])*cosd(dang),Z(V[i])); +endfor; +for i=922 upto 929: + V[i+100] := V[i]+V627-V925; +endfor; + +% 900 +for i=622 upto 629: + V[i-500] := (X(V[i])*cosd(dang)+Y(V[i])*sind(dang), + -X(V[i])*sind(dang)+Y(V[i])*cosd(dang),Z(V[i])); +endfor; +for i=122 upto 129: + V[i+800] := V[i]+V824-V126; +endfor; + +beginfig(1); + pen penedge; + penedge= pencircle scaled 1.5pt; + pickup penedge; + path refillpat[], retouchpat[]; + + path pat[]; + pat1 = P309--P312--P313--P314--P311--P310--P309--P304--P305 + --P308--P307; + pat2 = P311--P312; + pat11 = P313--P302--P303; + pat3 = pat11 cutafter pat1; + pat10 = P301-- for i=-90 step 5 until 85: + rp(V315+(0,8u*sind(i),8u*cosd(i))).. + endfor P319--P307; + pat4 = P310-- for i=-90 step 5 until 85: + rp(V316+(0,8u*sind(i),8u*cosd(i))).. + endfor P318--P308; + pair auxp,auxP; + auxp = point 0 of spatialhalfcircle(V315,red,8.05u,false); + auxP = point 0 of spatialhalfcircle(V316,red,8.05u,false); + pat9 = P315--auxp; + pat5 = pat10 cutbefore pat9; + pat6 = auxp--auxP; + for i=1 upto 6: + draw pat[i]; + endfor; + fakehole(V315,red*4u, 2u ); + fakehole(V317,green*4u, 2u ); + V388 := 0.7[V308,V318]; + V379 := 0.7[V307,V319]; + refillpat2 = P309--P304--P305--P308--P307--P379--P388--cycle; + retouchpat3 = P309--P304--P305--P308--P307--P379; + retouchpat4 = P388--P308; + + + path pat[]; + pat1 = for i=-90 step 2 until 90: + rp(V522+(-2u*cosd(i),0,2u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V523+(2u*cosd(i),0,2u*sind(-i)))... + endfor + cycle; + pat2 = for i=-90 step 2 until 90: + rp(V528+(-2u*cosd(i),0,2u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V529+(2u*cosd(i),0,2u*sind(-i)))... + endfor + cycle; + pat3 = for i=-90 step 2 until 90: + rp(V524+(-8u*cosd(i),0,8u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V525+(8u*cosd(i),0,8u*sind(-i)))... + endfor + cycle; + pat4 = for i=-90 step 2 until 90: + rp(V526+(-8u*cosd(i),0,8u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V527+(8u*cosd(i),0,8u*sind(-i)))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V524,green,8.05u,true); + auxP = point 0 of spatialhalfcircle(V526,green,8.05u,true); + auxm = point 0 of spatialhalfcircle(V525,green,8.05u,false); + auxM = point 0 of spatialhalfcircle(V527,green,8.05u,false); + pat5 = P524--auxp; + pat6 = P525--auxm; + pat7 = pat3 cutbefore pat5 cutafter pat6; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + + unfill pat3; +% draw pat1; + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V524,green*4u, 2u ); + fakehole(V525,green*4u, 2u ); + + + path pat[]; + pat1 = for i=-90 step 2 until 90: + rp(V722+(-2u*cosd(i),0,2u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V723+(2u*cosd(i),0,2u*sind(-i)))... + endfor + cycle; + pat2 = for i=-90 step 2 until 90: + rp(V728+(-2u*cosd(i),0,2u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V729+(2u*cosd(i),0,2u*sind(-i)))... + endfor + cycle; + pat3 = for i=-90 step 2 until 90: + rp(V724+(-8u*cosd(i),0,8u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V725+(8u*cosd(i),0,8u*sind(-i)))... + endfor + cycle; + pat4 = for i=-90 step 2 until 90: + rp(V726+(-8u*cosd(i),0,8u*sind(i)))... + endfor + for i=-90 step 2 until 90: + rp(V727+(8u*cosd(i),0,8u*sind(-i)))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V724,green,8.05u,true); + auxP = point 0 of spatialhalfcircle(V726,green,8.05u,true); + auxm = point 0 of spatialhalfcircle(V725,green,8.05u,false); + auxM = point 0 of spatialhalfcircle(V727,green,8.05u,false); + pat5 = P724--auxp; + pat6 = P725--auxm; + pat7 = pat3 cutbefore pat5 cutafter pat6; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + pat10= pat4 cutbefore P727--auxM cutafter P726--auxP; + unfill pat7--pat9--pat10--(reverse pat8)--cycle; +% draw pat1; + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V724,green*4u, 2u ); + fakehole(V725,green*4u, 2u ); + + path pat[]; + pat1 = P401-- for i=90 step -5 until -85: + rp(V415+(0,8u*sind(i),8u*cosd(i))).. + endfor P419--P407--P406--P403--P402--cycle; + pat10 = P401--P414--P411--P410-- for i=90 step -5 until -85: + rp(V416+(0,8u*sind(i),8u*cosd(i))).. + endfor P418; + pair auxp,auxP; + auxp = point 0 of spatialhalfcircle(V415,red,8.05u,false); + auxP = point 0 of spatialhalfcircle(V416,red,8.05u,false); + pat9 = P416--auxP; + pat2 = pat10 cutafter pat9; + pat3 = auxp--auxP; + unfill pat1; + unfill pat10--P403--cycle; + for i=1 upto 3: + draw pat[i]; + endfor; + fakehole(V415,-red*4u, 2u ); + fakehole(V417,-green*4u, 2u ); + + + path pat[]; + pat1 = P3--P2--P13--P14--P11--P10--P9--P12--P13; + pat2 = P11--P12; + pat3 = P9--P4--P5--P6--P7--P8--P5; + numeric i; + pat8 = P1-- for i=-90 step 5 until 85: + rp(V15+(0,8u*cosd(i),8u*sind(i))).. + endfor P19--P7; + pat5 = P10-- for i=-90 step 5 until 85: + rp(V16+(0,8u*cosd(i),8u*sind(i))).. + endfor P18--P8; + pat6 = pat1 cutbefore pat3; + pair auxp,auxP; + auxp = point 0 of spatialhalfcircle(V15,red,8.05u,true); + auxP = point 0 of spatialhalfcircle(V16,red,8.05u,true); + pat9 = rp(V15)--auxp; + pat4 = pat8 cutbefore pat9; + pat7 = auxp--auxP; + unfill buildcycle( pat1, pat5, pat8, reverse pat3 ); + for i=2 upto 7: + draw pat[i]; + endfor; + fakehole(V15,red*4u, 2u ); + fakehole(V17,blue*4u, 2u ); + refillpat1 = P9--P4--P5--P6--P7--P19--P18--cycle; + retouchpat1 = P9--P4--P5--P6--P7--P19; + retouchpat2 = P18--P8--P5; + retouchpat5 = P8--P7; + + path pat[]; + pat2 = for i=-90+dang step 2 until 90+dang: + rp(V928+(-2u*cosd(i),2u*sind(i),0))... + endfor + for i=-90+dang step 2 until 90+dang: + rp(V929+(2u*cosd(i),2u*sind(-i),0))... + endfor + cycle; + pat3 = for i=-90+dang step 2 until 90+dang: + rp(V924+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90+dang step 2 until 90+dang: + rp(V925+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pat4 = for i=-90+dang step 2 until 90+dang: + rp(V926+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90+dang step 2 until 90+dang: + rp(V927+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V924,blue,8.05u,false); + auxP = point 0 of spatialhalfcircle(V926,blue,8.05u,false); + auxm = point 0 of spatialhalfcircle(V925,blue,8.05u,true); + auxM = point 0 of spatialhalfcircle(V927,blue,8.05u,true); + pat5 = P924--auxp; + pat6 = P925--auxm; + pat7 = pat3 cutbefore pat5 cutafter pat6; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + pat10= pat4 cutbefore P927--auxM cutafter P926--auxP; + unfill pat7--pat8--pat10--(reverse pat9)--cycle; + + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V924,blue*4u, 2u ); + fakehole(V925,blue*4u, 2u ); + + path pat[]; + pat1 = for i=-90 step 2 until 90: + rp(V622+(-2u*cosd(i),2u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V623+(2u*cosd(i),2u*sind(-i),0))... + endfor + cycle; + pat2 = for i=-90 step 2 until 90: + rp(V628+(-2u*cosd(i),2u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V629+(2u*cosd(i),2u*sind(-i),0))... + endfor + cycle; + pat3 = for i=-90 step 2 until 90: + rp(V624+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V625+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pat4 = for i=-90 step 2 until 90: + rp(V626+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V627+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V624,blue,8.05u,false); + auxP = point 0 of spatialhalfcircle(V626,blue,8.05u,false); + auxm = point 0 of spatialhalfcircle(V625,blue,8.05u,true); + auxM = point 0 of spatialhalfcircle(V627,blue,8.05u,true); + pat5 = P624--auxp; + pat6 = P625--auxm; + pat7 = pat3 cutbefore pat5 cutafter pat6; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + unfill pat3; + +%% pat10 = buildcycle( pat1, pat2 ); +%% draw pat10; +%% draw pat1 cutbefore pat2; +%% THIS IS BAD, VERY BAD!!!! BUILDCYCLE DOES NOT WORK!!!! +% show length pat1; +% show pat1 intersectiontimes pat2; +% show reverse pat1 intersectiontimes pat2; + numeric auxta, auxtb; + auxta = xpart (reverse pat1 intersectiontimes pat2); + auxtb = xpart (pat1 intersectiontimes pat2); + draw subpath (-auxta,auxtb) of pat1; + + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V624,blue*4u, 2u ); + fakehole(V625,blue*4u, 2u ); + + + path pat[]; + pat1 = for i=-90 step 2 until 90: + rp(V822+(-2u*cosd(i),2u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V823+(2u*cosd(i),2u*sind(-i),0))... + endfor + cycle; + pat2 = for i=-90 step 2 until 90: + rp(V828+(-2u*cosd(i),2u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V829+(2u*cosd(i),2u*sind(-i),0))... + endfor + cycle; + pat3 = for i=-90 step 2 until 90: + rp(V824+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V825+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pat4 = for i=-90 step 2 until 90: + rp(V826+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90 step 2 until 90: + rp(V827+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V824,blue,8.05u,false); + auxP = point 0 of spatialhalfcircle(V826,blue,8.05u,false); + auxm = point 0 of spatialhalfcircle(V825,blue,8.05u,true); + auxM = point 0 of spatialhalfcircle(V827,blue,8.05u,true); + pat5 = P824--auxp; + pat6 = P825--auxm; + pat7 = pat3 cutbefore pat5 cutafter pat6; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + pat10= pat4 cutbefore P827--auxM cutafter P826--auxP; + unfill pat7--pat9--pat10--(reverse pat8)--cycle; + + %% pat10 = buildcycle( pat1, pat2 ); + %% draw pat10; + %% draw pat1 cutbefore pat2; + %% THIS IS BAD, VERY BAD!!!! BUILDCYCLE DOES NOT WORK!!!! + % show length pat1; + % show pat1 intersectiontimes pat2; + % show reverse pat1 intersectiontimes pat2; + numeric auxta, auxtb; + auxta = xpart (reverse pat1 intersectiontimes pat2); + auxtb = xpart (pat1 intersectiontimes pat2); + draw subpath (-auxta,auxtb) of pat1; + + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V824,blue*4u, 2u ); + fakehole(V825,blue*4u, 2u ); + + + path pat[]; + pat1 = P209--P212--P213--P214--P211; + pat10 = P211--P210-- for i=90 step -5 until -85: + rp(V216+(0,8u*cosd(i),8u*sind(i))).. + endfor P218--P208--P205; + pat2 = pat10 cutafter pat1; + pat11 = P214--P201-- for i=90 step -5 until -85: + rp(V215+(0,8u*cosd(i),8u*sind(i))).. + endfor P219--P207; + pair auxp,auxP; + auxp = point 0 of spatialhalfcircle(V215,red,8.05u,true); + auxP = point 0 of spatialhalfcircle(V216,red,8.05u,true); + pat9 = P215--auxp; + pat3 = pat11 cutafter pat9; + pat4 = auxp--auxP; + pat6 = P211--P212; + pat5 = P210--P209; + unfill buildcycle(pat1,pat11,pat10); + for i=1 upto 6: + draw pat[i]; + endfor; + fakehole(V215,red*4u, 2u ); + fakehole(V217,-blue*4u, 2u ); + + unfill refillpat1; + draw retouchpat1; + draw retouchpat2; + unfill refillpat2; + draw retouchpat3; + draw retouchpat4; + draw retouchpat5; + + unfill buildcycle(pat1,pat11,pat10); + for i=1 upto 6: + draw pat[i]; + endfor; + fakehole(V215,red*4u, 2u ); + fakehole(V217,-blue*4u, 2u ); + + % label.top( "40", indicl(40) ); + % label.top( "42", indicl(42) ); + % label.top( "43", indicl(43) ); + % label.top( "44", indicl(44) ); + % label.top( "55", indicl(55) ); + % label.top( "56", indicl(56) ); + % label.top( "57", indicl(57) ); + % label.top( "58", indicl(58) ); + + % draw indicp(40); + % draw indicp(42); + % draw indicp(43); + % draw indicp(44); + % draw indicp(55); + % draw indicp(56); + % draw indicp(57); + % draw indicp(58); + + path pat[]; + pat1 = for i=-90-dang step 2 until 90-dang-2: + rp(V1022+(-2u*cosd(i),2u*sind(i),0))... + endfor rp(V1022+(-2u*cosd(90-dang),2u*sind(90-dang),0)); + pat11 = for i=-90-dang step 2 until 90-dang-2: + rp(V1023+(2u*cosd(i),2u*sind(-i),0))... + endfor rp(V1023+(2u*cosd(90-dang),2u*sind(-90+dang),0)); + pat2 = for i=-90-dang step 2 until 90-dang: + rp(V1028+(-2u*cosd(i),2u*sind(i),0))... + endfor + for i=-90-dang step 2 until 90-dang: + rp(V1029+(2u*cosd(i),2u*sind(-i),0))... + endfor + cycle; + pat3 = for i=-90-dang step 2 until 90-dang: + rp(V1024+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90-dang step 2 until 90-dang: + rp(V1025+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pat4 = for i=-90-dang step 2 until 90-dang: + rp(V1026+(-8u*cosd(i),8u*sind(i),0))... + endfor + for i=-90-dang step 2 until 90-dang: + rp(V1027+(8u*cosd(i),8u*sind(-i),0))... + endfor + cycle; + pair auxp, auxP, auxm, auxM; + auxp = point 0 of spatialhalfcircle(V1024,blue,8.05u,true); + auxP = point 0 of spatialhalfcircle(V1026,blue,8.05u,true); + auxm = point 0 of spatialhalfcircle(V1025,blue,8.05u,false); + auxM = point 0 of spatialhalfcircle(V1027,blue,8.05u,false); + pat5 = P1024--auxp; + pat6 = P1025--auxm; + pat7 = pat3 cutbefore pat6 cutafter pat5; + pat8 = auxp--auxP; + pat9 = auxm--auxM; + pat10= pat4 cutbefore P1027--auxM cutafter P1026--auxP; + unfill pat7--pat8--pat10--(reverse pat9)--cycle; + + draw (point (length pat1) of pat1 -- point 0 of pat11) cutafter pat2; + draw pat1 cutbefore pat2; + draw pat2; + draw pat7; + draw pat4; + draw pat8; + draw pat9; + fakehole(V1024,blue*4u, 2u ); + fakehole(V1025,blue*4u, 2u ); + + + + +endfig; + +end. + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/mysquaresectionbar.mp b/Master/texmf-dist/doc/metapost/featpost/example/mysquaresectionbar.mp new file mode 100644 index 00000000000..0eeec52ecf3 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/mysquaresectionbar.mp @@ -0,0 +1,33 @@ +% mysquaresectionbar.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +prologues := 1; + +f := (3.5,3,2.5); +Spread := 175; +beginfig(1); + numeric alfa, beta; + alfa = 22.62; + kindofcube(false,false,(-0.65,0,-0.6), 90,0,0,1.35,0.05,0.05); + kindofcube(false,false,(-0.65,0,0.6), 90,0,0,0.35,0.05,0.05); + kindofcube(false,false,(-0.6,-0.4,0), 90,90-alfa,0,1.35,0.05,0.05); + kindofcube(false,false,(-0.6,0.4,0), 90,90+alfa,0,1.35,0.05,0.05); + kindofcube(false,false,(-0.6,-0.05,0.05),0,90,0,1.35,0.05,0.05); + kindofcube(false,false,(0.6,-0.05,0.05), 0,90,0,1.35,0.05,0.05); + kindofcube(false,false,(0,0,-0.3), 0,alfa,0,1.35,0.05,0.05); + kindofcube(false,false,(0,0,0.3), 0,-alfa,0,1.35,0.05,0.05); + kindofcube(false,false,(0.6,-0.4,0), 90,90-alfa,0,1.35,0.05,0.05); + kindofcube(false,false,(0.6,0.4,0), 90,90+alfa,0,1.35,0.05,0.05); + kindofcube(false,false,(0.65,0,-0.6), 90,0,0,1.35,0.05,0.05); + kindofcube(false,false,(0.65,0,0.6), 90,0,0,0.35,0.05,0.05); + kindofcube(false,false,(0,0,0.65), 0,0,0,1.35,0.05,0.05); +endfig; + +end; +
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp b/Master/texmf-dist/doc/metapost/featpost/example/nembends.mp index 5900e88d187..62a3dad9ff6 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nembends.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nembends.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; %input mp-tool; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp b/Master/texmf-dist/doc/metapost/featpost/example/nembiaxi.mp index 99bfbc7b87b..2a239e8aa28 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/nembiaxi.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nembiaxi.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp b/Master/texmf-dist/doc/metapost/featpost/example/nemdirector.mp index 4c1d88fe095..91b807e5c8c 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemdirector.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nemdirector.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp b/Master/texmf-dist/doc/metapost/featpost/example/nemquira.mp index 41caf4578a6..b0301a01962 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nemquira.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp b/Master/texmf-dist/doc/metapost/featpost/example/nemquirapitch.mp index d29f0ffeb10..0c60c137059 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquirapitch.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nemquirapitch.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp b/Master/texmf-dist/doc/metapost/featpost/example/nemsaddl.mp index ccc7d9852a1..fcf1e2f8a7b 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/nemsaddl.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nemsaddl.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp b/Master/texmf-dist/doc/metapost/featpost/example/nemuniax.mp index b2ebec11c8f..93d2a8b2f31 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemuniax.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nemuniax.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); f := 2*(5,3,4); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp b/Master/texmf-dist/doc/metapost/featpost/example/newexperimental.mp index bfacd32ae1f..50e83637022 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/newexperimental.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/newexperimental.mp @@ -2,8 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3D; -%input featpost2D; +input featpost3Dplus2D; %verbatimtex %\documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp b/Master/texmf-dist/doc/metapost/featpost/example/nsmetica.mp index d13a33e1cc3..e9d82e9c939 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/nsmetica.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/nsmetica.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/nurbstobeziern.mp b/Master/texmf-dist/doc/metapost/featpost/example/nurbstobeziern.mp new file mode 100644 index 00000000000..504ec4c682b --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/nurbstobeziern.mp @@ -0,0 +1,205 @@ +% nurbstobezier.mp +% Troy Henderson +% 2007 + +prologues := 1; + +% Evaluate a cubic polynomial of the "standard" Bezier form at t +vardef evalbezier(expr p,t) = + save _a,_b,_c,_d; + numeric _a,_b,_c,_d; + _a:=(1-t)**3; + _b:=3*((1-t)**2)*t; + _c:=3*(1-t)*(t**2); + _d:=t**3; + (point 0 of p)*_a + (postcontrol 0 of p)*_b + (precontrol 1 of p)*_c + (point 1 of p)*_d +enddef; + +% Evaluate the derivative of a cubic polynomial of the "standard" +% Bezier form at t +vardef evalbezierderivative(expr p,t) = + save _a,_b,_c; + pair _a,_b,_c; + _a:=3*((point 1 of p) - 3*(precontrol 1 of p) + 3*(postcontrol 0 of p) -(point 0 of p)); + _b:=6*((precontrol 1 of p) - 2*(postcontrol 0 of p) + (point 0 of p)); + _c:=3*((postcontrol 0 of p) - (point 0 of p)); + _a*(t**2) + _b*t + _c +enddef; + +% Evaluate a rational function of the "standard" cubic NURBS form at t +vardef evalnurbs(expr p,w,t) = + save _q,_r; + path _q,_r; + _q:=((cyanpart w)*(point 0 of p)).. controls ((magentapart w)*(postcontrol 0 of p)) and ((yellowpart w)*(precontrol 1 of p)) .. ((blackpart w)*(point 1 of p)); + _r:=(cyanpart w,0) .. controls (magentapart w,0) and (yellowpart w,0) .. (blackpart w,0); + evalbezier(_q,t)/(xpart evalbezier(_r,t)) +enddef; + +% Evaluate the derivative of a rational function of the "standard" +% cubic NURBS form at t +vardef evalnurbsderivative(expr p,w,t) = + save _a,_b,_c,_d,_q,_r; + pair _a,_b; + numeric _c,_d; + path _q,_r; + _q:=((cyanpart w)*(point 0 of p)) .. controls ((magentapart w)*(postcontrol 0 of p)) and ((yellowpart w)*(precontrol 1 of p)) .. ((blackpart w)*(point 1 of p)); + _r:=(cyanpart w,0) .. controls (magentapart w,0) and (yellowpart w,0) .. (blackpart w,0); + _a:=evalbezier(_q,t); + _b:=evalbezierderivative(_q,t); + _c:=xpart evalbezier(_r,t); + _d:=xpart evalbezierderivative(_r,t); + (_b*_c-_a*_d)/(_c**2) +enddef; + +% Fit a cubic polynomial of the "standard" Bezier form to a +% rational function of the +% "standard" cubic NURBS form with function and derivative agreement +% at tmin and tmax +vardef nurbstobezier(expr p,w,tmin,tmax) = + save _a,_b,_c,_d,_e; + pair _a,_b,_c,_d; + numeric _e; + _e:=(tmax-tmin)/3; + _a:=evalnurbs(p,w,tmin); + _b:=_a + _e*evalnurbsderivative(p,w,tmin); + _d:=evalnurbs(p,w,tmax); + _c:=_d - _e*evalnurbsderivative(p,w,tmax); + _a .. controls _b and _c .. _d +enddef; + +% Reparameterize a cubic polynomial of the "standard" Bezier form by mapping +% the interval [tmin,tmax] to [0,1] +vardef beziertobezier(expr p,tmin,tmax) = + nurbstobezier(p,(1,1,1,1),tmin,tmax) +enddef; + +% Evalute the L^2[0,1] norm of a cubic polynomial of the "standard" +% Bezier form +vardef beziernorm(expr p) = + save _a,_b,_c,_d,_i,_xabs,_yabs,_A,_B,_C,_D,_I; + numeric _a,_b,_c,_d,_i,_xabs,_yabs,_A,_B,_C,_D,_I; + _xabs:=max(abs(xpart point 0 of p),abs(xpart postcontrol 0 of p),abs(xpart precontrol 1 of p),abs(xpart point 1 of p)); + _yabs:=max(abs(ypart point 0 of p),abs(ypart postcontrol 0 of p),abs(ypart precontrol 1 of p),abs(ypart point 1 of p)); + if (_xabs > 0): + _a:=xpart((point 1 of p) - 3*(precontrol 1 of p) + 3*(postcontrol 0 of p) - (point 0 of p))/_xabs; + _b:=3*xpart((precontrol 1 of p) - 2*(postcontrol 0 of p) + (point 0 of p))/_xabs; + _c:=3*xpart((postcontrol 0 of p) - (point 0 of p))/_xabs; + _d:=xpart(point 0 of p)/_xabs; + _i:=(_a**2)/7 + ((_b)**2 + 2*_a*_c)/5 + (_a*_b + 2*_b*_d + (_c**2))/3 + (_a*_d + _b*_c)/2 + (_c*_d + (_d**2)); + else: + _i:=0; + fi; + if (_yabs > 0): + _A:=ypart((point 1 of p) - 3*(precontrol 1 of p) + 3*(postcontrol 0 of p) - (point 0 of p))/_yabs; + _B:=3*ypart((precontrol 1 of p) - 2*(postcontrol 0 of p) + (point 0 of p))/_yabs; + _C:=3*ypart((postcontrol 0 of p) - (point 0 of p))/_yabs; + _D:=ypart(point 0 of p)/_yabs; + _I:=(_A**2)/7 + ((_B)**2 + 2*_A*_C)/5 + (_A*_B + 2*_B*_D + (_C**2))/3 + (_A*_D + _B*_C)/2 + (_C*_D + (_D**2)); + else: + _I:=0; + fi; + (_xabs*sqrt(_i)) ++ (_yabs*sqrt(_I)) +enddef; + +% Fit a cubic Bezier spline to a rational function of the "standard" +% cubic NURBS form by iteratively refining the Bezier curve. +% p is a 4 point path containing the 4 cubic NURBS (2D) control points +% w is a cmykcolor containing the 4 cubic NURBS weights +% EPS is the tolerance to stop refining each branch of the Bezier spline +vardef fitnurbswithbezier(expr p,w,EPS) = + save _a,_b,_c,_e,_error,_k,_q; + numeric _a,_b,_c,_error,_k; + path _q,_q[],_e; + _a:=0; + _b:=1; + _k:=1/sqrt(2); + _q:=(point 0 of p); + _q[4]:=nurbstobezier(p,w,_a,_b); + forever: + exitunless(_a<1); + _q[1]:=_q[4]; + _c:=_b-_k*((_b-_a)**2); + _q[2]:=beziertobezier(_q[1],_a,_c); + _q[3]:=nurbstobezier(p,w,_a,_c); + _q[4]:=_q[3]; + _e:=((point 0 of _q[2])-(point 0 of _q[3])) .. controls ((postcontrol 0 of _q[2])-(postcontrol 0 of _q[3])) and ((precontrol 1 of _q[2])-(precontrol 1 of _q[3])) .. ((point 1 of _q[2])-(point 1 of _q[3])); + _error:=beziernorm(_e)/beziernorm(_q[3]); + show _error; + if (_error > EPS): + _b:=_c; + else: + _q[2]:=beziertobezier(_q[1],_c,_b); + _q[3]:=nurbstobezier(p,w,_c,_b); + _e:=((point 0 of _q[2])-(point 0 of _q[3])) .. controls ((postcontrol 0 of _q[2])-(postcontrol 0 of _q[3])) and ((precontrol 1 of _q[2])-(precontrol 1 of _q[3])) .. ((point 1 of _q[2])-(point 1 of _q[3])); + _error:=beziernorm(_e)/beziernorm(_q[3]); + if (_error > EPS): + _q:=_q .. controls (postcontrol 0 of _q[4]) and (precontrol 1 of _q[4]) .. (point 1 of _q[4]); + _a:=_c; + _q[4]:=_q[3]; + else: + _q:=_q .. controls (postcontrol 0 of _q[1]) and (precontrol 1 of _q[1]) .. (point 1 of _q[1]); + _a:=_b; + _q[4]:=nurbstobezier(p,w,_a,1); + fi; + _b:=1; + fi; + endfor; + _q +enddef; + +% This macro is used to provide a path to draw the NURBS +% It returns a path of length N passing through N+1 equally spaced +% (in time) points along the NURBS connected by line segments +vardef samplednurbs(expr p,w,N) = + save _a,_b,_c,_d,_n,_t,_q; + numeric _a,_b,_c,_d,_n,_t; + path _q; + _q:=(point 0 of p); + for _n=1 upto N: + _t:=_n/N; + _a:=(cyanpart w)*((1-_t)**3); + _b:=3*(magentapart w)*((1-_t)**2)*_t; + _c:=3*(yellowpart w)*(1-_t)*(_t**2); + _d:=(blackpart w)*(_t**3); + _q:=_q .. ((_a*(point 0 of p)+_b*(postcontrol 0 of p)+_c*(precontrol 1 of p)+_d*(point 1 of p))/(_a+_b+_c+_d)); + endfor; + ( _q ) +enddef; + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Here's where the fun begins % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +beginfig(0); +% p contains the 4 control points of the rational function of the +% "standard" cubic NURBS form + path p; + p:=(297.63725,297.63725) .. controls (132.98871,286.67885) and (180.62535,152.16249) .. (429.54399,226.31157); + +% w contains the 4 weights for the rational function of the +% "standard" cubic NURBS form + cmykcolor w; + w:=(2.15756,1.6709,0.8598,1.34647); + +% EPS represents the minimum "acceptable error" to stop refining any +% given branch of the Bezier + Err:=0.040; + +% q represents the Bezier spline fit to the rational function of the +% "standard" cubic NURBS form + path q; + q:=fitnurbswithbezier(p,w,Err); +% q:=fitnurbswithbezier(reverse p,(blackpart w,yellowpart w,magentapart w,cyanpart w),Err); + +% draw the NURBS by sampling it at many points and connecting the +% samples via line segments + draw samplednurbs(p,w,20) withcolor red withpen pencircle scaled 2bp; + +% draw the Bezier spline and its knots + draw q; + for n=0 upto length q: + draw fullcircle scaled 2 shifted point n of q withcolor blue; + endfor; +endfig; + +end diff --git a/Master/texmf-dist/doc/metapost/featpost/example/optica.mp b/Master/texmf-dist/doc/metapost/featpost/example/optica.mp new file mode 100644 index 00000000000..1da10517f82 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/optica.mp @@ -0,0 +1,206 @@ +% optica.mp +% P. J. Sebastiao + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex + +beginfig(1); + color orig, axxc, ayyc, azzc; + color field, nalfa, ngamma[], alfacnt, gammacnt, nazy, nax, proj, align; + path alfa, gamma; + numeric nalfad, theta, radius, gammang, xxsize, yysize, zzsize; + numeric xxpos, yypos, zzpos, fieldpos, deltarad, deltapos,angrecto; + numeric thetarad, thetapos, nalfapos, ngammapos,veccpos,betarad,betapos; + numeric etalpharad, etalphapos, alphapos, gammapos; + picture xxlabel, yylabel, zzlabel, fieldlabel, deltalabel, xxcalabel,yycalabel,aMlabel; + picture nalfalabel, ngammalabel, etalphalabel, alphalabel; + picture gammalabel, thetalabel,vecclabel,betalabel; + + f := (3,4,2); + nbeta := 1.3; + beta := 12; + betarad := 0.6; + betapos := 1; + deltarad := 0.8; + deltapos := 2; + nalfad := 1.0; + theta := 15; + delta := 35; + thetarad := 0.3; + thetapos := 2; + nalfapos := 1; + gammang := 60; + ngammapos := 7; + etalpharad := 0.6; + etalphapos := 2; + alphapos := 2; + alpharad := 0.9; + gammapos := 4; + Spread := 100; + xxsize := 0.8; + xxpos := 6; + yysize := 1.3; + yypos := 6; + zzsize := 1.3; + zzpos := 4; +% angrecto := 0.2; + + xxcalabel = btex $x_{\mbox{\protect \scriptsize }}$ etex; + yycalabel = btex $y_{\mbox{\protect \scriptsize }}$ etex; + xxlabel = btex $\mbox{\protect \scriptsize ligth}$ etex; + yylabel = btex $\mbox{\protect \scriptsize analyser}$ etex; + zzlabel = btex $\mbox{\protect \scriptsize polariser}$ etex; + deltalabel = btex $\Delta$ etex; + aMlabel = btex $\bar{\alpha}$ etex; + fieldlabel = btex $\mathbf{B}$ etex; + thetalabel = btex $\Delta$ etex; + betalabel = btex $\xi$ etex; + nalfalabel = btex $\mathbf{n}_a$ etex; + ngammalabel = btex $\mathbf{n}_\gamma$ etex; + etalphalabel= btex $\theta$ etex; + alphalabel = btex $\alpha$ etex; + gammalabel = btex $\gamma$ etex; + vecclabel = btex $\mathbf{c}$ etex; + veccpos = 3; + field = (0.7,0,0); + fieldpos = 2; + orig = (0,0,0); + axxc = (xxsize,0,0); + ayyc = (0,yysize,0); + azzc = (0,0,zzsize); + nalfa = (0,nbeta*cosd(beta)*sind(delta),nbeta*cosd(beta)*cosd(delta)); + alfacnt = nalfa; + radius = nbeta*sind(beta); + alfa = rigorouscircle( alfacnt, (0,0,1), radius ); + gammacnt = nalfa; + gamma = rigorouscircle( gammacnt, nalfa, radius ); + + for i=0 step 40 until 0: + nazy := radius*sind(gammang+i)*ncrossprod( nalfa, axxc ); + nax := radius*cosd(gammang+i)*ncrossprod( ayyc, nalfa ); + ngamma[i] := gammacnt+nax+nazy; + pickup pencircle scaled 1.5; + drawarrow rp(orig)..rp(ngamma[i]); + endfor; + pickup pencircle scaled 0.5; + +% draw alfa dashed evenly; + align = 1*(0,+sind(10),cosd(10)); + draw rp(orig)..rp(align); + drawarrow rp(orig)..rp(axxc); + drawarrow rp(orig)..rp(ayyc); +% draw rp(orig)..rp(-axxc); + drawarrow rp(orig)..rp(azzc); +% drawarrow rp(orig)..rp(field); + draw rp(orig)..rp(nalfa); +% draw subpath (3.05,1.05) of alfa; +% drawarrow subpath (4,3) of alfa; +% draw subpath (0,1.3) of gamma; +% draw subpath (7.5,8) of gamma; +% drawarrow subpath (1,2) of gamma; +% anglinen( field, azzc, orig, deltarad, deltalabel, deltapos ); + anglinen( ngamma0, nalfa, orig, betarad, betalabel, betapos ); + anglinen( azzc, align, orig, deltarad, deltalabel, deltapos ); + anglinen( align, nalfa, orig, deltarad, aMlabel, deltapos ); +% anglinen( ngamma0, field, orig, etalpharad, etalphalabel, etalphapos ); + labeln( xxlabel, rp(axxc), xxpos ); + labeln( yylabel, rp(ayyc), yypos ); + labeln( zzlabel, rp(azzc), zzpos ); +% labeln( fieldlabel, rp(field), fieldpos ); +% labeln( nalfalabel, rp(nalfa), nalfapos ); + labeln( ngammalabel, rp(ngamma0), ngammapos ); +% labeln( alphalabel, point 1.8 of alfa, alphapos ); + labeln( gammalabel, point 2.1 of gamma, gammapos ); +% labeln( xxcalabel, rp(gammacnt+1.3*radius*(1,0,0)), 1); +% labeln( yycalabel, rp(gammacnt+1.3*radius*(0,1,-sind(theta))), 2); + pickup pencircle scaled 0.5; + draw rp((0,0,0))..rp(alfacnt); + draw rp(gammacnt); + pickup pencircle scaled 0.5; + + path arco, recta_um, recta_quatro, recta_dois, recta_ylayer, recta_xlayer, path_ngamma, recta_tres; + color tmp, tmpo; + pickup pencircle scaled 0.5; + tmp = gammacnt+radius*(0,-cosd(delta),sind(delta)); + tmpo = gammacnt+radius*(0,cosd(delta),-sind(delta)); + recta_um = rp(tmpo)--rp(gammacnt)--rp(tmp)--rp((0,0,Z(tmp))); + draw recta_um; + +% align = (0,Z(tmp)*sind(10),Z(tmp)); + drawarrow rp(orig)--rp((0,Z(tmp)*sind(10),Z(tmp))); + labeln( btex $\mbox{\protect \scriptsize rubbing}$ etex, rp((0,Z(tmp)*sind(10),Z(tmp))), 1 ); + + + angrecto=nbeta*cosd(beta); + recta_quatro = rp((0,angrecto*sind(delta),angrecto*cosd(delta)))--rp((0,angrecto*sind(delta),0)); +% recta_tres = rp((0,angrecto*sind(delta)+radius*sind(gammang)*cosd(delta),angrecto*cosd(delta)))--rp((0,angrecto*sind(delta)+radius*sind(gammang)*cosd(delta),0)); + recta_tres = rp((0,angrecto*sind(delta)+radius*sind(gammang)*cosd(delta),angrecto*cosd(delta)-radius*sind(gammang)*sind(delta)))--rp((0,angrecto*sind(delta)+radius*sind(gammang)*cosd(delta),0)); + +% recta_dois = rp(angrecto*cosd(delta)*(0,0,1))--rp((0,angrecto*sind(delta)+radius*sind(gammang)*cosd(delta),angrecto*cosd(delta))); +% recta_dois = rp(gammacnt)--rp((0,angrecto*sind(delta)+radius*sind(gammang)*cosd(delta),angrecto*cosd(delta))); + recta_dois = rp(gammacnt)--rp((0,nbeta*cosd(beta)*sind(delta),0)); +% draw recta_dois; + draw recta_tres; +% draw recta_quatro; + + pickup pencircle scaled 1; + arco = (alfa cutbefore recta_dois) cutafter recta_um; +% draw arco; + + + pickup pencircle scaled 0.5; + drawarrow rp(gammacnt)--rp(gammacnt+1.3*radius*(1,0,0)); + +% path_ngamma = rp(gammacnt)--rp(ngamma0); + path_ngamma = rp(gammacnt)--rp(ngamma0)--rp((0,0,0)); + draw path_ngamma; +%%% c vector +% drawarrow rp(gammacnt)--rp(ngamma0); + + recta_xlayer = rp(gammacnt)--rp(gammacnt+1.3*radius*(1,0,0)); +% recta_xlayer = rp(gammacnt)--rp(gammacnt+1.3*radius*(0,1,-sind(theta))); + drawarrow recta_xlayer; + + +% recta_ylayer = rp(gammacnt)--rp(gammacnt+1.3*radius*(0,1,-sind(theta))); +% drawarrow recta_ylayer; + + proj = gammacnt+radius*sind(gammang)*(0,cosd(delta),-sind(delta)); + recta_ylayer = rp(gammacnt)--rp(proj); + draw recta_ylayer; + draw rp(ngamma0)..rp(proj); + draw rp(orig)..rp(proj); + draw rp(ngamma0)..rp(1.1*etalpharad*(1,0,0)+proj); + draw rp(1.1*etalpharad*(1,0,0)+proj)..rp(1.1*etalpharad*(1,0,0)); +% draw rp(radius*cosd(gammang)*(1,0,0))..rp(ngamma0); + anglinen( proj, nalfa, orig, alpharad, alphalabel, alphapos ); + + pickup pencircle scaled 1; + + arco := (gamma cutbefore recta_xlayer) cutafter path_ngamma; + draw gamma; +% draw arco; + undraw arco; + arco := (gamma cutbefore recta_ylayer) cutafter path_ngamma; +% draw gamma; +% draw arco; + undraw arco; + + pickup pencircle scaled 0.5; + draw gamma dashed evenly; + +% draw subpath (0,0.9) of gamma; +% draw subpath (7.6,8) of gamma; +% draw subpath (1.5,8) of gamma; +% draw subpath (3.2,1.2) of alfa; +% labeln( vecclabel, rp(ngamma0), veccpos); + anglinen( ngamma0, field, orig, etalpharad, etalphalabel, etalphapos ); +endfig; + +verbatimtex \end{document} etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp b/Master/texmf-dist/doc/metapost/featpost/example/par3Dplotexamples.mp index 6b05682918a..2b191018960 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/highmemory/par3Dplotexamples.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/par3Dplotexamples.mp @@ -6,6 +6,8 @@ % Figure (2) retouched in 2004 by L. Nobre G. +input featpost3Dplus2D; + verbatimtex \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp b/Master/texmf-dist/doc/metapost/featpost/example/parafuso.mp index 74e8cda3e77..25030d33400 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/parafuso.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/parafuso.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2005 -%input featpost3Dplus2D; +input featpost3Dplus2D; def theline( expr TheVal ) = begingroup @@ -19,6 +19,20 @@ def theline( expr TheVal ) = endgroup enddef; +def thexyline( expr TheVal ) = + begingroup + numeric par[], cred, cgre, param; + par0 = 0; + par1 = 6*360; + par2 = 0.3; + par3 = 850; + param = par0+TheVal*(par1-par0); + cred = -par2*cosd( param ); + cgre = param/par3; + ( (cred,cgre,0) ) + endgroup +enddef; + def loxodrome( expr TheVal ) = begingroup numeric cred, cgre, cblu, alpha, theta, ratio, radio; @@ -94,6 +108,32 @@ beginfig(3); doitnow; endfig; +beginfig(4); + numeric axsize, zaxpos, zaxlen; + color xbeg, xend, ybeg, yend, zbeg, zend; + axsize = 0.85; + zaxpos = 0.55; + zaxlen = 2.1; + pickup pencircle scaled 1.5pt; + xbeg = (axsize,0,0); + xend = (-axsize,0,0); + ybeg = (0,0,-axsize); + yend = (0,0,axsize); + zbeg = (zaxpos,-zaxpos,0); + zend = (zaxpos,zaxlen,0); + drawarrow rp( xbeg )--rp( xend ); + drawarrow rp( ybeg )--rp( yend ); +% defaultfont := "putr8r"; + defaultscale := 0.65; + label.rt( "X", rp( xend ) ); + label.lft( "Y", rp( yend ) ); + closedline( false, 70, 0.5, 0.95, thexyline ); + closedline( false, 70, 0.5, 0.95, theline ); + drawarrow rp( zbeg )--rp( zend ); + label.bot( "Z", rp( zend ) ); + doitnow; +endfig; + end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/parafusoprojxy.mp b/Master/texmf-dist/doc/metapost/featpost/example/parafusoprojxy.mp new file mode 100644 index 00000000000..e43c2966674 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/parafusoprojxy.mp @@ -0,0 +1,64 @@ +% parafusoprojxy.mp +% L. Nobre G. +% 2009 + +input featpost3Dplus2D; + +def theline( expr TheVal ) = + begingroup + numeric par[], cred, cgre, cblu, param; + par0 = 0; + par1 = 6*360; + par2 = 0.3; + par3 = 850; + param = par0+TheVal*(par1-par0); + cred = -par2*cosd( param ); + cblu = par2*sind( param ); + cgre = param/par3; + ( (cred,cgre,cblu) ) + endgroup +enddef; + +def thexyline( expr TheVal ) = + begingroup + numeric par[], cred, cgre, param; + par0 = 0; + par1 = 6*360; + par2 = 0.3; + par3 = 850; + param = par0+TheVal*(par1-par0); + cred = -par2*cosd( param ); + cgre = param/par3; + ( (cred,cgre,0) ) + endgroup +enddef; + +f := (3,5,15); +beginfig(1); + numeric axsize, zaxpos, zaxlen; + color xbeg, xend, ybeg, yend, zbeg, zend; + axsize = 0.85; + zaxpos = 0.55; + zaxlen = 2.1; + pickup pencircle scaled 1.5pt; + xbeg = (axsize,0,0); + xend = (-axsize,0,0); + ybeg = (0,0,-axsize); + yend = (0,0,axsize); + zbeg = (zaxpos,-zaxpos,0); + zend = (zaxpos,zaxlen,0); + drawarrow rp( xbeg )--rp( xend ); + drawarrow rp( ybeg )--rp( yend ); +% defaultfont := "putr8r"; + defaultscale := 0.65; + label.rt( "X", rp( xend ) ); + label.lft( "Y", rp( yend ) ); + emptyline( false, 1, black, 0.7background, 700, 0.8, 2, thexyline ); + drawarrow rp( zbeg )--rp( zend ); + label.bot( "Z", rp( zend ) ); +endfig; + +end; + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp b/Master/texmf-dist/doc/metapost/featpost/example/pathernon.mp index 8b3d8b56140..002adab6e73 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/pathernon.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/pathernon.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + beginfig(0); f := (4.8,3,3.65); viewcentr := black; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp b/Master/texmf-dist/doc/metapost/featpost/example/pathofstraightline.mp index 06711c223f3..a921fd06f49 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/pathofstraightline.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/pathofstraightline.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; SphericalDistortion := true; Spread := 100; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp b/Master/texmf-dist/doc/metapost/featpost/example/perspec.mp index 09efea9ab2f..be1402884b0 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/perspec.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/perspec.mp @@ -2,8 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3D; -%input featpost2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex @@ -74,4 +73,4 @@ verbatimtex \end{document} etex -end;
\ No newline at end of file +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/photorefer.mp b/Master/texmf-dist/doc/metapost/featpost/example/photorefer.mp new file mode 100644 index 00000000000..9a96b24c416 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/photorefer.mp @@ -0,0 +1,198 @@ +% photorefer.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +%\usepackage{beton,concmath,ccfonts} + +verbatimtex \documentclass{article} \begin{document} etex + +f := ( 6, 5, 2.5 ); +Spread := 160; + +beginfig(2); + color a, x, b, c, D, y, w, g, h; + color auxa, auxb, auxc, auxd, auxe, auxf, azz, azy, bzz, bzy; + pair appear, rpc, rpch, rpcv; + numeric wid, hei, alfa, beta, forw, back, labscal, framang, lx, ly, verscal; + pen thedotpen, borderpen, normalpen; + picture dasha, dashb, labx, laba, labb, labc, labD, labh, labv; + path outerb, innerb, apath, bpath; + framang = 0; + alfa = 0; + beta = 0; +% framang = -15; +% alfa = -20; +% beta = -15; + + wid = 1.5; + hei = 1; + forw = 1.5; + back = 1.5; + lx = 1.15; + ly = 0.4; + verscal = 0.47; + labscal = 2.8; + labeloffset := 8pt; + ahangle := 30; + ahlength := 10pt; + b = ( -0.8*back, 0.25*wid, 0.9*hei ); + c = ( 0, 0.85*wid, 0.35*hei ); + D = ( cosd( alfa )*cosd( beta ), sind( alfa )*cosd( beta ), sind( beta ) ); + a = c+0.95*D; +% a = c+0.7*D; + labx = btex $\vec{p}$ etex scaled labscal; + laba = btex $\vec{f}$ etex scaled labscal; + labb = btex $\vec{R}$ etex scaled labscal; + labc = btex $\vec{o}$ etex scaled labscal; + labh = btex $\hat{h}$ etex scaled labscal; + labv = btex $\hat{v}$ etex scaled labscal; + thedotpen = pencircle scaled 4pt; + borderpen = pencircle scaled 2pt; + normalpen = pencircle scaled 1.5pt; + dasha = evenly scaled 2; +% dashb = dashpattern( on 7pt off 5pt on 7pt ); + dashb = withdots; + azz = (X(a),Y(a),0); + azy = (X(a),0,Z(a)); + bzz = (X(b),Y(b),0); + bzy = (X(b),0,Z(b)); + apath = rp(azz)--rp(a)--rp(azy); + bpath = rp(bzz)--rp(b)--rp(bzy); + auxa = ( forw, 0, 0 ); + auxb = ( forw, 0, hei ); + auxc = ( -back, 0, hei ); + auxd = ( -back, 0, 0 ); + auxe = ( -back, wid, 0 ); + auxf = ( forw, wid, 0 ); + outerb = rp(auxa)--rp(auxb)--rp(auxc)--rp(auxd)--rp(auxe)--rp(auxf)--cycle; + draw outerb withpen borderpen; + draw rp(auxa)--rp(auxd) withpen borderpen; + + draw bpath dashed dasha withpen normalpen; + draw rp(b) withpen thedotpen; + label.rt( labb, rp(b) ); + + draw rp(a)--rp(b) withpen normalpen; + + cdotprod( y-c, D ) = 0; + cdotprod( y-black, green ) = 0; + cdotprod( y-black, blue ) = 0; + + cdotprod( w-c, D ) = 0; + cdotprod( w-black, green ) = 0; + cdotprod( w-hei*blue, blue ) = 0; + + cdotprod( g-c, D ) = 0; + cdotprod( g-wid*green, green ) = 0; + cdotprod( g-hei*blue, blue ) = 0; + + cdotprod( h-c, D ) = 0; + cdotprod( h-wid*green, green ) = 0; + cdotprod( h-black, blue ) = 0; + + innerb = rp(y)--rp(w)--rp(g)--rp(h)--cycle; + unfill innerb; + draw innerb withpen borderpen; + + draw apath dashed dasha withpen normalpen; + draw rp(a) withpen thedotpen; + label.llft( laba, rp(a) ); + + x = whatever[a,b]; + cdotprod( x-c, D ) = 0; + draw rp(x) withpen thedotpen; + label.lft( labx, rp(x) ); + + draw rp(a)--rp(x) withpen normalpen; + draw rp(x)--rp(b) withpen normalpen dashed dashb; + + draw rp(c) withpen thedotpen; + draw rp(a)--rp(c) withpen borderpen; + label.bot( labc, rp(c) ); + + numeric theang; + color perpo, perpa, perph, perpv; + perpo = N( x-c ); + perpa = ncrossprod( D, c-x ); + theang = -getangle( w-y, perpa ); + perph = perpo*cosd( framang+theang ) + perpa*sind( framang+theang ); + perpv =-perpo*sind( framang+theang ) + perpa*cosd( framang+theang ); + color corn, corm; + numeric coox, cooy; + coox = cdotprod( x-c, perph ); + cooy = cdotprod( x-c, perpv ); + draw rp(c)--rp(c+lx*perph)--rp(c+lx*perph+ly*perpv) + --rp(c+ly*perpv)--cycle dashed evenly; + draw rp(c)--rp(c+coox*perph)--rp(c+coox*perph+cooy*perpv) + --rp(c+cooy*perpv)--cycle dashed evenly; + rpc = rp(c); + rpch = rp(c+verscal*perph); + rpcv = rp(c+verscal*perpv); + drawarrow rpc--rpch withpen normalpen; + drawarrow rpc--rpcv withpen normalpen; + label.rt( labv, rpcv ); +% label.top( labh, rpch ); + label.lrt( labh, rpch ); +endfig; + +f := ( 5, 3, 1 ); +Spread := 70; + +beginfig(1); + labeloffset := 3pt; + ahangle := 30; + ahlength := 5pt; + numeric alpha, beta, gamma, axeslen, blen, angray; + alpha = 65; + beta = 70; + gamma = 75; + blen = 1.4; + axeslen = 1.2; + angray = 0.4; + orthaxes( axeslen, btex $E$ etex, axeslen, btex $N$ etex, axeslen, btex $Z$ etex ); + path vo, vh, vv, vhp, vop; + z0 = rp( black ); + color po, ph, pv, php, pop; + pop = ( cosd(alpha), sind(alpha), 0 ); + po = blen*( cosd(beta)*pop + sind(beta)*blue ); + php = ( sind(alpha), -cosd(alpha), 0 ); + numeric hx, hy, hv, vx, vy, vz; + hx = sind(alpha)*cosd(gamma)-sind(beta)*cosd(alpha)*sind(gamma); + hy =-cosd(alpha)*cosd(gamma)-sind(beta)*sind(alpha)*sind(gamma); + hz = cosd(beta)*sind(gamma); + vx =-sind(alpha)*sind(gamma)-sind(beta)*cosd(alpha)*cosd(gamma); + vy = cosd(alpha)*sind(gamma)-sind(beta)*sind(alpha)*cosd(gamma); + vz = cosd(beta)*cosd(gamma); + ph = ( hx, hy, hz ); + pv = ( vx, vy, vz ); + z1 = rp( po ); + z2 = rp( ph ); + z3 = rp( pv ); + z4 = rp( php ); + z5 = rp( pop ); + vo = z0--z1; + vh = z0--z2; + vv = z0--z3; + vhp = z0--z4; + vop = z0--z5; + drawarrow vo; + drawarrow vh; + drawarrow vv; + draw vhp dashed evenly; + draw vop dashed evenly; + squareangline( ph, pv, black, 0.1 ); + angline( pop, po, black, angray, btex $\beta$ etex, rt ); + angline( php, ph, black, angray, btex $\gamma$ etex, lft ); + angline( red, pop, black, angray, btex $\alpha$ etex, bot ); + label.top( btex $\vec{f}-\vec{o}$ etex, z1 ); + label.top( btex $\hat{h}$ etex, z2 ); + label.top( btex $\hat{v}$ etex, z3 ); +endfig; + +verbatimtex +\end{document} +etex + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp b/Master/texmf-dist/doc/metapost/featpost/example/photoreverse.mp index 542fd1f3508..60819ecbccb 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/photoreverse.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/photoreverse.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planescava.mp b/Master/texmf-dist/doc/metapost/featpost/example/planescava.mp new file mode 100644 index 00000000000..b9674a2466e --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planescava.mp @@ -0,0 +1,63 @@ +% planescava.mp +% L. Nobre G. +% Y2K +% Test one figure at a time. The last and biggest planification is here. + +input featpost3Dplus2D; + +% verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex + +% truefyepsmode; + +beginfig(1); % plnescava + makearestarefathree; + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = origin; + for i=0 upto 5: + for j=0 upto 6: + px[i]y[j] := startpos+aresta*(i*right+j*dir(60)); + endfor; + endfor; + pickup grossa; + draw px5y2--px5y1--px4y1--px5y0--px3y0--px2y1--px2y2--px1y2--px0y3 + --px0y6--px1y6--px2y5--px2y6--px4y6--px5y5; + pickup fina; + draw px0y6--px1y4--px3y3--px4y4--px3y6; + draw px0y3--px1y4--px3y3--px4y1--px3y0; + draw px2y2--px1y3; + draw px2y2--px2y3; + draw px2y2--px3y2; + draw px2y2--px3y1; + draw px2y5--px1y5; + draw px2y5--px2y4; + draw px2y5--px3y4; + draw px2y5--px3y5; + draw px5y2--px4y2; + draw px5y2--px4y3; + draw px5y2--px5y3; + draw px5y5--px4y5; + draw px4y4--((px5y3+px5y4)/2); + pickup usual; + draw px4y0--px4y6; + draw px3y0--px3y6; + draw px1y2--px1y6; + draw px2y1--px4y1--px0y5; + draw px0y3--px5y3--px2y6; + draw px0y4--px5y4--px3y6; + draw px0y6--px5y1; + draw currentpicture rotatedaround((px5y3+px5y4)/2,180); + desvec((px5y3+px5y4)/2); + terminar( 0.9, 60 ); +endfig; + + +% verbatimtex \end{document} etex + +end; + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp b/Master/texmf-dist/doc/metapost/featpost/example/planintersection.mp index a3ab18237c4..f7046facc59 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/planintersection.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/planintersection.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + verbatimtex \documentclass{article}\begin{document}{\sffamily etex beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpau.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpau.mp new file mode 100644 index 00000000000..7b73f2b9932 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpau.mp @@ -0,0 +1,233 @@ +% planpau.mp +% L. Nobre G. +% 1999 + +% Planification wise auxiliary figures + +input featpost3Dplus2D; + +verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex + + EPSmode := true; + +beginfig(1); + numeric xposit, xendit, xbegit, salto, i; + picture tracos[]; + picture legendas[]; + pen caneta[]; + xposit = 3in; + xendit = 4.5in; + xbegit = 1.5in; + salto = 0.3in; + legendas0 = btex Normal etex; + legendas1 = btex Recorte etex; + legendas2 = btex C\^{o}ncava etex; + legendas3 = btex Opcional etex; + legendas4 = btex Dist\^{a}ncia etex; + caneta0 = usual; + caneta1 = grossa; + caneta2 = fina; + caneta3 = usual; + caneta4 = fina; + tracos0 = nada; + tracos1 = nada; + tracos2 = nada; + tracos3 = pequeno; + tracos4 = grande; + for i = 0 upto 4: + z[i] = ( xposit, 6in - i*salto ); + label.top( legendas[i], z[i] ); + draw ( xbegit, ypart z[i] )--( xendit, ypart z[i] ) + withpen caneta[i] dashed tracos[i]; + endfor; +endfig; + +beginfig(2); + numeric salto, ix, iy, counter, aresta[]; + path faces[]; + picture descrit[]; + aresta0 = 0.57*arestaref; + salto = 1.4*aresta0; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z0 = 0.5*aresta0*right; + z1 = aresta0*(0,sqrt(3)/2); + z2 = 0.5*aresta0*left; + z3 = centerof( 0,1,2 ); + faces0 = z0--z1--z2--cycle; + draw faces0 withpen usual; + label(btex (a) etex, z3); + descrit0 = currentpicture; + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z4 = aresta0*right; + z5 = aresta0*up; + z7 = origin; + z6 = centerof( 7,4,5 ); + faces1 = z7--z4--z5--cycle; + draw faces1 withpen usual; + label(btex (b) etex, z6); + label.urt(btex $\sqrt{2}$ etex, (z4+z5)/2 ); + descrit1 = currentpicture shifted (0.5*aresta0*left); + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z8 = sqrt(3)*aresta0*right; + z9 = aresta0*up; + z10= centerof( 7,8,9 ); + faces2 = z7--z8--z9--cycle; + draw faces2 withpen usual; + label.lft(btex (c) etex, z10); + label.top(btex $\sqrt{3}$ etex, (z7+z8)/2 ); + label.urt(btex $2$ etex, (z9+z8)/2 ); + descrit2 = currentpicture shifted (0.5*aresta0*left); + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z11= aresta0*(0.8*sqrt(3)*right+0.8*up); + z12= aresta0*(0.3*sqrt(3),0.3); + z13= aresta0*(0.2*sqrt(3)*left+0.8*up); + z14= centerof( 11,12,13 ); + faces3 = z11--z12--z13--cycle; + draw faces3 withpen usual; + label(btex (d) etex, z14); + label.top(btex $\sqrt{3}$ etex, (z11+z13)/2 ); + descrit3 = currentpicture; + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z15= 0.5*aresta0*right; + z16= z15+aresta0*up; + z17= z16+aresta0*left; + z18= z17+aresta0*down; + z19= centerof( 15,16,17,18 ); + faces4 = z15--z16--z17--z18--cycle; + draw faces4 withpen usual; + label(btex (e) etex, z19); + descrit4 = currentpicture; + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z20= 0.5*aresta0*right; + z21= z20+aresta0*dir(60); + z22= z21+aresta0*left; + z23= z22+aresta0*dir(-120); + z24= centerof( 20,22,23 ); + faces5 = z20--z21--z22--z23--cycle; + draw faces5 withpen usual; + draw z20--z22 withpen fina dashed grande; + label(btex (f) etex, z24); + descrit5 = currentpicture; + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z25= 0.5*aresta0*right; + z26= z25+aresta0*left; + z27= radialcross( z26, aresta0, z25, 2*aresta0*sqrt(3)/3, true ); + z28= z27+aresta0*right; + z29= centerof( 25,26,27 ); + faces6 = z25--z26--z27--z28--cycle; + draw faces6 withpen usual; + draw z25--z27 withpen fina dashed grande; + label(btex (g) etex, z29); + label.urt(btex $\frac{2\sqrt{3}}{3}$ etex, (z25+z27)/2 ); + descrit6 = currentpicture; + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z30= 0.5*aresta0*right; + z31= z30+aresta0*left; + z32= radialcross( z30, aresta0*sqrt(2), + z31, aresta0*sqrt(3), true ); + z33= z32+aresta0*right; + z34= centerof( 30,31,32 ); + faces7 = z30--z31--z32--z33--cycle; + draw faces7 withpen usual; + draw z30--z32 withpen fina dashed grande; + label(btex (h) etex, z34); + label.urt(btex $\sqrt{2}$ etex, (z30+z32)/2 ); + label.ulft(btex $\sqrt{3}$ etex, (z31+z32)/2 ); + label.lrt(btex $\sqrt{3}$ etex, (z30+z33)/2 ); + descrit7 = currentpicture; + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z35= 1.5*aresta0*right; + z40= 0.5*aresta0*right; + z36= z35+aresta0*dir(120); + z37= z36+aresta0*left; + z38= z37+aresta0*dir(-120); + z39= centerof( 40,37,38 ); + faces8 = z35--z36--z37--z38--cycle; + draw faces8 withpen usual; + draw z37--z40--z36 withpen fina dashed grande; + label(btex (l) etex, z39); + + z61= z38+1.2*aresta0*up; + z62= z61+2*aresta0*right; + z63= z61+aresta0*right+sqrt(2)*aresta0*up; + z64= centerof( 61,62,63 ); + faces13 = z61--z62--z63--cycle; + draw faces13 withpen usual; + label(btex (i) etex, z64); + label.top(btex 2 etex, (z61+z62)/2 ); + label.urt(btex $\sqrt{3}$ etex, (z63+z62)/2 ); + label.ulft(btex $\sqrt{3}$ etex, (z63+z61)/2 ); + descrit8 = currentpicture shifted (aresta0*(0,-1.666)); + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z47= aresta0*right; + z48= origin; + z49= radialcross( z48, aresta0, z47, aresta0*(sqrt(3)-1), true ); + z50= centerof( 47,48,49 ); + faces9 = z47--z48--z49--cycle; + draw faces9 withpen usual; + label(btex (k) etex, z50); +% label.top(btex $\sqrt{3}-1$ etex rotated angle(z47-z49), z47 ); + label.rt(btex $\sqrt{3}-1$ etex, (z47+z49)/2 ); + + z57 = (x48,y49); + z58 = z57 + aresta0*left; + z59= radialcross( z57, aresta0, z58, aresta0*sqrt(2-sqrt(3)), false ); + z60= centerof( 57,58,59 ); + faces12 = z57--z58--z59--cycle; + draw faces12 withpen usual; + label(btex (j) etex, z60); +% label.lft( +% btex $\sqrt{2-\sqrt{3}}$ etex rotated angle(z59-z58), +% (z59+z58)/2 ); + label.llft(btex $\sqrt{2-\sqrt{3}}$ etex, (z59+z58)/2 ); + descrit9 = currentpicture shifted (aresta0*(2.5,0.4)); + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z51= -aresta0*(sqrt(2)/2,0.866); + z52= z51+aresta0*sqrt(2)*right; + z53= z52+aresta0*up; + z54= z53+aresta0*(-sqrt(2)/2,0.5); + z55= z54+aresta0*(-sqrt(2)/2,-0.5); + z56= centerof( 51,52,53,54,55 ); + faces10 = z51--z52--z53--z54--z55--cycle; + draw faces10 withpen usual; + label(btex (m) etex, z56); + label.top(btex $\sqrt{2}$ etex, (z51+z52)/2 ); + label.urt(btex $\sqrt{3}/2$ etex, (z53+z54)/2 ); + label.ulft(btex $\sqrt{3}/2$ etex, (z55+z54)/2 ); + descrit10 = currentpicture shifted (aresta0*(0.25*left+0.8*down)); + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + z41= 1.5*aresta0*right; + z42= z41+aresta0*dir(120); + z43= z42+aresta0*left; + z44= z43+aresta0*dir(-120); + z45= z44+aresta0*dir(-60); + z46= z45+aresta0*right; + faces11 = z41--z42--z43--z44--z45--z46--cycle; + draw faces11 withpen usual; + label(btex (n) etex, z40); + descrit11 = currentpicture shifted (aresta0*0.8*down); + currentpicture := nullpicture; +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + counter := 0; + for iy = 0 upto 2: + for ix = 0 upto 3: + draw descrit[counter] shifted ( ix*salto, - iy*salto ); + counter := incr(counter); + endfor; + endfor; +endfig; + +verbatimtex \end{document} etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpht.mp index dac34577eff..cef4722f335 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/planpht.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpht.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; % Planification wise 3D figures diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planphtnonrec.mp b/Master/texmf-dist/doc/metapost/featpost/example/planphtnonrec.mp new file mode 100644 index 00000000000..745917b7240 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planphtnonrec.mp @@ -0,0 +1,108 @@ +% planphtnonrec.mp +% L. Nobre G. +% 2006 +% Test one figure at a time. + +input featpost3Dplus2D; + +% verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex + +% truefyepsmode; + +beginfig(1); % phtnonrec + numeric tro; + pen fina, media, grossa; + color mygray; + tro = 2; + V1 := (tro,0,0); + V2 := (0,tro,0); + V3 := (-tro,0,0); + V4 := (0,-tro,0); + V5 := (1,1,1); + V6 := (-1,1,1); + V7 := (-1,-1,1); + V8 := (1,-1,1); + V9 := (1,1,-1); + V10 := (-1,1,-1); + V11 := (-1,-1,-1); + V12 := (1,-1,-1); + V13 := (0,0,tro); + V14 := (0,0,-tro); + V15 := (tro,0,tro); + V16 := (0,tro,tro); + V17 := (tro,tro,0); + V18 := (tro,0,-tro); + V19 := (tro,-tro,0); + V20 := (0,-tro,tro); + V21 := (-tro,0,tro); + V22 := (-tro,tro,0); + V23 := (0,tro,-tro); + V24 := (-tro,0,-tro); + V25 := (0,-tro,-tro); + V26 := (-tro,-tro,0); + V27 := (-2*tro,-tro,-tro); + V28 := (-2*tro,-tro,tro); + V29 := (-2*tro,tro,tro); + V30 := (-2*tro,tro,-tro); + makeface1(1,5,13,8); + makeface2(2,6,13,5); + makeface3(3,7,13,6); + makeface4(4,8,13,7); + makeface5(1,5,2,9); + makeface6(2,6,3,10); + makeface7(3,7,4,11); + makeface8(4,8,1,12); + makeface9(1,9,14,12); + makeface10(2,10,14,9); + makeface11(3,11,14,10); + makeface12(4,12,14,11); + + makeface13(27,28,29,30); + makeface14(20,21,16,29,28); + makeface15(23,24,25,27,30); + makeface16(16,22,23,30,29); + makeface17(25,27,28,20,26); + makeface18(21,22,24,26); + makeface19(20,21,26); + makeface20(16,21,22); + makeface21(22,23,24); + makeface22(24,25,26); +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% f := 2*(5,3,1.5); +% f := 2*(5,3,4); + f := 2.34*(15,2.4,5.05); + Spread := 50; + fina = pencircle scaled 1pt; + media = pencircle scaled 1.2pt; + grossa= pencircle scaled 3pt; + mygray = 0.3white; +% pickup fina; +% draw rp(V25)--rp(V27)--rp(V28)--rp(V20)-- +% rp(V25)--rp(V23)--rp(V30)--rp(V27); + pickup media; + draw rp(V24)--rp(V25)--rp(V19)--rp(V20)-- + rp(V26)--rp(V25)--rp(V18)--rp(V23)-- + rp(V24)--rp(V26)--rp(V21)--rp(V22)--cycle withcolor mygray; + drawoptions( withpen grossa ); + draw_invisible( false, false, white, black ); +% face_invisible( 14, withpen grossa ); +% face_invisible( 16, withpen grossa ); + pickup media; + draw rp(V15)--rp(V16)--rp(V22)--rp(V23)-- + rp(V17)--rp(V16)--rp(V21)--rp(V20)-- + rp(V15)--rp(V17)--rp(V18)--rp(V19)--cycle withcolor mygray; +% pickup fina; +% draw rp(V28)--rp(V29)--rp(V30); +% draw rp(V20)--rp(V16)--rp(V23); +% draw rp(V16)--rp(V29); + +endfig; + +% verbatimtex \end{document} etex + +end; + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpln0.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpln0.mp new file mode 100644 index 00000000000..ec500d6fad0 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpln0.mp @@ -0,0 +1,165 @@ +% planplnzero.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% Only planifications + +% truefyepsmode; + +% filenametemplate "%j%3c.ps"; + +beginfig(2); % plntpbq + numeric aresta[]; + aresta0 := arestaref; + aresta1 := 5mm; + z0 = (down+left)*aresta0/2; + z1 = z0 + up*aresta0; + z2 = z1 + right*aresta0; + z3 = z2 + down*aresta0; + z4 = radialcross( z1, aresta0, z2, aresta0, true); + z9 = radialcross( z2, aresta0, z4, aresta0, true); + z5 = radialcross( z1, aresta0, z4, aresta0, true); + z6 = z5 + dir(60)*aresta1; + z7 = z4 + dir(120)*aresta1; + z10= radialcross( z4, aresta0, z9, aresta0, true); + z8 = z1 + dir(-150)*aresta1; + z11= z0 + dir(150)*aresta1; + z12= z0 + dir(-60)*aresta1; + z13= z3 + dir(-120)*aresta1; + z14= z3 + dir(30)*aresta1; + z15= z2 + dir(-30)*aresta1; + pickup grossa; + draw z0--z11--z8--z1--z5--z6--z7--z4--z10--z9--z2--z15 + --z14--z3--z13--z12--cycle; + pickup usual; + draw z5--z9; + draw z1--z2--z4--z1--z0--z3--z2; + desvia( 5,4,9,10,1,2,0,3 ); +% dotlabels.urt(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); + terminar( 2.4, 0 ); +endfig; + +beginfig(3); % plnmpbq + numeric aresta[]; + aresta0 := arestaref; + z0 = (down+left)*aresta0/2; + z1 = z0 + up*aresta0; + z2 = z1 + right*aresta0; + z3 = z2 + down*aresta0; + z4 = radialcross( z1, aresta0, z2, aresta0, true); + z9 = radialcross( z2, aresta0, z4, aresta0, true); + z5 = radialcross( z1, aresta0, z4, aresta0, true); + z6 = z5 + dir(60)*aresta0; + z10= radialcross( z4, aresta0, z9, aresta0, true); + z8 = z1 + dir(-150)*aresta0; + z7= z0 + dir(-60)*aresta0; + z11= z3 + dir(30)*aresta0; + pickup grossa; + draw z0--z8--z1--z5--z6--z4--z10--z9--z2--z11--z3--z7--cycle; + pickup usual; + draw z5--z9; + draw z1--z2--z4--z1--z0--z3--z2; + desvia( 5,6,7,8,9,10,1,2,0,3,11 ); +% dotlabels.urt(0,1,2,3,4,5,6,7,8,9,10,11); + terminar( 2.4, 0 ); +endfig; + +beginfig(4); % plnppbq + numeric aresta[]; + aresta0 := arestaref; + z0 = (down+left)*aresta0/2; + z1 = z0 + up*aresta0; + z2 = z1 + right*aresta0; + z3 = z2 + down*aresta0; + z4 = radialcross( z1, aresta0, z2, aresta0, true); + z5 = radialcross( z2, aresta0, z3, aresta0, true); + z6 = radialcross( z3, aresta0, z0, aresta0, false); + z7 = radialcross( z0, aresta0, z1, aresta0, false); + z8 = radialcross( z1, aresta0, z7, aresta0, true); + z9 = radialcross( z2, aresta0, z4, aresta0, true); + z10 = radialcross( z3, aresta0, z5, aresta0, false); + z11 = radialcross( z0, aresta0, z6, aresta0, false); + pickup grossa; + draw z0--z7--z8--z1--z4--z9--z2--z5--z10--z3--z6--z11--cycle; + pickup usual + draw z0--z1--z2--z3--cycle; + draw z7--z1; + draw z4--z2; + draw z5--z3; + draw z6--z0; +% path tmpath; +% tmpath = (PageCenter--centerof(0,1,7)) cutafter (z0--z1); +% draw tmpath dashed pequeno; +% pickup fina; +% draw z1--z3; +% dotlabels.ulft(0,1,2,3,4,5,6,7,8,9,10,11); +% label.lft(btex $a+b$ etex rotated angle(z4-z1), centerof(1,4)); + terminar( 2.4, -15 ); +endfig; + +beginfig(6); % plnddpbp + numeric aresta[]; + aresta0 := arestaref; + z9 = origin; + z0 = z9 + sqrt(3)*aresta0*dir(-150); + z1 = z0 + 3*right*aresta0; + z2 = z1 + 3*dir(120)*aresta0; + z3 = 1/3 [z0,z1]; + z4 = 2/3 [z0,z1]; + z5 = 1/3 [z1,z2]; + z6 = 2/3 [z1,z2]; + z7 = 1/3 [z2,z0]; + z8 = 2/3 [z2,z0]; + z10 = z4 + dir(-60)*aresta0; + z11 = z5 + right*aresta0; + z12 = z6 + right*aresta0; + z13 = z2 + right*aresta0; + z14 = z2 - right*aresta0; + z15 = z7 - right*aresta0; + z16 = z8 - right*aresta0; +% dotlabels.ulft(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); + pickup grossa; + draw z9--z3--z4--z10--z1--z5--z11--z12--z6--z13 + --z2--z7--z14--z15--z8--z16--z0--z3; + pickup usual + draw z0--z8--z7--z15; + draw z3--z8--z9--z7--z6--z2; + draw z1--z4--z5--z9--z4; + draw z9--z6--z5--z12; + desvia( 16,11,2,13,0,10,6 ); + terminar( 1.9, 90-angle(z0-z10) ); +endfig; + +beginfig(7); % plnpdpbp + numeric aresta[]; + aresta0 := arestaref; + z9 = 0.5*aresta0*right; + z8 = 0.5*aresta0*left; + z11= 0.5*sqrt(3)*aresta0*up; + z14= 0.5*sqrt(3)*aresta0*down; + z13= z14+ right*aresta0; + z12= z11+ right*aresta0; + z15= z14- right*aresta0; + z10= z11- right*aresta0; + z0 = 3/2 [z14,z10]; + z4 = 3/2 [z13,z11]; + z5 = 3/2 [z15,z11]; + z1 = 3/2 [z14,z12]; + z2 = 3/2 [z11,z13]; + z6 = 3/2 [z10,z14]; + z7 = 3/2 [z12,z14]; + z3 = 3/2 [z11,z15]; +% dotlabels.ulft(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); + pickup grossa; + draw z11--z10--z0--z1--z9--z13; + draw z14--z13--z2--z3--z8--z10; + pickup usual + draw z10--z4--z9--z8--z5--z12--z11; + draw z13--z6--z8; + draw z9--z7--z15--z14; + terminar( 2.1, 0 ); +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpln1.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpln1.mp new file mode 100644 index 00000000000..7d3e756709d --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpln1.mp @@ -0,0 +1,344 @@ +% planplnone.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% Only planifications + +% truefyepsmode; + +% filenametemplate "%j%3c.ps"; + +beginfig(0); % plncubo + numeric aresta[]; + aresta0 := arestaref; + z6 = (right+down)*aresta0/2; + z0 = z6 + 3*left*aresta0; + z1 = z0 + 5*right*aresta0; + z2 = z1 + up*aresta0; + z3 = z2 + 5*left*aresta0; + z4 = 1/5 [z0,z1]; + z5 = 2/5 [z0,z1]; + z7 = 4/5 [z0,z1]; + z20= z0 + 3*(up+right)*aresta0; + z21= z1 + 3*(up+left)*aresta0; + z8 = 4/3 [z21,z5]; + z11= 5/3 [z20,z6]; + z9 = 4/3 [z20,z6]; + z12= z11+ right*aresta0; + z10= 1/2 [z12,z7]; + z23= z10+ right*aresta0; + z13= 1/5 [z2,z3]; + z14= 2/5 [z2,z3]; + z15= 3/5 [z2,z3]; + z16= 4/5 [z2,z3]; + z17= 4/3 [z12,z13]; + z18= 4/3 [z11,z14]; + z19= 3/4 [z8,z21]; + z22= 3/2 [z10,z15]; + pickup grossa; + draw z6--z0--z3--z16--z22--z19; + draw z15--z21--z20--z18--z17--z13; + draw z14--z2--z23--z10; + draw z7--z12--z11--z9--z8--z5; + pickup usual; + draw z19--z18--z9--z10; + draw z14--z16--z4; + draw z5--z15; + draw z7--z13; + draw z1--z6; + terminar( 1.52, -45 ); +endfig; + +beginfig(1); % plnclos + numeric aresta[]; + aresta0 := arestaref; + z13= dir(-30)*aresta0/2; + z0 = z13+ 3*dir(-150)*aresta0; + z1 = z0 + 5*dir(30)*aresta0; + z2 = z1 + up*aresta0; + z3 = z2 + 5*dir(-150)*aresta0; + z11= 1/5 [z0,z1]; + z12= 2/5 [z0,z1]; + z14= 4/5 [z0,z1]; + z15= 1/5 [z2,z3]; + z16= 2/5 [z2,z3]; + z17= 3/5 [z2,z3]; + z18= 4/5 [z2,z3]; + z23= z18+ 2*up*aresta0; + z21= z18+ 1*up*aresta0; + z4 = z18- 2*up*aresta0; + z22= z17+ 2*up*aresta0; + z20= z17+ 1*up*aresta0; + z5 = z17- 2*up*aresta0; + z8 = z17- 3*up*aresta0; + z19= z13+ 2*up*aresta0; + z6 = z13- 1*up*aresta0; + z9 = z13- 2*up*aresta0; + z7 = z14- 1*up*aresta0; + z10= z14- 2*up*aresta0; + pickup grossa; + draw z17--z16--z19--z20--z22--z23--z18--z3--z0--z11--z4--z8--z12--z13; + draw z5--z6--z9--z10--z14--z1--z2--z15--z19; + pickup usual; + draw z5--z11--z18; + draw z12--z18--z17--z20--z21; + draw z17--z13--z14; + draw z13--z6--z7; + draw z16--z14--z15; + terminar( 1.52, 90-angle(z23-z3) ); +endfig; + +beginfig(3); % plnclsq + numeric aresta[]; + aresta0 := arestaref; + z6 = dir(-30)*aresta0/2; + z7 = z6 + dir(-120)*aresta0; + z8 = z7 + dir(-60)*aresta0; + z9 = z8 + dir(60)*aresta0; + z10= z9 + dir(-90)*aresta0; + z11= z10+ dir(30)*aresta0; + z12= z11+ dir(90)*aresta0; + z13= z12+ dir(120)*aresta0; + z14= z13+ dir(0)*aresta0; + z15= z14+ dir(90)*aresta0; + z16= z15+ dir(180)*aresta0; + z17= z16+ dir(150)*aresta0; + z18= z17+ dir(-90)*aresta0; + z19= z18+ dir(-150)*aresta0; + z20= z19+ dir(60)*aresta0; + z21= z20+ dir(120)*aresta0; + z22= z21+ dir(-120)*aresta0; + z23= z22+ dir(90)*aresta0; + z24= z23+ dir(-150)*aresta0; + z25= z24+ dir(-90)*aresta0; + z26= z25+ dir(-60)*aresta0; + z27= z26+ dir(180)*aresta0; + z0 = z27+ dir(-90)*aresta0; + z1 = z0 + dir(0)*aresta0; + z2 = z1 + dir(-90)*aresta0; + z3 = z2 + dir(-30)*aresta0; + z4 = z3 + dir(90)*aresta0; + z5 = z4 + dir(90)*aresta0; + pickup grossa; + draw z0--z1--z2--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12 + --z13--z14--z15--z16--z17--z18--z19--z20--z21--z22--z23 + --z24--z25--z26--z27--cycle; + pickup usual; + draw z4--z1--z26; + draw z5--z26--z19--z22--z25; + draw z19--z6--z13; + draw z6--z9--z12; + draw z16--z13--z18; +% dotlabels.ulft( 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 ); +% dotlabels.ulft( 18,19,20,21,22,23,24,25,26,27 ); + terminar( 1.52, 90-angle(z24-z27) ); +endfig; + +beginfig(4); % plnclqd + numeric aresta[]; + aresta0 := arestaref; + z0 = origin; + z1 = z0 + dir(150)*aresta0; + z2 = z1 + dir(-90)*aresta0; + z3 = z2 + dir(-60)*aresta0; + z4 = z3 + dir(180)*aresta0; + z5 = z4 + dir(-90)*aresta0; + z6 = z5 + dir(0)*aresta0; + z7 = z6 + dir(-90)*aresta0; + z8 = z7 + dir(30)*aresta0; + z9 = z8 + dir(-30)*aresta0; + z10= z9 + dir(90)*aresta0; + z11= z10+ dir(0)*aresta0; + z12= z11+ dir(90)*aresta0; + z13= z12+ dir(180)*aresta0; + z14= z13+ dir(150)*aresta0; + z15= z13+ dir(90)*aresta0; + z16= z15+ dir(120)*aresta0; + z17= z16+ dir(150)*aresta0; + z18= z13+ dir(-150)*aresta0; + pickup grossa; + draw z0--z1--z2--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--z13--z14; + draw z13--z15--z16--z17--z1; + pickup fina; + draw z14--z18; + pickup usual; + draw z8--z18--z13--z10--z8--z6--z3--z18; + draw z3--z15; + draw z2--z16; + draw z17--z0--z14; + draw fullcircle scaled (aresta0/10) shifted z18 withcolor blue; +% dotlabels.ulft( 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18 ); + desvia( 1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17 ); + terminar( 1.52, 90-angle(z16-z12) ); + +endfig; + +beginfig(5); % plncubod + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = aresta*(2*left+3*down); + for i=0 upto 4: + for j=0 upto 6: + px[i]y[j] := startpos+aresta*(i*right+j*up); + endfor; + endfor; + pickup grossa; + draw px2y2--px2y0--px1y0--px1y1--px0y1--px0y4--px1y4; + draw px1y3--px1y5--px2y5; + draw px2y4--px2y6--px3y6--px3y5--px4y5--px4y2--px3y2; + draw px3y3--px3y1--px2y1; + pickup fina; + draw px0y1--px4y5; + pickup usual; + draw px1y1--px2y1; + draw px0y2--px3y2; + draw px0y3--px4y3; + draw px1y4--px4y4; + draw px2y5--px3y5; + draw px1y1--px1y3; + draw px2y2--px2y4; + draw px3y3--px3y5; + terminar( 1.52, 0 ); +endfig; + +beginfig(6); % plntevc + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = aresta*(4*left+4*dir(-120)); + for i=0 upto 12: + for j=0 upto 12-i: + px[i]y[j] := startpos+aresta*(i*right+j*dir(60)); + endfor; + endfor; + pickup grossa; + draw px4y3--px5y2--px5y3; + draw px3y5--px2y5--px3y4; + draw px4y5--px5y5--px5y4; + draw px7y0--px8y0--px8y1--px7y2--px8y2--px4y6--px5y6--px5y7--px4y8 + --px3y8--px3y7--px2y8--px2y4--px1y5--px0y5--px0y4--px1y3 + --px2y3--px2y2--px6y2--px6y1--cycle; + pickup usual; + draw px4y2--px4y3--px3y4; + draw px6y4--px5y4--px5y3; + draw px2y6--px3y5--px4y5; + draw px7y3--px7y2--px6y2--px5y3--px4y3; + draw px2y7--px3y7--px4y6--px4y5--px5y4; + draw px3y2--px2y3--px2y4--px3y4--px3y5; + desvec( (2*px4y8+px2y2+px7y0)/4 ); + terminar( 1, 90-angle(px7y0-px2y2) ); +endfig; + +beginfig(7); % plncubocta + numeric ares; + ares := arestaref; + z0 = origin; + z1 = z0 + dir(30)*ares; + z2 = z1 + dir(0)*ares; + z3 = z2 + dir(120)*ares; + z4 = z3 + dir(0)*ares; + z5 = z4 + dir(30)*ares; + z6 = z5 + dir(150)*ares; + z7 = z6 + dir(120)*ares; + z8 = z7 + dir(-120)*ares; + z9 = z7 + dir(30)*ares; + z10= z9 + dir(150)*ares; + z11= z10+ dir(30)*ares; + z12= z11+ dir(60)*ares; + z13= z12+ dir(180)*ares; + z14= z13+ dir(150)*ares; + z15= z14+ dir(-90)*ares; + z16= z15+ dir(150)*ares; + z17= z16+ dir(180)*ares; + z18= z17+ dir(-60)*ares; + z19= z18+ dir(-90)*ares; + z20= z19+ dir(-90)*ares; + z21= z20+ dir(-120)*ares; + z22= z21+ dir(0)*ares; + z23= z22+ dir(-120)*ares; + z24= z19+ dir(30)*ares; + z25= z19+ dir(-30)*ares; + pickup grossa; + draw z0--z1--z2--z3; + draw z2--z4--z5--z6--z7; + draw z8--z7--z9--z10; + draw z9--z11--z12--z13--z14--z15; + draw z14--z16--z17--z18--z20--z21; + draw z22--z21--z23--z0; + draw z24--z19--z25; + pickup usual; + draw z3--z1--z23--z22--z3--z8--z22--z20--z25--z8--z6--z4--z3; + draw z10--z11--z13--z15--z10--z24--z15--z16--z18--z24--z25--z7--z10; + desvia( 0,5,0,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 ); + terminar( 1.52, 0 ); +% desvec( z0 ); +% terminar( 1.52, 180-angle(z2-z0) ); +endfig; + +beginfig(8); % plnocta + numeric ares; + ares := arestaref; + z0 = origin + dir(-120)*ares/2; + z1 = z0 + dir(-60)*ares; + z2 = z1 + dir(60)*ares; + z3 = z2 + dir(-60)*ares; + z4 = z3 + dir(60)*ares; + z5 = z4 + dir(120)*ares; + z6 = z5 + dir(120)*ares; + z7 = z6 + dir(-120)*ares; + z8 = z7 + dir(120)*ares; + z9 = z8 + dir(-120)*ares; + z10= z9 + dir(120)*ares; + z11= z10+ dir(-120)*ares; + z12= z11+ dir(-120)*ares; + z13= z12+ dir(0)*ares; + z14= z13+ dir(-60)*ares; + pickup grossa; + draw z0--z1--z2--z3--z4--z6--z7--z8--z9--z10--z12--z13--z14--cycle; + pickup usual; + draw z4--z2--z5--z7--z2--z0--z7--z9--z0--z13--z9--z11--z13; + terminar( 1.52, 90 ); +endfig; + +beginfig(9); % plnptq + numeric ares; + ares := arestaref; + z0 = ares*(right+dir(30)+up); + z1 = z0 + dir(-90)*ares; + z2 = z1 + dir(150)*ares; + z3 = z1 + dir(30)*ares; + z4 = z3 + dir(90)*ares; + pickup usual; + draw z0--z1--z2--z0--z3; + pickup grossa; + draw z1--z3--z4; + picture tile; + tile = currentpicture; + draw tile shifted (ares*up); + draw tile shifted (ares*up*2); + draw tile shifted (ares*up*3); + z5 = ares*(right+2*dir(30)+4*up); + z6 = z5 + dir(-150)*ares; + z7 = z6 + dir(150)*ares; + z8 = z7 + 5*dir(-90)*ares; + z9 = z8 + dir(180)*ares; + z10 = z9 + dir(90)*ares; + z11 = z2 + dir(90)*ares; + z12 = z11 + dir(-120)*ares; + z13 = z11 + dir(180)*ares; + z14 = z13 + dir(90)*ares; + z15 = z14 + dir(60)*ares; + z16 = z15 + dir(-60)*ares; + draw z5--z6--z7--z16--z15--z14--z13--z12--z11--z2--z10--z9--z8--z1; + pickup usual; + draw z14--z16--z11--z13; + draw z2--z8; + desvia( 5,6,8,9 ); + terminar( 1.52, 180 ); +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpln2.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpln2.mp new file mode 100644 index 00000000000..54c0982aa3e --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpln2.mp @@ -0,0 +1,278 @@ +% planplntwo.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% Only planifications + +% truefyepsmode; + +% filenametemplate "%j%3c.ps"; + +beginfig(2); % plnnonrec + numeric ares, dstr, diag; + ares := arestaref; + dstr = 2/sqrt(3); + diag = dstr*ares; + z0 = diag*right/2; + z1 = diag*left/2; + z2 = radialcross( z0, ares, z1, ares, true); + z3 = radialcross( z0, ares, z1, ares, false); + z4 = radialcross( z0, diag, z2, ares, true); + z5 = radialcross( z0, ares, z4, ares, false); + z6 = radialcross( z4, diag, z5, ares, true); + z7 = radialcross( z4, ares, z6, ares, true); + z8 = radialcross( z6, diag, z7, ares, true); + z9 = radialcross( z6, ares, z8, ares, false); + z10 = radialcross( z1, diag, z2, ares, true); + z11 = 2*z10-z0; + z12 = z11 + z1 - z2; + z13 = z11 + z1 - z10; + pickup grossa; + draw z11--z12--z13; + picture sline; + sline = currentpicture; + currentpicture := nullpicture; + draw z10--z2--z4--z7--z8--z9--z6--z5--z0; + pickup usual; + draw z1--z2; + draw z0--z2; + draw z4--z5; + draw z6--z7; + picture stile, btile; + stile = currentpicture; + draw stile rotated 180; + btile = currentpicture; + draw btile shifted (z10-z0); + draw btile shifted (z0-z10); + draw sline; + draw sline rotated 180; + terminar( 1, 90-angle(z7-z10) ); +endfig; + +beginfig(3); % plntp + numeric are[], i, degre; + are0 = arestaref; + are1 = sqrt(2)*are0; + are2 = sqrt(3)*are0; + are3 = sqrt(3)*are0/2; + degre = angle( (are1,are0) ); + for i = 0 upto 2: + z[i*12+1] = origin + are1*dir(0+i*120); + z[i*12+2] = z[i*12+1] + are1*dir(120+i*120); + z[i*12+3] = z[i*12+2] + are1*dir(180+i*120); + z[i*12+4] = z[i*12+1] + are0*dir(75+i*120); + z[i*12+5] = z[i*12+2] + are1*dir(45+i*120); + z[i*12+6] = z[i*12+2] + are0*dir(90+i*120); + z[i*12+8] = z[i*12+3] + are0*dir(90+i*120); + z[i*12+9] = z[i*12+8] + are0*dir(180+i*120); + z[i*12+7] = z[i*12+6] + are3*dir(180-degre+i*120); + z[i*12+10] = z[i*12+6] + are1*dir(180-2*degre+i*120); + z[i*12+11] = z[i*12+6] + are0*dir(90-2*degre+i*120); + z[i*12+12] = z[i*12+10] + are0*dir(90-2*degre+i*120); + pickup grossa; + draw z[i*12+1]--z[i*12+4]--z[i*12+2]--z[i*12+5]--z[i*12+6]-- + z[i*12+11]--z[i*12+12]--z[i*12+10]--z[i*12+7]-- + z[i*12+8]--z[i*12+9]--z[i*12+3]; + pickup usual; + draw z[i*12+1]--z[i*12+2]--z[i*12+6]--z[i*12+7]; + draw z[i*12+2]--z[i*12+3]--z[i*12+8]; + endfor; + path small, big; + small = z1--z2--z4--cycle; + big = z14--z15--z20--z19--z18--cycle; + fill small withcolor 0.5white; + fill big withcolor 0.5white; + pickup grossa; + draw small; + draw big; + desvec(0.5*z14); + terminar( 1, 90-angle(z12-z33) ); +endfig; + +beginfig(4); % pln4pt + numeric are; + are = arestaref; + z14= origin; + z0 = z14+ are*down/2; + z1 = z0 + are*right; + z2 = z1 + are*dir(-120); + z3 = z2 + are*right; + z4 = z3 + are*dir(-60); + z5 = z4 + are*dir(30); + z6 = z5 + are*dir(120); + z7 = z6 + are*dir(120); + z8 = z7 + are*right; + z9 = z8 + are*dir(120); + z10= z9 + are*dir(150); + z11=z10 + are*dir(-120); + z12=z11 + are*dir(120); + z13=z12 + are*dir(-120); + pickup grossa; + draw z0--z2--z3--z4--z5--z6--z8--z9--z10--z12--z13; + pickup fina; + draw z1--z2; + draw z8--z7; + draw z12--z11; + pickup usual; + draw z14--z0--z1--z3--z6--z7--z11--z10; + draw z13--z11--z1--z7--z9; + draw currentpicture rotated 180; + terminar( 1.5, 90 ); +endfig; + +beginfig(5); % plnperovs + numeric are[]; + are1 = arestaref; + are2 = 2*are1; + z0 = origin; + z1 = z0 + are1*left/2; + z2 = z1 + are1*left; + z3 = z2 + are1*dir(60); + z4 = z3 + are2*dir(120); + z5 = z4 + are2*dir(-120); + z6 = z5 + are1*dir(-60); + z7 = z6 + are1*left; + z8 = z7 + are1*dir(-60); + z9 = z8 + are2*dir(-60); + z10= z9 + are2*dir(60); + z11=z10 + are2*right; + z12=z11 + are2*dir(-120); + pickup grossa; + draw z3--z4--z7--z9--z10--z12--z11; + pickup fina; + draw z6--z7; + draw z1--z2; + pickup usual; + draw z0--z1--z3--z2--z10--z1; + draw z11--z8--z6--z2; + draw z3--z5--z6; + draw currentpicture rotated 180; + terminar( 1.25, 90 ); +endfig; + +beginfig(6); % plnquim + numeric are[]; + are0 = arestaref; + are1 = sqrt(2)*are0; + are3 = 2*are0; + z0 = origin; + z1 = z0 + are1*left/2+are0*up; + z2 = z1 + are0*down; + z3 = z0 + are1*right/2+are0*down; + z4 = z2 + are3*down; + z5 = z3 + 2*are1*left; + z6 = 2*z5 - z4; + z7 = z6 + are0*up; + z8 = z5 + are0*up; + z9 = z8 + are3*up; + pickup grossa; + draw z3--z4--z6--z7--z9--z1; + pickup fina; + draw z2--z4; + draw z8--z9; + pickup usual; + draw z3--z2--z5--z8; + draw z7--z8--z1--z2; + draw currentpicture rotated 180; + terminar( 1.34, 90-angle(z3-z2) ); +endfig; + +beginfig(7); % pln2tri + numeric are[]; + are0 = arestaref; + are1 = sqrt(3)*are0; + are2 = 2*are0; + z0 = origin; + z1 = z0 + are2*dir(150); + z2 = z1 + are0*dir(30); + z3 = z2 + are2*dir(90); + z4 = z3 + are0*dir(-150); + z5 = z4 + are1*dir(-120); + z6 = z5 + are2*dir(-150); + z7 = z6 + are0*dir(-30); + z8 = z7 + are1*dir(0); + z9 = z8 + are0*dir(-150); + z10= z9 + are2*dir(-30); + z11= z10+ are0*dir(30); + z12= z11+ are2*dir(-90); + z13= z12+ are0*dir(-30); + z14= z13+ are2*dir(90); + z15= z14+ are1*dir(60); + z16= z15+ are0*dir(90); + pickup grossa; + draw z0--z2--z3--z4--z5--z6--z7--z8--z9--z10--z12--z13-- + z14--z15--z16--cycle; + pickup fina; + draw z1--z0; + draw z1--z4; + draw z1--z7; + draw z11--z8; + draw z11--z12; + draw z11--z15; + pickup usual; + draw z12--z14--z11--z10--z8--z1--z5--z7; + draw z11--z0--z15; + draw z1--z2--z4; + draw z0--z8; +% dotlabels.ulft( 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 ); + desvia( 0,1,2,3,4,5,9,10,12,13,14,15,16 ); + terminar( 1.34, 90-angle(z6-z12) ); +endfig; + +beginfig(8); % plntwist + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = aresta*(2.5*dir(-120)+dir(-60)); + for i=0 upto 4: + for j=0 upto 4-i: + px[i]y[j] := startpos+aresta*(i*dir(60)+j*dir(120)); + endfor; + endfor; + pickup grossa; + draw px2y1--px2y2--px0y4--px0y1--px1y0--px3y0; + pickup fina; + draw px0y1--px1y1; + draw px0y2--px1y2; + pickup usual; + draw px1y0--px1y1--px0y2; + draw origin--px2y1; + draw px2y0--px1y1--px1y2--px0y3--px1y3--px1y2--px2y1--cycle; + draw currentpicture rotated 180; + terminar( 1.8, 90-angle(px0y1-px2y0) ); +endfig; + +beginfig(9); % plnrect + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = origin; + for i=0 upto 5: + for j=0 upto 5: + px[i]y[j] := startpos+aresta*(i*right+j*up); + endfor; + endfor; + pickup grossa; + draw px2y1--px2y0--px4y0--px4y2--px3y2; + draw px4y2--px4y3--px5y3--px5y5--px3y5--px3y4--px2y4--px2y3; + draw px2y4--px0y4--px0y2--px1y2; + draw px0y2--px0y0--px2y0; + pickup fina; + draw px2y0--px0y2--px2y4--px4y2--cycle; + draw px0y0--px5y5; + draw px4y0--px0y4; + draw px5y3--px3y5; + pickup usual; + draw px1y2--px3y2; + draw px2y3--px2y1; + draw px1y0--px1y4; + draw px0y1--px4y1; + draw px3y0--px3y4--px5y4; + draw px0y3--px4y3--px4y5; + desvec( px2y2+aresta*unitvector(px5y3-px4y0)/2 ); + terminar( 1.34, 90-angle(px5y3-px4y0) ); +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpln3.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpln3.mp new file mode 100644 index 00000000000..02da18adab5 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpln3.mp @@ -0,0 +1,327 @@ +% planplnthree.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +% Only planifications + +% truefyepsmode; + +% filenametemplate "%j%3c.ps"; + +beginfig(9); % plntoro +% makearestarefathree; + numeric are[]; + are0 = arestaref; + are1 = (sqrt(3)-1)*are0; + z40 = are0*dir(-30)/2; + z37 = are0*dir(150)/2; + z22 = z40 + are0*dir(30); + z21 = z22 + are0*dir(-30); + z41 = z40 + are0*dir(90); + z31 = z37 + are0*dir(90); + z5 = z37 + are0*dir(-150); + z4 = z5 + are0*dir(-150); + z3 = z4 + are0*dir(90); + z2 = z3 + are0*dir(90); + z36 = z5 + are0*dir(90); + z32 = z36 + are0*dir(90); + z24 = z41 + are0*dir(90); + z23 = z22 + are0*dir(90); + z28 = radialcross( z31, are0, z24, are1, true); + z29 = radialcross( z28, are0, z31, are0, true); + z26 = radialcross( z28, are0, z24, are0, true); + z25 = radialcross( z26, are0, z24, are0, false); + z27 = radialcross( z28, are0, z26, are0, true); + z35 = radialcross( z2, are0, z32, are1, true); + z1 = radialcross( z2, are0, z35, are0, true); + z33 = radialcross( z35, are0, z32, are0, true); + z30 = radialcross( z33, are0, z32, are0, false); + z34 = radialcross( z35, are0, z33, are0, true); + pickup grossa; + draw z22--z23--z24--z25--z26--z27--z28--z29--z31--z37--z31--z32; + draw z33--z34--z35--z1--z2--z3; + + path opti, opto, intersec; + opti = z32--z30; + opto = z30--z33; + intersec = z28--z29--z31; + draw opti cutafter intersec; + draw opto cutbefore intersec; + pickup usual; + draw opti cutbefore intersec dashed pequeno; + draw opto cutafter intersec dashed pequeno; + draw z35--z32--z33; + draw z26--z24--z28; + draw z32--z2--z37; + draw z3--z24--z41--z23; + draw z31--z22; + draw z5--z41; + draw z32--z36; + draw origin--z40; + pickup fina; + draw z2--z35--z33; + draw z26--z28--z31; + draw z36--z5; + draw z41--z40; + picture tile; + tile = currentpicture; + draw tile rotated 180; + pickup grossa; + draw z3--z4--z5; + draw z22--z21; + pickup usual; + draw z3--z5; + terminar( 1.35, 90-angle(z1-z4)+5 ); +endfig; + +beginfig(6); % plnhiper + pair px[]y[], startpos; + numeric are[], i, j; + are1 = arestaref; + are2 = sqrt(3)*are1; + startpos = are1*4*left+are2*2*down; + for i=0 upto 8: + for j=0 upto 4: + px[i]y[j] := startpos+are1*i*right+are2*j*up; + endfor; + endfor; + pickup grossa; + draw px1y1--px3y1--px3y0--px4y1--px5y1--px5y0--px6y1--px7y1-- + px7y0--px8y1--px7y2--px7y3--px5y3--px5y4--px4y3--px3y3-- + px3y4--px2y3--px1y3--px1y4--px0y3--px1y2--cycle; + pickup fina; + draw px1y2--px7y2; + for i=1 step 2 until 5: + pickup usual; + draw px[i]y2--px[i+1]y3--px[i+2]y2--px[i+1]y1--cycle; + pickup fina; + draw px[i]y1--px[i]y3; + draw px[i+2]y1--px[i+2]y3; + endfor; + pickup usual; + draw px1y1--px8y1; + draw px0y3--px7y3; + terminar( 1, 90-angle(px3y0-px1y1) ); +endfig; + +beginfig(2); % plnmercedes + pair startpos; + numeric are[], basefactor; + basefactor = sqrt(2-sqrt(3)); + are2 = arestaref; + are1 = are2/basefactor; + startpos = (left+down)*are2/2; + z0 = startpos + are2*dir(90); + z1 = z0 + are2*right; + z2 = z1 + are1*dir(-15); + z3 = z2 + are1*dir(135); + z4 = z3 + are2*dir(30); + z5 = z4 + are2*dir(120); + z6 = z5 + are2*dir(-150); + z7 = z6 + are1*dir(105); + z8 = z7 + are1*dir(-105); + z9 = z8 + are2*dir(150); + z10= z9 + are2*dir(-120); + z11=z10 + are2*dir(-30); + z12=z11 + are1*dir(-135); + pickup grossa; + draw z2--z4--z5--z7--z9--z10--z12; + pickup fina; + draw startpos--z0; + draw z3--z4; + draw z5--z6; + draw z8--z9; + draw z10--z11; + pickup usual; + draw z0--z1--z2--z3--z1; + draw z8--z11--z12--z0--z11; + draw z3--z6--z7--z8--z6; + draw currentpicture rotated 180; + terminar( 2.5*basefactor, 90-angle(z4-z5) ); +endfig; + +beginfig(5); % plnacent + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = aresta*(1.5*dir(180)+dir(-120)); + for i=0 upto 3: + for j=0 upto 3-i: + px[i]y[j] := startpos+aresta*(i*dir(0)+j*dir(60)); + endfor; + endfor; + pickup grossa; + draw px2y0--px0y0--px0y3--px1y2; + pickup fina; + draw px1y1--px2y1; + pickup usual; + draw px2y0--px0y2--px1y2--px1y0--px0y1--px1y1; + draw currentpicture rotated 180; + terminar( 2.5, 90-angle(px0y1-px0y3) ); +endfig; + +beginfig(7); % plndisf + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = aresta*(1.5*dir(-150)+dir(150)); + for i=0 upto 3: + for j=0 upto 2: + px[i]y[j] := startpos+aresta*(i*dir(-30)+j*up); + endfor; + endfor; + pickup grossa; + draw px3y1--px3y0--px0y0--px0y2--px2y2; + pickup fina; + draw px0y0--px1y1--px2y1--px3y2; + pickup usual; + draw px2y1--px3y1--px2y0--px2y2--px1y1--px0y1--px1y2--px1y0--px2y1; + draw currentpicture rotated 180; + terminar( 1.8, 90 ); +endfig; + +beginfig(1); % plnicosa + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = aresta*(1.5*left+2*dir(-120)); + for i=0 upto 4: + for j=0 upto 3: + px[i]y[j] := startpos+aresta*(i*right+j*dir(120)); + endfor; + endfor; + pickup grossa; + draw px4y1--px3y0--px0y0--px0y2--px1y3--px3y3; + pickup fina; + draw px4y3--px3y2--px2y2--px2y3; + draw px3y0--px3y1; + draw px2y0--px2y1--px1y1--px0y0; + draw px0y1--px1y2--px1y3; + pickup usual; + draw px4y3--px3y3--px3y1--px2y0; + draw px4y2--px3y2--px1y0--px1y2; + draw px3y1--px2y1--px2y2--px1y1--px0y1; + draw px3y3--px2y2--px1y2; + draw px2y3--px1y2--px0y2; + draw currentpicture rotated 180; + terminar( 1.34, 90-angle(px3y1-px0y0) ); +endfig; + +beginfig(3); % plnking + pair startpos; + numeric are[]; + are1 = arestaref; + are2 = are1/2; + are3 = sqrt(3)*are1; + are4 = 2*are1; + startpos = origin; + z0 = startpos; + z1 = z0 + are2*right; + z2 = z1 + are4*right; + z3 = z2 + are1*right; + z4 = z3 + are1*dir(120); + z5 = z4 + are1*dir(120); + z6 = z5 + are1*dir(-120); + z7 = z6 + are1*dir(120); + z8 = z7 + are1*dir(120); + z9 = z8 + are1*dir(-120); + z10= z9 + are1*dir(-60); + z11= z10+ are1*left; + z12= z11+ are3*up; + pickup grossa; + draw z3--z4--z5--z7--z8--z12; + pickup fina; + draw z12--z10; + draw z8--z11; + draw z5--z6; + draw z1--z2; + pickup usual; + draw z0--z1--z11--z12; + draw z1--z7--z9; + draw z7--z2--z3; + draw z2--z4--z11; + draw currentpicture reflectedabout(z11,z12); + draw currentpicture reflectedabout(z0,z3); + terminar( 1.27, 90 ); +endfig; + +beginfig(0); % plnbola +% makearestarefathree; + pair startpos; + numeric are[]; + picture temporpic; + are1 = arestaref; + are2 = arestaref/2; + are3 = sqrt(3)*are1; + are4 = 2*sqrt(3)*are1; + startpos = origin; + z1 = startpos + are2*dir(30); + z2 = z1 + are1*dir(-30); + z9 = z2 + are1*down; + z3 = z9 + are1*dir(-150); + z4 = z3 + are1*dir(-150); + z5 = z4 + are1*dir(150); + z6 = z5 + are1*dir(30); + z7 = z6 + are1*dir(30); + z8 = z7 + are1*dir(150); + pickup grossa; + draw z7--z3--z4--z5; + pickup fina; + draw z5--z6--z8--z1--z2--z9--z3--z6; + draw currentpicture rotated 180; + temporpic = currentpicture; + draw temporpic shifted (are3*left); + draw temporpic shifted (are4*left); + pickup grossa; + draw (z5+are4*left)--(z1+3*are3*left+are1*up) + --(z1+3*are3*left+are1*(up+dir(30))); + draw currentpicture rotated 180; + terminar( 0.97, 90 ); +endfig; + +beginfig(4); % plnescava +% makearestarefathree; + pair px[]y[], startpos; + numeric aresta, i, j; + aresta = arestaref; + startpos = origin; + for i=0 upto 5: + for j=0 upto 6: + px[i]y[j] := startpos+aresta*(i*right+j*dir(60)); + endfor; + endfor; + pickup grossa; + draw px5y2--px5y1--px4y1--px5y0--px3y0--px2y1--px2y2--px1y2--px0y3 + --px0y6--px1y6--px2y5--px2y6--px4y6--px5y5; + pickup fina; + draw px0y6--px1y4--px3y3--px4y4--px3y6; + draw px0y3--px1y4--px3y3--px4y1--px3y0; + draw px2y2--px1y3; + draw px2y2--px2y3; + draw px2y2--px3y2; + draw px2y2--px3y1; + draw px2y5--px1y5; + draw px2y5--px2y4; + draw px2y5--px3y4; + draw px2y5--px3y5; + draw px5y2--px4y2; + draw px5y2--px4y3; + draw px5y2--px5y3; + draw px5y5--px4y5; + draw px4y4--((px5y3+px5y4)/2); + pickup usual; + draw px4y0--px4y6; + draw px3y0--px3y6; + draw px1y2--px1y6; + draw px2y1--px4y1--px0y5; + draw px0y3--px5y3--px2y6; + draw px0y4--px5y4--px3y6; + draw px0y6--px5y1; + draw currentpicture rotatedaround((px5y3+px5y4)/2,180); + desvec((px5y3+px5y4)/2); + terminar( 0.9, 81 ); %%%%%%%%%% or 60 instead of 81 +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpln4.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpln4.mp new file mode 100644 index 00000000000..4d9d2f1f163 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpln4.mp @@ -0,0 +1,313 @@ +% planplnfour.mp +% L. Nobre G. +% 2007 + +input featpost3Dplus2D; + +% Only planifications + +% truefyepsmode; prologues:=1; + +% filenametemplate "%j%3c.ps"; + +beginfig(3); % plnflextrue + numeric are[]; + are0 = arestaref; + are1 = 2*are0; + are2 = 11*are0/5; + are3 = 12*are0/5; + are4 = 17*are0/5; + z0 = are4*right/2; + z1 = are4*left/2; + z2 = radialcross( z0, are3, z1, are3, true); + z3 = radialcross( z2, are0, z0, are1, true); + z4 = radialcross( z1, are1, z2, are0, true); + z5 = radialcross( z1, are1, z4, are2, true); + z6 = radialcross( z1, are3, z5, are0, false); + z7 = radialcross( z5, are3, z4, are3, true); + z8 = radialcross( z5, are0, z7, are1, true); + z9 = radialcross( z4, are0, z7, are1, true); + z10 = radialcross( z9, are0, z7, are3, true); + z11 = radialcross( z9, are3, z10, are1, false); + z12 = radialcross( z4, are3, z2, are1, true); + pickup grossa; + draw z0--z3--z2; + draw z4--z9--z11--z10--z7--z8--z5--z6--z1; + path opti, opto, intersec, outercut; + opti = z4--z12; + opto = z12--z2; + intersec = z9--z11; + outercut = z10--z11; + draw opti cutafter intersec; + draw opto cutbefore intersec; + pickup usual; + draw opti cutbefore outercut dashed pequeno; + draw opto cutafter outercut dashed pequeno; + draw opti cutbefore intersec cutafter outercut dashed pequeno; + draw opto cutbefore outercut cutafter intersec dashed pequeno; + draw origin--z0; + draw z1--z2; + draw z1--z5; + draw z5--z7; + draw z7--z9; + draw z9--z10; + pickup fina; + draw z0--z2--z4; + draw z1--z4--z5; + draw z7--z4; + + picture tile; + tile = currentpicture; + draw tile rotated 180; + terminar( 1, -26 ); +endfig; + +beginfig(2); % plnflex 40 + pair startpos; + numeric are[]; + picture temporpic; + are2 = arestaref/2; + are1 = 2*are2; + are0 = sqrt(6)*are2; + are3 = sqrt(3)*are1; + are4 = are3/2; + startpos = are4*dir(60); + z1 = startpos; + z2 = z1 + are3*dir(-120); + z3 = z2 + are1*up; + z4 = z3 + are2*up; + z5 = z4 + are4*up; + z6 = z4 + are0*dir(45); + pickup grossa; + draw z5--z6--z1; + pickup fina; + draw z4--z6; + draw z2--z3--z1; + pickup usual; + draw z2--z1--z4; + draw z3--z4--z5; + draw currentpicture reflectedabout(z2,z3); + draw currentpicture rotated 180; + temporpic = currentpicture; + draw temporpic shifted (are3*left); + draw temporpic shifted (are3*right); + pickup grossa; + draw (z2+are3*left)--(z1+2*are3*left); + draw (z1+are3*right)--(z3+2*are3*right)--(z2+2*are3*right); + terminar( 1.52, 90 ); +endfig; + +beginfig(4); % plnarcurv1 + pair startpos; + numeric are[], basefactor; + basefactor = sqrt(2-sqrt(3)); + are2 = arestaref; + are1 = are2/basefactor; + startpos = (left+down)*are2/2; + z0 = startpos + are2*dir(90); + z1 = z0 + are2*right; + z2 = z1 + are1*dir(-15); + z3 = z2 + are1*dir(135); + z4 = z3 + are2*dir(30); + z5 = z4 + are2*dir(120); + z6 = z5 + are2*dir(-150); + z7 = z6 + are1*dir(105); + z8 = z7 + are1*dir(-105); + z9 = z8 + are2*dir(150); + z10= z9 + are2*dir(-120); + z11=z10 + are2*dir(-30); + z12=z11 + are1*dir(-135); + pickup grossa; + draw z2{z4-z2}...(0.5[z4,z5]) + ...{z7-z5}z7{z9-z7} + ...(0.5[z9,z10]) + ...{z12-z10}z12; + pickup usual; + draw z2{z3-z2}...(0.5[z3,z6])...{z7-z6}z7; + draw z7{z8-z7}...(0.5[z8,z11])...{z12-z11}z12; + draw z12{z0-z12}...(0.5[z0,z1])...{z2-z1}z2; + draw currentpicture rotated 180; + terminar( 2.5*basefactor, 90-angle(z4-z5) ); +endfig; + +beginfig(5); % plnarcurv2 + numeric are; + are = arestaref; + z0 = origin; + z1 = z0 + are*right; + z2 = z0 + 2*are*up; + z3 = z0 + 2*are*left; + z4 = z3 + 2*are*down; + z5 = z0 + 2*are*down; + z6 = z0 + 2*are*right; + z7 = z0 + are*down; + z8 = z0 + are*left; + pickup grossa; + draw z0--z6--z7--z5--z4--z3--z8--z2--z1; + pickup usual; + draw z2--z7--z4--z8--z0; + draw ((fullcircle scaled (2*are)) cutbefore (z0--z3)) + cutafter (z0--z5); + desvec( 0.5*(z8+z7) ); + terminar( 2.15, 45 ); +endfig; + +beginfig(7); % hexagonal base tower made in 2006 + numeric are, len; + picture tmppic; + are = arestaref; + len = are/sqrt(2-sqrt(3)); + z0 = origin; + z1 = z0 + are*dir(60); + z2 = z1 + are*dir(15); + z3 = z1 + len*up; + z4 = z3 + are*dir(120); + z5 = z3 + are*left; + z6 = z1 + are*left; + z7 = z6 + are*dir(165); + z8 = z6 + len*dir(165); + z9 = z0 + are*left; + pickup grossa; + draw z1--z2--z3--z4--z5--z7--z6--z8--z9; + pickup usual; + draw z9--z6--z5--z3--z1--z6; + tmppic = currentpicture; + draw tmppic rotated 120; + draw tmppic rotated -120; + desvec( 0.127*z4 ); + terminar( 1.08, 75 ); +endfig; + +beginfig(8); % penta-pack of pyramids made in 2006 + numeric are; + picture tmppic; + are = arestaref; + z0 = origin; + z1 = z0 + are*dir(45)/sqrt(2); + z2 = z1 + are*dir(45)*sqrt(2); + z3 = z2 + are*dir(120); + z4 = z1 + are*up; + z5 = z4 + are*dir(120); + z6 = z4 + are*left; + z7 = z6 + are*dir(120); + z8 = z6 + are*left; + z9 = z1 + are*left; + pickup grossa; + draw z2--z3--z4--z5--z6--z7--z8; + pickup usual; + draw z2--z8--z6--z9--z1--z4; + pickup fina; + draw z1--z2; + tmppic = currentpicture; + draw tmppic rotated 90; + draw tmppic rotated 180; + draw tmppic rotated -90; + terminar( 1.42, 0 ); +endfig; + +beginfig(6); % Cube without one vertex, made in 2007. + numeric are; + picture tmppic; + are = arestaref; + z0 = origin; + z1 = z0 + are*dir(60)*sqrt(2); + z2 = z1 + are*dir(135); + z3 = z2 - are*dir(45); + z4 = z0 + are*up*sqrt(6); + z5 = z4 - are*dir(15); + z6 = z5 + are*dir(105); + z9 = z5 - 2*are*dir(15); + z8 = z9 + 2*are*dir(105); + z7 = z8 + are*dir(15); + z10= z9 + 2*are*dir(-75); + z11=z10 + are*dir(15); + z12=z10 + are*dir(-75); + pickup grossa; + draw z1--z2--z3--z4--z5--z6--z7--z8--z9--z10--z12--z11; + pickup usual; + draw z1--z3--z5--z9; + draw z10--z11--z3; + tmppic = currentpicture; + draw tmppic rotated 120; + draw tmppic rotated -120; + desvec( 1.09*are*right ); + terminar( 0.87, -9.5 ); +endfig; + +beginfig(1); % Thing with curved edges, made in 2007. + path arccircle, cutbp, cutap, arcbelow; + numeric conr, cond, u, v; + u = arestaref; + conr = 0.60588; + cond = 0.34218; + v = 0.9003u; + cutbp = origin--(0.5,cond); + cutap = origin--(-0.5,cond); + arccircle = ((halfcircle cutbefore cutbp) cutafter cutap) scaled (4*u*conr); + arcbelow = arccircle rotated 180; + z1 = (-u,0); + z2 = (-u,v); + z3 = (-u-2v,v); + z4 = (-u-2v,3v); + z5 = (-u,3v); + z6 = (-u,5v); + z7 = (u,5v); + z8 = (u+2v,5v); + z9 = (u+2v,0); + z10 = (u+2v,v); + z11 = (u+2v,3v); + z12 = (u,3v); + z13 = (u,v); + z14 = (u,0); + z15 = (-u-2v,0); + z16 = (0,5v+2cond*u); + z17 = (0,3v-2cond*u); + z18 = (0,v+2cond*u); + pickup grossa; + draw z2--z3; + draw z10--z13; + draw z11--z12; + draw z15--z4--z5--z6; + draw z7--z8--z9; + draw arcbelow shifted z16; + pickup usual; + draw z1--z5; + draw z7--z14; + draw arccircle shifted z17; + draw arcbelow shifted z18; + draw currentpicture rotated 180; + terminar( 1, 0 ); +endfig; + +beginfig(9); + numeric u, v; + u = arestaref; + v = 0.5*sqrt(3)*u; + z1 = (0.5u,0); + z2 = (-0.5u,0); + z3 = (0.5u+v,0.5u); + z4 = (0.5u,u); + z5 = (0.5u+v,1.5u); + z6 = (0.5u,2u); + z7 = (-0.5u,2u); + z8 = (-0.5u,u); + z9 = (-0.5u-v,1.5u); + z10 = (-0.5u-2v,u); + z11 = (-0.5u-v,0.5u); + z12 = (-0.5u-2v,0); + z13 = (-0.5u-v,-0.5u); + pickup grossa; + draw z2--z13--z12--z10--z7--z6--z5--z3--z1; + draw z4--z8--z7; + draw z11--z9; + pickup fina; + draw z2--z11; + pickup usual; + draw z11--z12; + draw z6--z1--z2--z8--z9; + draw z4--z5; + draw currentpicture rotated 180; + terminar( 1.75, angle((v,1.5u))+90 ); +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/planpln5.mp b/Master/texmf-dist/doc/metapost/featpost/example/planpln5.mp new file mode 100644 index 00000000000..c88ae9fd865 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/planpln5.mp @@ -0,0 +1,48 @@ +% planplnfive.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +% Only planifications +% truefyepsmode; prologues:=1; + +% filenametemplate "%j%3c.ps"; + +beginfig(1); + numeric u, aux; + u = defaultaresta; + aux = u*0.5*sqrt(2); + z0 = (-aux,0); + z1 = (aux,0); + z8 = radialcross( z0, u, z1, u, true); + z6 = radialcross( z0, u, z8, u, true); + z2 = radialcross( z0, u, z6, u, false); + z4 = radialcross( z2, u, z6, u, true); + z9 = radialcross( z1, u, z8, u, true); + z3 = radialcross( z1, u, z9, u*sqrt(2), false); + z7 = radialcross( z3, u, z9, u, true); + z5 = radialcross( z3, u, z7, u, false); + z10 = radialcross( z6, u, z8, u, true); + z11 = radialcross( z9, u, z7, u, true); + z12 = radialcross( z9, u, z10, u, true); + z13 = radialcross( z7, u, z11, u, true); + z14 = radialcross( z10, u, z12, u, true); + z15 = radialcross( z11, u, z12, u, true); + z16 = radialcross( z14, u, z15, u, true); +% labels.top(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); + pickup grossa; + draw z2--z4--z6--z10--z14--z16--z15--z11--z13--z7--z5--z3; + pickup usual; + draw z0--z2--z6--z0--z8--z1--z3--z7--z9--z1; + draw z6--z8--z10--z12--z14; + draw z8--z9--z11--z7; + draw z11--z12; + draw z9--z12--z15; + picture tile; + tile = currentpicture; + draw tile rotated 180; + terminar( 1.5, 45 ); +endfig; + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp b/Master/texmf-dist/doc/metapost/featpost/example/polyhedr.mp index b0509b75f05..03a7a4e48fe 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/polyhedr.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/polyhedr.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp b/Master/texmf-dist/doc/metapost/featpost/example/positivecharge.mp index b0fccbc11a3..b396f928890 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/positivecharge.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/positivecharge.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric size, num, i, j, coos[]; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/quartertorus.mp b/Master/texmf-dist/doc/metapost/featpost/example/quartertorus.mp new file mode 100644 index 00000000000..b979b7f26f1 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/quartertorus.mp @@ -0,0 +1,36 @@ +% quartertorus.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{mathpazo} +\begin{document} +etex + +f := (3,5,2.5); + +beginfig(1); + color a, b, c, g; + numeric fac, siz; + fac = 0.05; + siz = 0.3; + g = -green; + a = blue-red; + b = g-fac*a; + c = -a-fac*g; + drawoptions( withpen pencircle scaled 2.5pt ); + quartertorus( black, g, a, siz ); + quartertorus( black, b, c, siz ); + quartertorus( black, green, -red, siz ); + quartertorus( -0.7*blue, blue, 0.6red+green, siz ); + label( btex $\vec{\Upsilon}$ etex, rp( c ) ); +endfig; + +verbatimtex +\end{document} +etex + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/redplanet.mp b/Master/texmf-dist/doc/metapost/featpost/example/redplanet.mp new file mode 100644 index 00000000000..934573851b7 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/redplanet.mp @@ -0,0 +1,137 @@ +% redplanet.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +f := (4,0,-1); +def cf( expr Pair ) = + begingroup + save xc, yc, xa, ya; + numeric xc, yc, xa, ya; + xc = xpart Pair; + yc = ypart Pair; + xa = 1.25*(xc+1); + ya = 1.25*(yc+1); + ( rp( ( cosd(ya)*cosd(xa), cosd(ya)*sind(xa), sind(ya) ) ) ) + endgroup +enddef; + +beginfig(1); + numeric u; + color yellow, thered, theblue; + path martelo, foice, monitor, ecran, mar, foi, rotfoi, rotmar, pa, pb, pc; + u = 1pt; + yellow = 0.87*(0.95*red+0.7*green); + thered = 0.66red; + theblue= 0.87*(0.95*blue+0.27*red); + + 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 and 0.5[z106,z107].. + z107-- + z108-- + z109-- + z110-- + z111--cycle; + mar = martelo rotated martelrot shifted martelpos; + + numeric fcabolen, fcabolar, foicecontrol, laminang; + numeric foicerot, foicaber, flamilar, fcabomar, refang; + numeric fmaomarg, fmaorais, fmaospac, fprotrud, basangul; + pair foicepos; + laminang = 9; + refang = 10; + basangul = 23; + fcabomar = 3u; + fcabolar = 8u - fcabomar; + flamilar = 4u; + fcabolen = 22u; + foicecontrol = 2u; + fmaomarg = 6u; + fmaorais = 2u; + fmaospac = 14u; + fprotrud = 25u; + foicaber = 42u; + foicerot = -50; + foicepos = dir(270)*0.325*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 and 0.5[z204,z205].. + 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; +% draw foice; +% dotlabels.top(203,204,205); + foi = foice rotated foicerot shifted foicepos; + + numeric l, k; +% k = length foi; +% l = length mar; +% show (k,l); + rotfoi = startahead( foi, 6 ); + rotmar = startahead( mar, 1 ); +% drawarrow subpath (0,1) of rotfoi withpen pencircle scaled 1pt withcolor red; +% drawarrow subpath (0,1) of rotmar withpen pencircle scaled 1pt withcolor red; + + fill rigorousfearpath( black, 1 ) withcolor thered; + pa = crossingline(rotfoi,rotmar,0.001); + pb = closedpathinspace( pa, 16, cf ); + pc = closedpathinspace( lasermachine(pa,3pt,0.3), 16, cf ); + fill pc withcolor theblue; + fill pb withcolor yellow; + +% fill rotfoi withcolor yellow+thered; +% fill rotmar withcolor 0.7blue; + + produce_auto_scale; + +% for l=0 step 15 until 360: +% show angle(dir(l)); +% endfor; +endfig; + + +end; + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp b/Master/texmf-dist/doc/metapost/featpost/example/resistcircuit.mp index e0e679c97e1..bc4eebce84a 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/resistcircuit.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/resistcircuit.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); boolean kind[]; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/revolipsoid.mp b/Master/texmf-dist/doc/metapost/featpost/example/revolipsoid.mp new file mode 100644 index 00000000000..62390d9b939 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/revolipsoid.mp @@ -0,0 +1,50 @@ +% revolipsoid.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +prologues := 1; + +Spread := 20; +f := 7.1*(3,5,4); +ShadowOn := true; +HoriZon := -5; +LightSource := 10*(4,-2,4); + +beginfig(1); + setthestage(30,45); + drawoptions( withpen pencircle scaled 1mm ); + numeric num, r, ste, i, j, aux; + r = 1.6; + num = 5; + aux = 0.5*(num-1); + ste = 90/aux; + for i=-aux upto aux: + for j=-aux upto aux: + spheroid((red*j+green*i)*2*(r**aux),(cosd(i*ste),0,sind(i*ste)),r**(-j)); + endfor; + endfor; +endfig; + +ShadowOn := false; + +beginfig(2); + drawoptions( withpen pencircle scaled 1mm ); + numeric num, r, ste, i, j, aux, fac; + color aim; + r = 0.55; + fac = 0.6; + num = 6; + aux = 0.5*(num-1); + ste = 90/aux; + for i=-aux upto aux: + for j=-aux upto aux: + aim := N(f-viewcentr)+fac*(i*red+j*green)/aux; + spheroid((red*j+green*i)*3*r,aim,r); + endfor; + endfor; +endfig; + +end. + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp b/Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp new file mode 100644 index 00000000000..acd71d2ead5 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp @@ -0,0 +1,160 @@ +% revolvers.mp +% L. Nobre G. +% 2004 + +input featpost3Dplus2D; + +verbatimtex \documentclass{article}\begin{document}{\sffamily etex + +def posang( expr Angul ) = + rp( green*cosd( Angul ) + blue*sind( Angul ) ) +enddef; + +beginfig(1); + f := (3,5,4); + numeric labscal; + picture labr, labc, laba, labum, labdo, labtr, labqu, labci; + labscal = 2; + ahlength := 8pt; + ahangle := 30; + labc = btex $\vec{c}$ etex scaled labscal; + laba = btex $\vec{A}$ etex scaled labscal; + labr = btex $R$ etex scaled labscal; + labum= btex 1 etex scaled labscal; + labdo= btex 2 etex scaled labscal; + labtr= btex 3 etex scaled labscal; + labqu= btex 4 etex scaled labscal; + labci= btex 5 etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + tropicalglobe( 5, black, 1, blue ); + drawoptions( withpen pencircle scaled 1.3pt ); + drawdblarrow rp(black)--rp(red); + label.top( labr, rp((0.5,0,0)) ); + drawarrow rp(black)--rp(blue); + label.rt( laba, rp((0,0,0.5)) ); + dotlabel.lrt( labc, rp(black) ); + dotlabel.rt( labum, posang(-72) ); + dotlabel.top( labdo, posang(-36) ); + dotlabel.top( labtr, posang(0) ); + dotlabel.top( labqu, posang(36) ); + dotlabel.top( labci, posang(72) ); +endfig; + +beginfig(2); + f := (3,5,5.7); + numeric labscal; + picture labri, labc, laba, labro; + labscal = 2; + ahlength := 8pt; + ahangle := 30; + labc = btex $\vec{c}$ etex scaled labscal; + laba = btex $\vec{A}$ etex scaled labscal; + labri= btex $R_i$ etex scaled labscal; + labro= btex $R_o$ etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + rigorousdisc( 0.5, true, black, 1, 0.85*blue ); + drawoptions( withpen pencircle scaled 1.3pt ); + drawdblarrow rp(black)--rp(red); + label.lrt( labro, rp(0.5*red) ); + drawdblarrow rp(black+0.85*blue)--rp(0.5*green+0.85*blue); + label.urt( labri, rp(0.25*green+0.85*blue) ); + drawarrow rp(black)--rp(0.85*blue); + label.ulft( laba, rp((0,0,0.5)) ); + dotlabel.rt( labc, rp(black) ); +endfig; + +beginfig(3); + f := (3,2.05,2.65); + numeric labscal, bray, sray; + picture labrb, labc, laba, labrs; + labscal = 2; + ahlength := 8pt; + ahangle := 30; + bray = 0.7; + sray = 0.4; + labc = btex $\vec{c}$ etex scaled labscal; + laba = btex $\vec{A}$ etex scaled labscal; + labrb= btex $R_b$ etex scaled labscal; + labrs= btex $R_s$ etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + smoothtorus( black, blue, bray, sray ); + drawoptions( withpen pencircle scaled 1.3pt ); + draw goodcirclepath( bray*red, green, sray ) dashed evenly; + drawdblarrow rp(black)--rp(bray*red); + label.ulft( labrb, rp(0.5*bray*red) ); + drawdblarrow rp(bray*red+sray*blue)--rp(bray*red); + label.llft( labrs, rp(bray*red+0.5*sray*blue) ); + drawarrow rp(black)--rp(sray*blue); + label.rt( laba, rp((0,0,0.5*sray)) ); + dotlabel.lrt( labc, rp(black) ); +endfig; + +beginfig(4); + f := (3,5,4); + numeric labscal; + picture labr, labc, laba; + labscal = 2; + ahlength := 8pt; + ahangle := 30; + labc = btex $\vec{c}$ etex scaled labscal; + laba = btex $\vec{A}$ etex scaled labscal; + labr = btex $R$ etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + spatialhalfsfear( black, blue, 1 ); + drawoptions( withpen pencircle scaled 1.3pt ); + drawdblarrow rp(black)--rp(red); + label.ulft( labr, rp(0.5*red) ); + drawarrow rp(black)--rp(0.4*blue); + label.rt( laba, rp((0,0,0.2)) ); + dotlabel.lrt( labc, rp(black) ); +endfig; + +beginfig(5); + f := (3,5,7); + numeric labscal; + picture labr, labc, laba; + labscal = 2; + ahlength := 10pt; + ahangle := 30; + labc = btex $\vec{c}$ etex scaled labscal; + laba = btex $\vec{S}$ etex scaled labscal; + labr = btex $R$ etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + spheroid( black, 2*blue, 1 ); + drawoptions( withpen pencircle scaled 1.3pt ); + draw ellipticpath( black, red, 2*blue ) dashed evenly; + draw ellipticpath( black, green, 2*blue ) dashed evenly; + drawdblarrow rp(black)--rp(red); + label.ulft( labr, rp((0.5,0,0)) ); + drawarrow rp(black)--rp(2*blue); + label.rt( laba, rp((0,0,1)) ); + dotlabel.lrt( labc, rp(black) ); +endfig; + +beginfig(6); + f := (3,5,4); + numeric labscal; + picture labl, labm, labr, labc; + labscal = 2; + ahlength := 10pt; + ahangle := 30; + labc = btex $\vec{c}$ etex scaled labscal; + labm = btex $\vec{M}$ etex scaled labscal; + labl = btex $L$ etex scaled labscal; + labr = btex $R$ etex scaled labscal; + draw rp((cosd(145),sind(-145),0))--rp(black)--rp((cosd(145),sind(145),0)); + drawarrow rp(black)--rp(red) withpen pencircle scaled 1.3pt; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + banana( black, 1, black, 0.3, 145 ); + drawoptions( withpen pencircle scaled 1.3pt ); + drawdblarrow rp(black)--rp(0.3*blue); + label.lft( labl, rp((0,0,0.15)) ); + drawdblarrow rp(0.3*blue)--rp(0.3*blue-green); + label.llft( labr, rp(0.3*blue-0.5*green) ); + label.ulft( labm, rp(0.5*red) ); + dotlabel.bot( labc, rp(black) ); +endfig; + +verbatimtex }\end{document} etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp b/Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp~ index 41fd7a9c4e2..cdb3978a6b0 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/revolvers.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/revolvers.mp~ @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + verbatimtex \documentclass{article}\begin{document}{\sffamily etex def posang( expr Angul ) = @@ -107,6 +109,28 @@ beginfig(4); dotlabel.lrt( labc, rp(black) ); endfig; +beginfig(5); + f := (3,5,7); + numeric labscal; + picture labr, labc, laba; + labscal = 2; + ahlength := 10pt; + ahangle := 30; + labc = btex $\vec{c}$ etex scaled labscal; + laba = btex $\vec{S}$ etex scaled labscal; + labr = btex $R$ etex scaled labscal; + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + spheroid( black, 2*blue, 1 ); + drawoptions( withpen pencircle scaled 1.3pt ); + draw ellipticpath( black, red, 2*blue ) dashed evenly; + draw ellipticpath( black, green, 2*blue ) dashed evenly; + drawdblarrow rp(black)--rp(red); + label.ulft( labr, rp((0.5,0,0)) ); + drawarrow rp(black)--rp(2*blue); + label.rt( laba, rp((0,0,1)) ); + dotlabel.lrt( labc, rp(black) ); +endfig; + verbatimtex }\end{document} etex end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp b/Master/texmf-dist/doc/metapost/featpost/example/rigorcubo.mp index 831861fc9b6..d63dac87df0 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/rigorcubo.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rigorcubo.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(0); defaultscale := 3; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp b/Master/texmf-dist/doc/metapost/featpost/example/rigorouscircle.mp index a63ecb92e95..cfc0db3c304 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscircle.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rigorouscircle.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := (2,0.2,0.1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp b/Master/texmf-dist/doc/metapost/featpost/example/rigorouscone.mp index 3c79b95315b..8ee9f9ccfd2 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorouscone.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rigorouscone.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); color nalfa, gammacnt, vertex; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp b/Master/texmf-dist/doc/metapost/featpost/example/rigorousdiscSD.mp index e9bfa7c2730..3c664e582df 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscSD.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rigorousdiscSD.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 0.8*(6,3,4); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp b/Master/texmf-dist/doc/metapost/featpost/example/rigorousdiscoptions.mp index 59200177b7d..e926a872849 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousdiscoptions.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rigorousdiscoptions.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 0.8*(6,3,4); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp b/Master/texmf-dist/doc/metapost/featpost/example/rigorousfearpath.mp index c56ab28f61a..a91913fc749 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/rigorousfearpath.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rigorousfearpath.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric sfr, radfac, ind; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp b/Master/texmf-dist/doc/metapost/featpost/example/rmnbob.mp index 54d568c1e49..88e95ec7b56 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/rmnbob.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rmnbob.mp @@ -1,9 +1,12 @@ +% rmnbob.mp +% L. Nobre G. +% probably before 2004 + +input featpost3Dplus2D; Spread := 70; f := (5,7,10); -%input featpost3Dplus2D; - beginfig(1); numeric i, r[], stepr, len, Numr, Minn, Maxn; numeric fws, NumLines, linex; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp b/Master/texmf-dist/doc/metapost/featpost/example/rotatnlc.mp index 3adafc002cc..42f47a543fb 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/rotatnlc.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/rotatnlc.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/rungekuttasecond.mp b/Master/texmf-dist/doc/metapost/featpost/example/rungekuttasecond.mp new file mode 100644 index 00000000000..92086810ab2 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/rungekuttasecond.mp @@ -0,0 +1,103 @@ +% rungekuttasecond.mp +% L. Nobre G. +% 2008 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{beton} +\usepackage{concmath} +\usepackage{ccfonts} +\begin{document} +etex + +Spread := 30; +f := (10,0,0); + +def vecfunc( expr posit )= + ( (0,1,Z(posit)-Y(posit)) ) +enddef; + +beginfig(2); +% cartaxes( 2.4, 2.4, 2.4 ); + numeric grids, size, i, j, ijmax, diffstep, len, h; + color actpos, one, two, aux, graycol, stap, midp, finp ; + pair yaxp, oaxp, xaxp; + graycol = 0.67white; + h = 3; + grids = 0.15; + size = 0.14; + diffstep = 0.0125; +% len = 320; + len = 240; + ijmax = floor( 2.0/grids ); + for j=-ijmax upto ijmax: + for i=-ijmax upto ijmax: + actpos := grids*(0,i,j); + aux := 0.5*size*N( vecfunc( actpos ) ); + one := actpos-aux; + two := actpos+aux; + draw rp(one)--rp(two) withcolor graycol; + endfor; + endfor; +% stap = (0,-2,-1.05); +% draw fieldlinepath( len, stap, diffstep, vecfunc ) withcolor blue; + stap = (0,-1.5,-0.65); + draw fieldlinepath( len, stap, diffstep, vecfunc ) withcolor blue; + midp = stap + 0.5*h*vecfunc( stap ); + finp = stap + h*vecfunc( midp ); + draw rp(stap)--rp(midp); + draw rp(stap)--rp(finp); +% drawoptions( withcolor blue ); +% draw fieldlinepath( len, (0,-2,-1.25), diffstep, vecfunc ); +% draw fieldlinepath( len, (0,-2,-1.2), diffstep, vecfunc ); +% draw fieldlinepath( len, (0,-2,-1.15), diffstep, vecfunc ); +% draw fieldlinepath( len, (0,-2,-1.1), diffstep, vecfunc ); +% draw fieldlinepath( len, (0,-2,-1.05), diffstep, vecfunc ); + yaxp = rp((0,-2-grids,2+grids)); + oaxp = rp((0,-2-grids,-2-grids)); + xaxp = rp((0,2+grids,-2-grids)); + drawdblarrow yaxp--oaxp--xaxp; + label.bot(btex $x$ etex, xaxp ); + label.lft(btex $y$ etex, yaxp ); + dotlabel.bot(btex $x_0$ etex, rp((0,Y(stap),-2-grids)) ); + dotlabel.lft(btex $y_0$ etex, rp((0,-2-grids,Z(stap))) ); + dotlabel.bot(btex $x_0+\frac{h}{2}$ etex, rp((0,Y(midp),-2-grids)) ); + dotlabel.lft(btex $y_0+\frac{h}{2}f_0$ etex, rp((0,-2-grids,Z(midp))) ); + dotlabel.bot(btex $x_0+h$ etex, rp((0,Y(finp),-2-grids)) ); + dotlabel.lft(btex $y_0+hf_{1/2}$ etex, rp((0,-2-grids,Z(finp))) ); +endfig; + +numeric u, grids, i, j, thex, they, xmax, ymax, vertn, horin, rescal, size; +pair actpos, direct, one, two; + +u := 0.5mm; +vertn := 20; +horin := 41; +size := 3u; +grids := 8u; +ymax := 0.5*(vertn-1); +xmax := 0.5*(horin-1); +rescal := 0.15; + +beginfig(1); + pickup pencircle scaled u; + 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; + +verbatimtex +\end{document} +etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp b/Master/texmf-dist/doc/metapost/featpost/example/sal.mp index e2c447a27a9..9646ead8380 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/sal.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/sal.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2002 +input featpost3Dplus2D; + verbatimtex \documentclass{article} \begin{document} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp b/Master/texmf-dist/doc/metapost/featpost/example/saturn.mp index 44be273cc73..372866401ff 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/saturn.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/saturn.mp @@ -1,6 +1,8 @@ % saturn.mp % L. Nobre G. -% 2005 +% 2007 + +input featpost3Dplus2D; verbatimtex \documentclass{article} @@ -29,7 +31,7 @@ beginfig(1); inclinangle = 15; sunposition = (-7,15,4); colorfactor = 1.3; - bboxmargin := 6mm; + bboxmargin := 10mm; planetcolor = colorfactor*(255,152,55)/255; ringcolor = colorfactor*(221,57,199)/255; toptextcolor = colorfactor*(187,164,109)/255; @@ -91,19 +93,36 @@ beginfig(1); z12= z4+down*bboxmargin; z13= 0.5[z5,z12]+down*3*bboxmargin; hdtv = z5..z6---z7..z8---z9..z10---z11..z12---cycle; + message "Aspect ratio: " & decimal( (xpart (z7-z10))/(ypart (z8-z5)) ); + numeric wid; + wid = (xpart (z7-z10))/(1mm); + message "Width: " & decimal( wid ) & "mm"; + message "Resolution for MooMiniCard: " & decimal(1.9083*222/wid) & "*100dpi"; + %% I don't know why there is need for the 1.9083 factor... fill hdtv withcolor deepskycolor; draw storepicture; - label(btex \texttt{\LARGE http://tecnumbria.com} etex, z13 ); +% label(btex \texttt{\LARGE http://tecnumbria.com} etex, z13 ); endfig; -beginfig(2); - prologues := 1; - pickup pencircle scaled 5pt; - draw fullplanet; - unfill fullring; - draw fullring; - draw backring; -endfig; +% beginfig(2); +% prologues := 1; +% pickup pencircle scaled 9pt; +% fill hdtv; +% unfill fullplanet; +% draw fullplanet; +% unfill fullring; +% draw fullring; +% unfill backring; +% draw backring; +% endfig; + +% beginfig(3); +% prologues := 1; +% pickup pencircle scaled 0pt; +% draw fullplanet withcolor red; +% draw fullring withcolor green; +% draw backring withcolor blue; +% endfig; verbatimtex \end{document} etex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp b/Master/texmf-dist/doc/metapost/featpost/example/sfearschem.mp index a9f2ea6a344..d9401ae0b17 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/sfearschem.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/sfearschem.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp b/Master/texmf-dist/doc/metapost/featpost/example/sharpraytrace.mp index 120f272f5fe..61a8f75fb56 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/sharpraytrace.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/sharpraytrace.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; f := (5,1.5,4.5); Spread := 60; @@ -99,4 +99,35 @@ beginfig(3); sharpraytrace; endfig; +Spread := 60; +f:=7*(1,0.45,0.95); +PrintStep := 0.25; + +numeric a, b, c; +a = 0.0; +b = 0.6; +c = 2.0; + +V1 := ( 3,-1, a); +V2 := (-3,-1, b); +V3 := (-3,-1, c); +V4 := ( 1, 3, a); +V5 := ( 1,-3, b); +V6 := ( 1,-3, c); +V7 := (-3, 1, a); +V8 := ( 3, 1, b); +V9 := ( 3, 1, c); +V10:= (-1,-3, a); +V11:= (-1, 3, b); +V12:= (-1, 3, c); +makeface1(1,2,3); +makeface2(4,5,6); +makeface3(7,8,9); +makeface4(10,11,12); + +beginfig(4); + pickup pencircle scaled 2pt; + sharpraytrace; +endfig; + end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp b/Master/texmf-dist/doc/metapost/featpost/example/signalvertexSD.mp index dfc5eb3f501..bbf8cb3ecbd 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/signalvertexSD.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/signalvertexSD.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; % Draw a torus with NP dots, a section of 3.14*RS^2 % and a total diameter of 2*(RB+RS). The dots are placed diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp b/Master/texmf-dist/doc/metapost/featpost/example/simplecar.mp index 48224c4fc11..e237e1879ab 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecar.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/simplecar.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; %f := 0.25*(2,2.15,15.3); f := (2,0.15,1.1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/simplecarparam.mp b/Master/texmf-dist/doc/metapost/featpost/example/simplecarparam.mp new file mode 100644 index 00000000000..55b92fa0081 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/simplecarparam.mp @@ -0,0 +1,70 @@ +% simplecarparam.mp +% L. Nobre G. +% 2011 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\begin{document} +etex + +%f := 0.25*(2,2.15,15.3); +f := (3.5,8,1.1); +Spread := 220; + +beginfig(1); + color lencol, froncol, rearcol; + color a, b, c, d, ca, cb, cc, cd; + numeric lx, ly, lz, fx, fy, fz, hei; + lx = 0.8; + ly = 0.35; + lz = 0.18; + fx = 0.1; + fy = 0.2; + fz = 0.132; + hei = 0.035; + lencol = (lx, ly, lz); + show lencol; + froncol = (fx, fy, fz); + show froncol; + rearcol = (0.6*fx, 0.3*fy, 0.76*fz ); + show rearcol; + a = (0.5*lx,0.5*ly,-0.5*lz); + b = (0.5*lx-fx,0.5*ly,-0.5*lz); + c = (0.5*lx-fx,0.5*ly+fy,-0.5*lz); + d = (0.5*lx-fx-fz,0.5*ly+fy,-0.5*lz); + ca= 0.5*(lx,ly,-lz); + cb= 0.5*(lx,-ly,-lz); + cc= 0.5*(-lx,ly,-lz); + cd= 0.5*(-lx,-ly,-lz); + drawoptions( withpen pencircle scaled 1.7pt withcolor 0.65blue ); + simplecar( black, black, lencol, froncol, rearcol ); + drawoptions( withpen pencircle scaled 1.3pt ); + draw rp(cd)--rp(cb) dashed evenly; + draw rp(cd)--rp(cc) dashed evenly; + draw rp(cd)--rp(-ca) dashed evenly; + draw rp(ca)--rp(-ca) dashed evenly; + draw rp(cb)--rp(-cb) dashed evenly; + draw rp(cc)--rp(-cc) dashed evenly; + draw rp(cd)--rp(-cd) dashed evenly; + drawdblarrow rp(a)--rp(b); + drawdblarrow rp(b)--rp(c); + drawdblarrow rp(c)--rp(d); + label.top( btex $\vec{o}$ etex, rp(black)); + drawoptions( withcolor 0.87red ); + labelinspace( true, 0.3[a,b], -red, hei*blue, btex Xf etex ); + labelinspace( true, 0.3[b,c], green, hei*blue, btex Yf etex ); + labelinspace( true, 0.3[c,d], -red, hei*blue, btex Zf etex ); +endfig; + +verbatimtex +\end{document} +etex + +end; + + + + + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/simplexperiment.mp b/Master/texmf-dist/doc/metapost/featpost/example/simplexperiment.mp new file mode 100644 index 00000000000..2d75752bbed --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/simplexperiment.mp @@ -0,0 +1,72 @@ +% simplexperiment.mp +% L. Nobre G. +% 2007 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{palatino} +\usepackage{mathpazo} +\begin{document} +etex + +beginfig(1); + Spread := 45; + numeric barh, barl, bart, bardist, bardept, sphr, numlats, i, ie, is; + numeric cicon, alpha, fhd, conr, conh, linel; + color centerb, linpa, linpb, linpc; + path tmp, lina, cicloi; + pen thin, thick, aver; + sphr = 1; + conr = 0.3; + barh = 1; + barl = 7; + bart = 0.2; + numlats = 2; + linel = 5; + ie = 630; + is = 5; + alpha = 40; + fhd = 9; + f := 3*(fhd*cosd(alpha)-sphr*sind(alpha),fhd*sind(alpha)+sphr*cosd(alpha),2); + bardist = sphr*sind(90/numlats); + bardept = sphr*cosd(90/numlats); + conh = barh+bardept-sphr; + cicon = bardept*3.14159/180.0; + thin = pencircle scaled 0.5pt; + thick= pencircle scaled 1.5pt; + aver = pencircle scaled 1.0pt; + ahlength:=2mm; + ahangle:=30; +% kindofcube( WithDash, IsVertex, RefP, AngA, AngB, AngC, LenA, LenB, LenC ) + kindofcube(false,true,(-bardist-bart,0,-bardept),0,0,180,bart,barl,barh ); +% tropicalglobe( expr NumLats, TheCenter, Radius, AngulMom ); + tropicalglobe( numlats, black, sphr, red ); + cicloi = rp((0,0,sphr)) for i=is step is until ie: + ..rp((0,-sphr*sind(i)-cicon*i,sphr*cosd(i))) endfor; + draw cicloi; + kindofcube( false, true, (bardist,0,-bardept), 0,0,180, bart, barl, barh ); + centerb = 2*sphr*(-sind(alpha),cosd(alpha),0); + linpb = -blue*(bardept+barh); + linpa = linpb+green*linel; + linpc = linpb+linel*(green*cosd(alpha)-red*sind(alpha)); + draw rp(linpa)--rp(linpb)--rp(linpc); + angline( linpa, linpc, linpb, 0.7*linel, btex $\alpha$ etex scaled 3)(rt); + verygoodcone(false,centerb-(sphr+conh)*blue,blue,conr,centerb-sphr*blue); + tmp = rigorousfearpath( centerb, sphr ); + unfill tmp; + draw tmp; + drawoptions( dashed evenly ); + draw goodcirclepath( black, blue, sphr ); + draw goodcirclepath( centerb, blue, sphr ); + + + +endfig; + +verbatimtex +\end{document} +etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/slingshot.mp b/Master/texmf-dist/doc/metapost/featpost/example/slingshot.mp new file mode 100644 index 00000000000..b8c26d9af5d --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/slingshot.mp @@ -0,0 +1,87 @@ +% slingshot.mp +% L. Nobre G. +% 2008 + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +%prologues := 0; + +% verbatimtex +% \documentclass{article} +% \usepackage{beton,concmath,ccfonts} +% \begin{document} +% etex + +f := (30,0,0); +Spread := 100; +MaxFearLimit := 50; + +numeric initdist, timestep, Gfactor, vplanet, vprobe; +numeric targetangle, cutlinangle; +inidist = 10; +timestep = 0.1; +Gfactor = 7; +vplanet = 1.3; +vprobe = 1.2; +numeric numsteps, cutlinelen, distfraction, numtries, diststep, i, ip; +numeric a, aa, ab, ac; +color inipos, inivel, dstp, iter; +path cutlinepath, traject; + +def gravitfield( expr relatposprobe ) = + ( -Gfactor*relatposprobe/((conorm( relatposprobe ))**3) ) +enddef; + +def costfu( expr actang ) = + (((cutlinangle-actang-targetangle)/targetangle)**2) +enddef; + +vardef scalarfu( expr index ) = + traject:=trajectorypath( + numsteps, + inipos+index*dstp, + inivel, + timestep)(gravitfield); + draw traject; + ip := xpart( traject intersectiontimes cutlinepath ); + a := costfu( angle(direction ip of traject) ); + ( a ) +enddef; + +beginfig(1); + targetangle = 50; + cutlinelen = 15; + distfraction = 0.74; + numtries = 36; + numsteps = 135; + diststep = distfraction*inidist/numtries; + dstp = (0,0,diststep); + inipos = (0,0,-inidist); + inivel = (0,-vplanet,vprobe); + cutlinangle = angle( (-vplanet,vprobe) ); + %cartaxes( 1, 1, 1 ); + cutlinepath = rp(black)--rp(cutlinelen*N(inivel)); + draw cutlinepath withcolor red; + drawoptions( withcolor blue ); + for i=0 upto numtries: + show (i,scalarfu( i )); + endfor; + drawoptions(); + iter = (0,0.5*numtries,numtries); + message "--------------------------------------------------------"; + forever: + iter := minimizestep( iter )( scalarfu ); + exitif (Z(iter)-X(iter)<0.5) or (Y(iter)<0.005); + endfor; + draw traject withcolor green withpen (pencircle scaled (2.5mm)) ; + produce_auto_scale; +endfig; + +% verbatimtex +% \end{document} +% etex + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/smC.mp b/Master/texmf-dist/doc/metapost/featpost/example/smC.mp new file mode 100644 index 00000000000..f82b120c17f --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/smC.mp @@ -0,0 +1,153 @@ +% smC.mp +% P. J. Sebastiao + +input featpost3Dplus2D; + +% bash: export TEX=latex +% tcsh: setenv TEX latex + +verbatimtex \documentclass{article} \usepackage{beton} \usepackage{concmath} \usepackage{ccfonts} \begin{document} etex + +beginfig(1); + color orig, axxc, ayyc, azzc; + color field, nalfa, ngamma[], alfacnt, gammacnt, nazy, nax; + path alfa, gamma; + numeric nalfad, theta, radius, gammang, xxsize, yysize, zzsize; + numeric xxpos, yypos, zzpos, fieldpos, deltarad, deltapos; + numeric thetarad, thetapos, nalfapos, ngammapos,veccpos; + numeric etalpharad, etalphapos, alphapos, gammapos; + picture xxlabel, yylabel, zzlabel, fieldlabel, deltalabel, xxcalabel,yycalabel; + picture nalfalabel, ngammalabel, etalphalabel, alphalabel; + picture gammalabel, thetalabel,vecclabel; + + f := (3,4,2); + Spread := 100; + xxsize := 0.8; + xxpos := 6; + yysize := 0.8; + yypos := 6; + zzsize := 1.3; + zzpos := 4; + field := (0.7,0.3,0.3); + fieldpos := 2; + deltarad := 0.45; + deltapos := 3; + nalfad := 1.0; + theta := 25; + thetarad := 0.3; + thetapos := 2; + nalfapos := 7; + gammang := 160; + ngammapos := 7; + etalpharad := 0.4; + etalphapos := 4; + alphapos := 6; + gammapos := 6; + veccpos := 3; + + xxcalabel = btex $x_{\mbox{\protect \scriptsize layer}}$ etex; + yycalabel = btex $y_{\mbox{\protect \scriptsize layer}}$ etex; + xxlabel = btex $x_{\mbox{\protect \scriptsize cone}}$ etex; + yylabel = btex $y_{\mbox{\protect \scriptsize cone}}$ etex; + zzlabel = btex $z_{\mbox{\protect \scriptsize cone}}$ etex; + deltalabel = btex $\Delta$ etex; + fieldlabel = btex $\mathbf{B}$ etex; + thetalabel = btex $\theta$ etex; + nalfalabel = btex $\mathbf{n}_\alpha$ etex; + ngammalabel = btex $\mathbf{n}_\gamma$ etex; + etalphalabel= btex $\eta_\alpha$ etex; + alphalabel = btex $\alpha$ etex; + gammalabel = btex $\gamma$ etex; + vecclabel = btex $\mathbf{c}$ etex; + orig = (0,0,0); + axxc = (xxsize,0,0); + ayyc = (0,yysize,0); + azzc = (0,0,zzsize); + nalfa = (0,sind(theta),cosd(theta)); + alfacnt = (0,0,nalfad*cosd(theta)); + radius = nalfad*sind(theta); + alfa = rigorouscircle( alfacnt, (0,0,1), radius ); + gammacnt = cosd(theta)*cosd(theta)*nalfa; + radius := cosd(theta)*sind(theta); + gamma = rigorouscircle( gammacnt, nalfa, radius ); + + for i=0 step 40 until 0: + nazy := radius*sind(gammang+i)*ncrossprod( nalfa, axxc ); + nax := radius*cosd(gammang+i)*ncrossprod( ayyc, nalfa ); + ngamma[i] := gammacnt+nax+nazy; + drawarrow rp(orig)..rp(ngamma[i]); + endfor; + + draw alfa dashed evenly; + + drawarrow rp(orig)..rp(axxc); + drawarrow rp(orig)..rp(ayyc); + drawarrow rp(orig)..rp(azzc); + drawarrow rp(orig)..rp(field); + drawarrow rp(orig)..rp(nalfa); +% draw subpath (3.05,1.05) of alfa; +% drawarrow subpath (4,3) of alfa; +% draw subpath (0,1.3) of gamma; +% draw subpath (7.5,8) of gamma; +% drawarrow subpath (1,2) of gamma; + anglinen( field, azzc, orig, deltarad, deltalabel, deltapos ); + anglinen( azzc, nalfa, orig, thetarad, thetalabel, thetapos ); + anglinen( ngamma0, field, orig, etalpharad, etalphalabel, etalphapos ); + labeln( xxlabel, rp(axxc), xxpos ); + labeln( yylabel, rp(ayyc), yypos ); + labeln( zzlabel, rp(azzc), zzpos ); + labeln( fieldlabel, rp(field), fieldpos ); + labeln( nalfalabel, rp(nalfa), nalfapos ); + labeln( ngammalabel, rp(ngamma0), ngammapos ); + labeln( alphalabel, point 1.8 of alfa, alphapos ); + labeln( gammalabel, point 8 of gamma, gammapos ); + labeln( yycalabel, rp(gammacnt+1.3*radius*(-1,0,0)), 0); + labeln( xxcalabel, rp(gammacnt+1.3*radius*(0,1,-sind(theta))), 0); + pickup pencircle scaled 1.5; + draw rp(alfacnt); + draw rp(gammacnt); + pickup pencircle scaled 0.5; + + path arco, recta_um, recta_dois, recta_xlayer, path_ngamma; + pickup pencircle scaled 0.5; + recta_um = rp(alfacnt)--rp(alfacnt+1.11*radius*(1,0,0)); + recta_dois = rp(alfacnt)--rp(alfacnt+1.11*radius*(0,1,0)); + draw recta_um; + draw recta_dois; + + pickup pencircle scaled 1; + arco = (alfa cutbefore recta_dois) cutafter recta_um; + draw arco; + + + pickup pencircle scaled 0.5; + drawarrow rp(gammacnt)--rp(gammacnt+1.3*radius*(-1,0,0)); + + path_ngamma = rp(gammacnt)--rp(ngamma0)--rp((0,0,0)); + draw path_ngamma; +%%% c vector + drawarrow rp(gammacnt)--rp(ngamma0); + + recta_xlayer = rp(gammacnt)--rp(gammacnt+1.3*radius*(0,1,-sind(theta))); + drawarrow recta_xlayer; + + pickup pencircle scaled 1; + + arco := (gamma cutbefore recta_xlayer) cutafter path_ngamma; + draw gamma; + undraw arco; + + pickup pencircle scaled 0.5; + draw gamma dashed evenly; + + +% draw subpath (0,0.9) of gamma; +% draw subpath (7.6,8) of gamma; +% draw subpath (1.5,8) of gamma; + draw subpath (3.2,1.2) of alfa; + labeln( vecclabel, rp(ngamma0), veccpos); +endfig; + +verbatimtex \end{document} etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp b/Master/texmf-dist/doc/metapost/featpost/example/spatialhalfsfear.mp index d80e3e3f5a6..00890f62bed 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/spatialhalfsfear.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/spatialhalfsfear.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + f := (3,-0.2,3); beginfig(1); spatialhalfsfear( black, blue, 1 ); @@ -12,4 +14,4 @@ beginfig(1); drawoptions( withpen pencircle scaled 3pt withcolor green ); spatialhalfsfear( black, green, 0.7 ); endfig; -end.
\ No newline at end of file +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp b/Master/texmf-dist/doc/metapost/featpost/example/spherample.mp index 39352e6ba02..b1f3bd45400 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/spherample.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/spherample.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; SphericalDistortion := true; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/splineperspective.mp b/Master/texmf-dist/doc/metapost/featpost/example/splineperspective.mp new file mode 100644 index 00000000000..c65cd5b2ce4 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/splineperspective.mp @@ -0,0 +1,550 @@ +% splineperspective.mp +% L. Nobre G. and Troy Henderson +% 2007 + +input featpost3Dplus2D; + +prologues := 1; + +% Evaluate a cubic polynomial of the "standard" Bezier form at t +vardef evalbezier(expr p,t) = + save _a,_b,_c,_d; + numeric _a,_b,_c,_d; + _a:=(1-t)**3; + _b:=3*((1-t)**2)*t; + _c:=3*(1-t)*(t**2); + _d:=t**3; + (point 0 of p)*_a + (postcontrol 0 of p)*_b + (precontrol 1 of p)*_c + + (point 1 of p)*_d +enddef; + +% Evaluate the derivative of a cubic polynomial of the "standard" +% Bezier form at t +vardef evalbezierderivative(expr p,t) = + save _a,_b,_c; + pair _a,_b,_c; + _a:=3*((point 1 of p) - 3*(precontrol 1 of p) + 3*(postcontrol 0 of p) + -(point 0 of p)); + _b:=6*((precontrol 1 of p) - 2*(postcontrol 0 of p) + (point 0 of p)); + _c:=3*((postcontrol 0 of p) - (point 0 of p)); + _a*(t**2) + _b*t + _c +enddef; + +% Evaluate a rational function of the "standard" cubic NURBS form at t +vardef evalnurbs(expr p,w,t) = + save _q,_r; + path _q,_r; + _q:=((cyanpart w)*(point 0 of p)).. + controls ((magentapart w)*(postcontrol 0 of p)) + and ((yellowpart w)*(precontrol 1 of p)) .. ((blackpart w)*(point 1 of p)); + _r:=(cyanpart w,0) .. + controls (magentapart w,0) and (yellowpart w,0) .. (blackpart w,0); + evalbezier(_q,t)/(xpart evalbezier(_r,t)) +enddef; + +% Evaluate the derivative of a rational function of the "standard" +% cubic NURBS form at t +vardef evalnurbsderivative(expr p,w,t) = + save _a,_b,_c,_d,_q,_r; + pair _a,_b; + numeric _c,_d; + path _q,_r; + _q:=((cyanpart w)*(point 0 of p)) .. + controls ((magentapart w)*(postcontrol 0 of p)) + and ((yellowpart w)*(precontrol 1 of p)) .. ((blackpart w)*(point 1 of p)); + _r:=(cyanpart w,0) .. + controls (magentapart w,0) and (yellowpart w,0) .. (blackpart w,0); + _a:=evalbezier(_q,t); + _b:=evalbezierderivative(_q,t); + _c:=xpart evalbezier(_r,t); + _d:=xpart evalbezierderivative(_r,t); + (_b*_c-_a*_d)/(_c**2) +enddef; + +% Fit a cubic polynomial of the "standard" Bezier form to a +% rational function of the +% "standard" cubic NURBS form with function and derivative agreement +% at tmin and tmax +vardef nurbstobezier(expr p,w,tmin,tmax) = + save _a,_b,_c,_d,_e; + pair _a,_b,_c,_d; + numeric _e; + _e:=(tmax-tmin)/3; + _a:=evalnurbs(p,w,tmin); + _b:=_a + _e*evalnurbsderivative(p,w,tmin); + _d:=evalnurbs(p,w,tmax); + _c:=_d - _e*evalnurbsderivative(p,w,tmax); + _a .. controls _b and _c .. _d +enddef; + +% Reparameterize a cubic polynomial of the "standard" Bezier form by mapping +% the interval [tmin,tmax] to [0,1] +vardef beziertobezier(expr p,tmin,tmax) = + nurbstobezier(p,(1,1,1,1),tmin,tmax) +enddef; + +% Evalute the L^2[0,1] norm of a cubic polynomial of the "standard" +% Bezier form +vardef beziernorm(expr p) = + save _a,_b,_c,_d,_i,_xabs,_yabs,_A,_B,_C,_D,_I; + numeric _a,_b,_c,_d,_i,_xabs,_yabs,_A,_B,_C,_D,_I; + _xabs:=max( + abs(xpart point 0 of p), + abs(xpart postcontrol 0 of p), + abs(xpart precontrol 1 of p), + abs(xpart point 1 of p)); + _yabs:=max( + abs(ypart point 0 of p), + abs(ypart postcontrol 0 of p), + abs(ypart precontrol 1 of p), + abs(ypart point 1 of p)); + if (_xabs > 0): + _a:=xpart((point 1 of p) - 3*(precontrol 1 of p) + + 3*(postcontrol 0 of p) - (point 0 of p))/_xabs; + _b:=3*xpart((precontrol 1 of p) - 2*(postcontrol 0 of p) + + (point 0 of p))/_xabs; + _c:=3*xpart((postcontrol 0 of p) - (point 0 of p))/_xabs; + _d:=xpart(point 0 of p)/_xabs; + _i:=(_a**2)/7 + ((_b)**2 + 2*_a*_c)/5 + (_a*_b + 2*_b*_d + (_c**2))/3 + (_a*_d + _b*_c)/2 + (_c*_d + (_d**2)); + else: + _i:=0; + fi; + if (_yabs > 0): + _A:=ypart((point 1 of p) - 3*(precontrol 1 of p) + + 3*(postcontrol 0 of p) - (point 0 of p))/_yabs; + _B:=3*ypart((precontrol 1 of p) - 2*(postcontrol 0 of p) + + (point 0 of p))/_yabs; + _C:=3*ypart((postcontrol 0 of p) - (point 0 of p))/_yabs; + _D:=ypart(point 0 of p)/_yabs; + _I:=(_A**2)/7 + ((_B)**2 + 2*_A*_C)/5 + + (_A*_B + 2*_B*_D + (_C**2))/3 + (_A*_D + _B*_C)/2 + (_C*_D + (_D**2)); + else: + _I:=0; + fi; + (_xabs*sqrt(_i)) ++ (_yabs*sqrt(_I)) +enddef; + +% Fit a cubic Bezier spline to a rational function of the "standard" +% cubic NURBS form by iteratively refining the Bezier curve. +% p is a 4 point path containing the 4 cubic NURBS (2D) control points +% w is a cmykcolor containing the 4 cubic NURBS weights +% EPS is the tolerance to stop refining each branch of the Bezier spline +vardef fitnurbswithbezier(expr p,w,EPS) = + save _a,_b,_c,_e,_error,_k,_q; + numeric _a,_b,_c,_error,_k; + path _q,_q[],_e; + _a:=0; + _b:=1; + _k:=1/sqrt(2); + _q:=(point 0 of p); + _q[4]:=nurbstobezier(p,w,_a,_b); + forever: + exitunless(_a<1); + _q[1]:=_q[4]; + _c:=_b-_k*((_b-_a)**2); + _q[2]:=beziertobezier(_q[1],_a,_c); + _q[3]:=nurbstobezier(p,w,_a,_c); + _q[4]:=_q[3]; + _e:=((point 0 of _q[2])-(point 0 of _q[3])) .. + controls ((postcontrol 0 of _q[2])-(postcontrol 0 of _q[3])) + and ((precontrol 1 of _q[2])-(precontrol 1 of _q[3])) .. + ((point 1 of _q[2])-(point 1 of _q[3])); + _error:=beziernorm(_e)/beziernorm(_q[3]); +% show _error; + if (_error > EPS): + _b:=_c; + else: + _q[2]:=beziertobezier(_q[1],_c,_b); + _q[3]:=nurbstobezier(p,w,_c,_b); + _e:=((point 0 of _q[2])-(point 0 of _q[3])) .. + controls ((postcontrol 0 of _q[2])-(postcontrol 0 of _q[3])) + and ((precontrol 1 of _q[2])-(precontrol 1 of _q[3])) .. + ((point 1 of _q[2])-(point 1 of _q[3])); + _error:=beziernorm(_e)/beziernorm(_q[3]); + if (_error > EPS): + _q:=_q .. controls (postcontrol 0 of _q[4]) + and (precontrol 1 of _q[4]) .. (point 1 of _q[4]); + _a:=_c; + _q[4]:=_q[3]; + else: + _q:=_q .. controls (postcontrol 0 of _q[1]) + and (precontrol 1 of _q[1]) .. (point 1 of _q[1]); + _a:=_b; + _q[4]:=nurbstobezier(p,w,_a,1); + fi; + _b:=1; + fi; + endfor; + _q +enddef; + +% This macro is used to provide a path to draw the NURBS +% It returns a path of length N passing through N+1 equally spaced +% (in time) points along the NURBS connected by line segments +vardef samplednurbs(expr p,w,N) = + save _a,_b,_c,_d,_n,_t,_q; + numeric _a,_b,_c,_d,_n,_t; + path _q; + _q:=(point 0 of p); + for _n=1 upto N: + _t:=_n/N; + _a:=(cyanpart w)*((1-_t)**3); + _b:=3*(magentapart w)*((1-_t)**2)*_t; + _c:=3*(yellowpart w)*(1-_t)*(_t**2); + _d:=(blackpart w)*(_t**3); + _q:=_q .. ((_a*(point 0 of p)+_b*(postcontrol 0 of p) + +_c*(precontrol 1 of p)+_d*(point 1 of p))/(_a+_b+_c+_d)); + endfor; + ( _q ) +enddef; + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Here's where the fun begins % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +beginfig(4); +% p contains the 4 control points of the rational function of the +% "standard" cubic NURBS form + path p; + p:=(297.63725,297.63725) .. controls (132.98871,286.67885) and (180.62535,152.16249) .. (429.54399,226.31157); + +% w contains the 4 weights for the rational function of the +% "standard" cubic NURBS form + cmykcolor w; + w:=(2.15756,1.6709,0.8598,1.34647); + +% EPS represents the minimum "acceptable error" to stop refining any +% given branch of the Bezier + Err:=0.040; + +% q represents the Bezier spline fit to the rational function of the +% "standard" cubic NURBS form + path q; + q:=fitnurbswithbezier(p,w,Err); +% q:=fitnurbswithbezier(reverse p,(blackpart w,yellowpart w,magentapart w,cyanpart w),Err); + +% draw the NURBS by sampling it at many points and connecting the +% samples via line segments + draw samplednurbs(p,w,20) withcolor red withpen pencircle scaled 2bp; + +% draw the Bezier spline and its knots + draw q; + for n=0 upto length q: + draw fullcircle scaled 2 shifted point n of q withcolor blue; + endfor; +endfig; + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +def casteljau( expr Za, Zb, Zc, Zd, Pt ) = %%%%%%%%%%%%%%%%%%% 2D or 3D + begingroup + save A, B, C, D; + numeric A, B, C, D; + A = (1-Pt)**3; + B = 3*((1-Pt)**2)*Pt; + C = 3*(1-Pt)*(Pt**2); + D = Pt**3; + ( (A*Za+B*Zb+C*Zc+D*Zd) ) + endgroup +enddef; + +def twothr( expr Z ) = ( xpart Z, ypart Z, 0 ) enddef; + +def twotwo( expr Z ) = rp( twothr( Z ) ) enddef; + +def xoy( expr Z ) = rp( ( X(Z), Y(Z), 0 ) ) enddef; + +def yoz( expr W ) = rp( ( 0, Y(W), Z(W) ) ) enddef; + +def xoz( expr W ) = rp( ( X(W), 0, Z(W) ) ) enddef; + +f := 0.35*(3,5,2); +Spread := 160; + +def nextthirty( expr Za, Zb, Zc, Zd, Pt ) = %%% input 3D and return 2D + begingroup + save A, B, C, D, Tot, P; + numeric A, B, C, D, Tot; + color P; + P = N( f - viewcentr ); + A = ((1-Pt)**3)*cdotprod( P, f-Za ); + B = 3*((1-Pt)**2)*Pt*cdotprod( P, f-Zb ); + C = 3*(1-Pt)*(Pt**2)*cdotprod( P, f-Zc ); + D = (Pt**3)*cdotprod( P, f-Zd ); + Tot = A+B+C+D; + ( (A*rp(Za)+B*rp(Zb)+C*rp(Zc)+D*rp(Zd))/Tot ) + endgroup +enddef; + +vardef nurbstobezierold (expr p,w) = + save _a,_b,_c,_d,_j,_n,_r,_s,_t,_A,_B,_Aold,_Bold,_C,_D,_EPS,_J,_N; + _EPS:=0.00001; + _J:=10; + + _Aold:=0; + _Bold:=0; + _A:=1; + _B:=1; + _s:=((_A-_Aold)++(_B-_Bold))/(_A++_B); + _j:=1; _r:=0; + forever: + exitunless((_s>_EPS) and (_j<_J)); + _j:=_j+1; + _N:=2**_j; + _Aold:=_A; + _Bold:=_B; + _D:=_N+1/_N-21/_N/_N/_N-1/_N/_N/_N/_N/_N+20/_N/_N/_N/_N/_N/_N/_N; + _C:=120*(2+2/_N/_N-5/_N/_N/_N/_N)/_D; + _D:=60*(3+3/_N/_N+10/_N/_N/_N/_N)/_D; + _c:=5/_N/_N/_N/_N; + _a:=2+2/_N/_N-_c; + _b:=2-3/_N/_N+_c; + _c:=1+6/_N/_N+_c; + _A:=(-2*(cyanpart p)*_a+(blackpart p)*_b)/_c; + _B:=((cyanpart p)*_b-2*(blackpart p)*_a)/_c; + for _n=0 upto _N: + _t:=_n/_N; + _a:=(1-_t)**3; + _b:=((1-_t)**2)*_t; + _c:=(1-_t)*(_t**2); + _d:=_t**3; + _r:=((cyanpart w)*(cyanpart p)*_a + 3*(magentapart + w)*(magentapart p)*_b + 3*(yellowpart w)*(yellowpart p)*_c + + (blackpart w)*(blackpart p)*_d)/((cyanpart w)*_a + 3*(magentapart + w)*_b + 3*(yellowpart w)*_c + (blackpart w)*_d); + _A:=_A+(_C*_b-_D*_c)*_r; + _B:=_B+(_C*_c-_D*_b)*_r; + endfor; + _s:=((_A-_Aold)++(_B-_Bold))/(_A++_B); + endfor; + (_A,_B)/3 +enddef; + +def nurbsapprox( expr Pa, Pb, Pc, Pd ) = + begingroup + color Pn; + numeric wa, wb, wc, wd; + path returnpath; + pair xpair, ypair, ba, bb, bc, bd; + cmykcolor xcontrols, ycontrols; + Pn = N( f - viewcentr ); + wa = cdotprod( Pn, f-Pa ); + wb = cdotprod( Pn, f-Pb ); + wc = cdotprod( Pn, f-Pc ); + wd = cdotprod( Pn, f-Pd ); + xcontrols = (xpart rp(Pa),xpart rp(Pb),xpart rp(Pc),xpart rp(Pd)); + ycontrols = (ypart rp(Pa),ypart rp(Pb),ypart rp(Pc),ypart rp(Pd)); + xpair = nurbstobezierold( xcontrols, (wa,wb,wc,wd) ); + ypair = nurbstobezierold( ycontrols, (wa,wb,wc,wd) ); + ba = rp( Pa ); + bb = (xpart xpair, xpart ypair); + bc = (ypart xpair, ypart ypair); + bd = rp( Pd ); + %show ba; + %show bb; + %show bc; + %show bd; + %show wa; + %show wb; + %show wc; + %show wd; + returnpath = ba..controls bb and bc..bd; + (returnpath) + endgroup +enddef; + +def fitthreednurbswithtwodbezier( expr pa, pb, pc, pd, EPS ) = + begingroup + save _a,_b,_c,_e,_error,_k,_q,w,wa,wb,wc,wd,pn,za, zb, zc, zd; + numeric _a,_b,_c,_error,_k,wa,wb,wc,wd; + path p,_q,_q[],_e; + color pn; + pair za, zb, zc, zd; + cmykcolor w; + za = rp(pa); show za; + zb = rp(pb); show zb; + zc = rp(pc); show zc; + zd = rp(pd); show zd; + p = za .. controls zb and zc .. zd; + pn = N( f - viewcentr ); + wa = cdotprod( pn, f-pa ); show wa; + wb = cdotprod( pn, f-pb ); show wb; + wc = cdotprod( pn, f-pc ); show wc; + wd = cdotprod( pn, f-pd ); show wd; + w = ( wa, wb, wc, wd ); + _a:=0; + _b:=1; + _k:=1/sqrt(2); + _q:=(point 0 of p); + _q[4]:=nurbstobezier(p,w,_a,_b); + forever: + exitunless(_a<1); + _q[1]:=_q[4]; + _c:=_b-_k*((_b-_a)**2); + _q[2]:=beziertobezier(_q[1],_a,_c); + _q[3]:=nurbstobezier(p,w,_a,_c); + _q[4]:=_q[3]; + _e:=((point 0 of _q[2])-(point 0 of _q[3])) .. + controls ((postcontrol 0 of _q[2])-(postcontrol 0 of _q[3])) + and ((precontrol 1 of _q[2])-(precontrol 1 of _q[3])) .. + ((point 1 of _q[2])-(point 1 of _q[3])); + _error:=beziernorm(_e)/beziernorm(_q[3]); + if (_error > EPS): + _b:=_c; + else: + _q[2]:=beziertobezier(_q[1],_c,_b); + _q[3]:=nurbstobezier(p,w,_c,_b); + _e:=((point 0 of _q[2])-(point 0 of _q[3])) .. + controls ((postcontrol 0 of _q[2])-(postcontrol 0 of _q[3])) + and ((precontrol 1 of _q[2])-(precontrol 1 of _q[3])) .. + ((point 1 of _q[2])-(point 1 of _q[3])); + _error:=beziernorm(_e)/beziernorm(_q[3]); + if (_error > EPS): + _q:=_q .. controls (postcontrol 0 of _q[4]) + and (precontrol 1 of _q[4]) .. (point 1 of _q[4]); + _a:=_c; + _q[4]:=_q[3]; + else: + _q:=_q .. controls (postcontrol 0 of _q[1]) + and (precontrol 1 of _q[1]) .. (point 1 of _q[1]); + _a:=_b; + _q[4]:=nurbstobezier(p,w,_a,1); + fi; + _b:=1; + fi; + endfor; + ( _q ) + endgroup +enddef; + +beginfig(1); + numeric tu, num, i, fac; + pen pencontrol, penspline, penalytic; + color colcontrol, colspline, colorytic, colormark; + color w[]; + pencontrol = pencircle scaled 4pt; + penspline = pencircle scaled 2pt; + penalytic = pencircle scaled 1pt; + colcontrol = black; + colspline = red; + colorytic = blue+green; + colormark = (0.8,0.8,0.1); + tu = 6cm; + num = 50; + fac = 1.2; + transform T; + T = identity scaled tu; + z21 = origin; + z22 = (1,0); + z23 = (1,1); + z24 = (0,1); + z1 = z21 transformed T; + z2 = z22 transformed T; + z3 = z23 transformed T; + z4 = z24 transformed T; + z6 = (fac,0) transformed T; + z8 = (0,fac) transformed T; + drawarrow z1--z6; + drawarrow z1--z8; + label.lrt( "x", z6 ); + label.ulft( "y", z8 ); + dotlabels.urt(1,2,3,4); + z11 = twotwo( z21 ); + z12 = twotwo( z22 ); + z13 = twotwo( z23 ); + z14 = twotwo( z24 ); + w1 = twothr( z21 ); + w2 = twothr( z22 ); + w3 = twothr( z23 ); + w4 = twothr( z24 ); + cartaxes( fac, fac, 0.3*fac ); + draw z12--z13--z14 dashed evenly; + draw z2--z3--z4 dashed evenly; + % 1) Next line: MetaPost intrinsic path. + draw z1..controls z2 and z3..z4 withpen penspline withcolor colspline; + % 2) Next line: my implementation of the MetaPost intrinsic path. + draw z1 for i=1 upto num: ..casteljau(z1,z2,z3,z4,i/num) endfor + withpen penalytic withcolor colorytic; + % 5) Next line: hopefully, how it should be done. Yeah! Way to go! + draw z11 for i=1 upto num: ..nextthirty(w1,w2,w3,w4,i/num) endfor + withpen pencontrol withcolor colcontrol; + % 4) Next line: MetaPost intrinsic path of perspectived control points. + draw z11..controls z12 and z13..z14 + withpen penspline withcolor colspline; + % 3) Next line: what should be drawn in perspective. + draw z11 for i=1 upto num: ..rp(casteljau(w1,w2,w3,w4,i/num)) endfor + withpen penalytic withcolor colorytic; + % 6) Next line: Troy's approximation + draw nurbsapprox(w1,w2,w3,w4) withcolor colormark; + + +endfig; + +f := 1.05*(3,5,2); +Spread := 160; + +beginfig(2); + color w[]; + w1 = (1,0,0); + w2 = (0,0,1); + w3 = (0,1,0); + w4 = (1,1,1); + w5 = (1,1,0); + w6 = (1,0,1); + w7 = (0,1,1); + cartaxes( fac, fac, fac ); + draw rp(w1)--rp(w2)--rp(w3)--rp(w4)--rp(w5)--rp(w1)--rp(w6)-- + rp(w2)--rp(w7)--rp(w3)--rp(w5) dashed withdots; + draw rp(w6)--rp(w4)--rp(w7) dashed withdots; + draw xoy(w1) for i=1 upto num: + ..xoy(casteljau(w1,w3,black,w5,i/num)) + endfor withcolor colormark; + draw xoy(w1) for i=1 upto num: ..xoy(casteljau(w1,w2,w3,w4,i/num)) endfor; + draw xoz(w1) for i=1 upto num: ..xoz(casteljau(w1,w2,w3,w4,i/num)) endfor; + draw rp(w1) for i=1 upto num: ..nextthirty(w1,w2,w3,w4,i/num) endfor + withpen pencontrol withcolor colcontrol; + draw rp(w1) for i=1 upto num: ..rp(casteljau(w1,w2,w3,w4,i/num)) endfor + withpen penalytic withcolor colorytic; + draw nextthirty(w1,w2,w3,w4,0.5) withpen pencontrol withcolor red; +endfig; + +beginfig(5); + color w[]; + for i=1 upto 4: + w[i]=(uniformdeviate(1),uniformdeviate(1),uniformdeviate(1)); + draw rp(w[i]) withpen pencontrol; + draw xoy(w[i]) withpen penspline; + draw xoz(w[i]) withpen penspline; + draw yoz(w[i]) withpen penspline; + endfor; + cartaxes( fac, fac, fac ); + draw rp(w1)--rp(w2)--rp(w3)--rp(w4) withpen penspline dashed evenly; + draw xoy(w1)--xoy(w2)--xoy(w3)--xoy(w4) withpen penalytic dashed evenly; + draw xoz(w1)--xoz(w2)--xoz(w3)--xoz(w4) withpen penalytic dashed evenly; + draw yoz(w1)--yoz(w2)--yoz(w3)--yoz(w4) withpen penalytic dashed evenly; + draw xoy(w1) for i=1 upto num: ..xoy(casteljau(w1,w2,w3,w4,i/num)) endfor; + draw xoz(w1) for i=1 upto num: ..xoz(casteljau(w1,w2,w3,w4,i/num)) endfor; + draw yoz(w1) for i=1 upto num: ..yoz(casteljau(w1,w2,w3,w4,i/num)) endfor; + draw rp(w1) for i=1 upto num: ..nextthirty(w1,w2,w3,w4,i/num) endfor + withpen pencontrol withcolor colcontrol; + draw fitthreednurbswithtwodbezier(w1,w2,w3,w4,0.005) + withpen penalytic withcolor red; +endfig; + +beginfig(3); + path xyp, xzp; + xyp = origin..tension 2 and 0.75..right...(right+up+right+up); + xzp = origin..tension 2 and 0.75..(right+up)...(right+up+right); + z1 = postcontrol 0 of xyp; + z2 = postcontrol 0 of xzp; + z3 = precontrol 1 of xyp; + z4 = precontrol 1 of xzp; +% show (xpart z1); +% show (xpart z2); +% show (xpart z3); +% show (xpart z4); + draw xyp; + draw xzp; +endfig; + +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp b/Master/texmf-dist/doc/metapost/featpost/example/spltwiben.mp index 5c85736f7bc..4f24df9a24d 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/spltwiben.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/spltwiben.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp b/Master/texmf-dist/doc/metapost/featpost/example/squareanglines.mp index 769f2af8721..37df82e02a4 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/squareanglines.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/squareanglines.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); cartaxes(1,1,1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp b/Master/texmf-dist/doc/metapost/featpost/example/stageforthree.mp index f0d81f26e60..85a7b0d4265 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/stageforthree.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/stageforthree.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 35; f := (13,7,3.5); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp b/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp deleted file mode 100644 index c98c6bcdd87..00000000000 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp +++ /dev/null @@ -1,56 +0,0 @@ -% simplecarparam.mp -% L. Nobre G. -% IYP (2005) - -%input featpost3Dplus2D; - -verbatimtex -\documentclass{article} -\usepackage{palatino} -\begin{document} -etex - -%f := 0.25*(2,2.15,15.3); -f := (3.5,8,1.1); -Spread := 160; - -beginfig(1); - color refpos, angcol, lencol, froncol, rearcol; - color a, b, c, d; - numeric lx, ly, lz, fx, fy, fz, hei; - lx = 0.8; - ly = 0.35; - lz = 0.18; - fx = 0.1; - fy = 0.2; - fz = 0.132; - hei = 0.05; - refpos = black; - angcol = black; - lencol = (lx, ly, lz); - froncol = (fx, fy, fz); - rearcol = froncol; - a = (0.5*lx,0.5*ly,-0.5*lz); - b = (0.5*lx-fx,0.5*ly,-0.5*lz); - c = (0.5*lx-fx,0.5*ly+fy,-0.5*lz); - d = (0.5*lx-fx-fz,0.5*ly+fy,-0.5*lz); - simplecar( refpos, angcol, lencol, froncol, rearcol ); - drawdblarrow rp(a)--rp(b); - drawdblarrow rp(b)--rp(c); - drawdblarrow rp(c)--rp(d); - drawoptions( withcolor 0.87red ); - labelinspace( true, 0.3[a,b], -red, hei*blue, btex X etex ); - labelinspace( true, 0.3[b,c], green, hei*blue, btex Y etex ); - labelinspace( true, 0.3[c,d], -red, hei*blue, btex Z etex ); -endfig; - -verbatimtex -\end{document} -etex - -end; - - - - - diff --git a/Master/texmf-dist/doc/metapost/featpost/example/steamcamera.mp b/Master/texmf-dist/doc/metapost/featpost/example/steamcamera.mp new file mode 100644 index 00000000000..6fd1d73d47b --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/steamcamera.mp @@ -0,0 +1,58 @@ +% steamcamera.mp +% L. Nobre G. +% 2006 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{palatino,mathpazo} +\begin{document} +etex + +Spread := 50; +f := (3,5,2); + +beginfig(0); + numeric slabthick, camethick, blocthick, blochange; + numeric slabside, cameside, blocside; + color slabpos, camepos, blocpos; + numeric markmargin; + color lowonbloc, lowonmark, lowonextr; + color higonbloc, higonmark, higonextr; + color newlevelcenter; + slabthick = 0.07; + camethick = 0.7; + blocthick = 0.6; + slabside = 1.2; + cameside = 0.9; + blocside = 0.7; + blochange = 0.25; + markmargin = 0.04; + slabpos = black; + camepos = -0.5*(slabthick+camethick)*blue; + blocpos = 0.5*slabthick*blue; + lowonbloc = blocpos+(0,0.5*blocside,blocthick-blochange); + higonbloc = blocpos+(0,0.5*blocside,blocthick); + lowonmark = blocpos+(-0.5*slabside,0.5*blocside,blocthick-blochange); + higonmark = blocpos+(-0.5*slabside,0.5*blocside,blocthick); + lowonextr = lowonmark - markmargin*red; + higonextr = higonmark - markmargin*red; + kindofcube( false, false, camepos, 0, 0, 0, cameside, cameside, camethick ); + kindofcube( false, false, slabpos, 0, 0, 0, slabside, slabside, slabthick ); + rigorousdisc( 0, true, blocpos, 0.5*blocside, blocthick*blue ); + newlevelcenter = (blocthick-blochange+0.5*slabthick)*blue; + draw + spatialhalfcircle( newlevelcenter, blue, 0.5*blocside, true ) + dashed evenly; + draw rp(lowonbloc)--rp(lowonextr); + draw rp(higonbloc)--rp(higonextr); + drawdblarrow rp(lowonmark)--rp(higonmark); + label.rt( btex $\Delta y$ etex, rp(0.5[lowonmark,higonmark]) ); +endfig; + +verbatimtex +\end{document} +etex + +end.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp b/Master/texmf-dist/doc/metapost/featpost/example/tangency2D.mp index 8682c43bc0d..08edd763554 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/tug04/tangency2D.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/tangency2D.mp @@ -2,6 +2,8 @@ % L. Nobre G. % 2004 +input featpost3Dplus2D; + verbatimtex \documentclass{article}\begin{document}{\sffamily etex beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp b/Master/texmf-dist/doc/metapost/featpost/example/tangencypoint.mp index 7c6d8f79601..87bdb22d076 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/tangencypoint.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/tangencypoint.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric u, i; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp b/Master/texmf-dist/doc/metapost/featpost/example/tdarrow.mp index 5ef43d52524..3433679a137 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/tdarrow.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/tdarrow.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric size, num, i, j, coos[]; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/tetrapodes.mp b/Master/texmf-dist/doc/metapost/featpost/example/tetrapodes.mp new file mode 100644 index 00000000000..440c344e00b --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/tetrapodes.mp @@ -0,0 +1,140 @@ +% tetrapodes.mp +% L. Nobre G. +% 2009 + +input featpost3Dplus2D; + +verbatimtex +\documentclass{article} +\usepackage{palatino} +\usepackage{mathpazo} +\begin{document} +etex + +f := (10,2,3); +Spread := 50; + +def rotatearoundZ( expr P, A ) = + ((X(P)*cosd(A)-Y(P)*sind(A),X(P)*sind(A)+Y(P)*cosd(A),Z(P))) +enddef; + +beginfig(1); + numeric margia, margib, margic, raycil, raysph, angul; + color ca, cb; + path sph; + margia = 0.10; + margib = 1.52; + margic = 0.05; + raycil = 0.55; + raysph = 1.00; + angul = 30; + ca := (0,-raysph-margia-raycil,0); + cb := (-raycil-margic,0,raysph+margib); + rigorousdisc(0,true,ca,raycil,cb-ca); + ca := rotatearoundZ((-raysph-margia-raycil,0,0),angul); + cb := rotatearoundZ((0,raycil+margic,-raysph-margib),angul); + rigorousdisc(0,true,ca,raycil,cb-ca); + sph = rigorousfearpath(black,raysph); + unfill sph; + draw sph; + ca := rotatearoundZ((raysph+margia+raycil,0,0),angul); + cb := rotatearoundZ((0,-raycil-margic,-raysph-margib),angul); + rigorousdisc(0,true,ca,raycil,cb-ca); + ca := (0,raysph+margia+raycil,0); + cb := (raycil+margic,0,raysph+margib); + rigorousdisc(0,true,ca,raycil,cb-ca); +endfig; + +beginfig(2); + numeric tro; + tro = 2; + V1 := (tro,0,0); + V2 := (0,tro,0); + V3 := (-tro,0,0); + V4 := (0,-tro,0); + V5 := (1,1,1); + V6 := (-1,1,1); + V7 := (-1,-1,1); + V8 := (1,-1,1); + V9 := (1,1,-1); + V10 := (-1,1,-1); + V11 := (-1,-1,-1); + V12 := (1,-1,-1); + V13 := (0,0,tro); + V14 := (0,0,-tro); + for i=1 upto 14: + V[i] := rotatearoundZ(V[i],45); + V[i] := (0.4*X(V[i]),Y(V[i]),1.5*Z(V[i])); + endfor; + makeface1(1,5,13,8); + makeface2(2,6,13,5); + makeface3(3,7,13,6); + makeface4(4,8,13,7); + makeface5(1,5,2,9); + makeface6(2,6,3,10); + makeface7(3,7,4,11); + makeface8(4,8,1,12); + makeface9(1,9,14,12); + makeface10(2,10,14,9); + makeface11(3,11,14,10); + makeface12(4,12,14,11); +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + f := 2*(5,5,1.5); + Spread := 50; + pickup pencircle scaled 1pt; + sharpraytrace; +endfig; + +def spacedistort( expr Pos, Ref, Fac ) = + ( Pos + cdotprod( Pos, Ref )*Fac*Ref ) +enddef; + +beginfig(3); + f := (15,10,5); + Spread := 50; + numeric numsidecells, numlimcorner, i, j, k, cx, cy, cz, faca, facb; + numeric ar, scal; + color posa, posb, posc, posd, thisoria, thisorib, thisoric,thatori; + path ball; + numsidecells = 7; + numlimcorner = 2*numsidecells+2; + faca = 0.0; + facb = 0.0; + ar = 1.0; + scal = 0.14; + thisoria = N(( 1, 1, 1)); + thisorib = N(( 1,-2, 1)); + thisoric = 0.5*sqrt(3)*(1,1,1); + thatori = ncrossprod(thisoric,thisorib); + for i=1 upto numsidecells: + cx := i-0.5*numsidecells-1; + for j=1 upto numsidecells: + cy := j-0.5*numsidecells-1; + for k=1 upto numsidecells: + cz := k-0.5*numsidecells-1; + if i+j+k < numlimcorner+1: + posa := spacedistort( (cx,cy,cz), thisoria, faca ); + posa := spacedistort( posa, thisorib, facb ); + posb := spacedistort( (cx-0.5,cy+0.5,cz), thisoria, faca ); + posb := spacedistort( posb, thisorib, facb ); + posc := spacedistort( (cx-0.5,cy,cz+0.5), thisoria, faca ); + posc := spacedistort( posc, thisorib, facb ); + posd := spacedistort( (cx,cy+0.5,cz+0.5), thisoria, faca ); + posd := spacedistort( posd, thisorib, facb ); +% whatisthis(posa,scal*ar*thatori,scal*thisorib,1,1); +% whatisthis(posb,scal*ar*thatori,scal*thisorib,1,1); +% whatisthis(posc,scal*ar*thatori,scal*thisorib,1,1); +% whatisthis(posd,scal*ar*thatori,scal*thisorib,1,1); + ball := rigorousfearpath( posa, scal ); unfill ball; draw ball; + ball := rigorousfearpath( posb, scal ); unfill ball; draw ball; + ball := rigorousfearpath( posc, scal ); unfill ball; draw ball; + ball := rigorousfearpath( posd, scal ); unfill ball; draw ball; + fi; + endfor; + endfor; + endfor; + +endfig; + +end; + diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp b/Master/texmf-dist/doc/metapost/featpost/example/thearchicon.mp index 3c9acb10391..de262f7ddbf 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/thearchicon.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/thearchicon.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 0.8*(6,3,4); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp b/Master/texmf-dist/doc/metapost/featpost/example/thethreekindsofperspec.mp index 3d9ffe9e0d1..d49190f65e6 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/thethreekindsofperspec.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/thethreekindsofperspec.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; % bash: export TEX=latex % tcsh: setenv TEX latex diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp b/Master/texmf-dist/doc/metapost/featpost/example/torus.mp index e629e85823a..f014309dff2 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/torus.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/torus.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; % Draw a torus with NP dots, a section of 3.14*RS^2 % and a total diameter of 2*(RB+RS). The dots are placed diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp b/Master/texmf-dist/doc/metapost/featpost/example/trajectoryline.mp index 30fe6235713..182fa6d77a6 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/trajectoryline.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/trajectoryline.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 30; f := (10,0,0); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp b/Master/texmf-dist/doc/metapost/featpost/example/triangulartrimesh.mp index 1a19c776976..970d546590a 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/triangulartrimesh.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/triangulartrimesh.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; def zsurface( expr xc, yc ) = cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4) diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp b/Master/texmf-dist/doc/metapost/featpost/example/troncoconedef.mp index 0429ac4533f..fa21c1c30a7 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/troncoconedef.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/troncoconedef.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp b/Master/texmf-dist/doc/metapost/featpost/example/tropicalglobe.mp index e861c8c4462..fc95e6bde5e 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/tropicalglobe.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/tropicalglobe.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric radius, numc; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/troysfear.mp b/Master/texmf-dist/doc/metapost/featpost/example/troysfear.mp new file mode 100644 index 00000000000..59acbd784a1 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/troysfear.mp @@ -0,0 +1,77 @@ +% troysfear.mp +% L. Nobre G. +% 2008 + +input featpost3Dplus2D; + +% verbatimtex +% \documentclass{article} +% \usepackage{beton} +% \usepackage{concmath} +% \usepackage{ccfonts} +% \begin{document} +% etex + +prologues := 1; + +beginfig(1); + f := (10,-5,5.44); + Spread := 120; + viewcentr := black; + numeric i, numl, aux, thickf; + color poincol, gammacnt, raycol; + numl = 20; + thickf = 0.05; + poincol = blue; + raycol = (1,1,0.1); + color poin[]; + poin1 = ( 0.0000000000000000, 0.0000000000000000, 1.0000000000000000); + poin2 = ( 0.7333266247606663, 0.0000000000000000, 0.6798765045338225); + poin3 = ( -0.4170317493123703, -0.8933183244372310, -0.1675317620337181); + poin4 = ( -0.2314815726239148, 0.6208617150619569, 0.7489639592836793); + poin5 = ( 0.1537652646366442, -0.9604012907848274, 0.2323480235553130); + poin6 = ( -0.3863954912627506, -0.6607125590945075, 0.6435506495891403); + poin7 = ( -0.7710058807464431, 0.5605065386692130, 0.3022951404893231); + poin8 = ( -0.0959044889866723, 0.9868269446283826, 0.1302877981532283); + poin9 = ( 0.0997534549176198, 0.7727171212494309, -0.6268632217318151); + poin10 = ( 0.8172909883532864, -0.5598423938515633, 0.1364255635980997); + poin11 = ( 0.2373103227489228, 0.0812688716483729, -0.9680285022755282); + poin12 = ( 0.3405602349795320, -0.8413398111607557, -0.4197213939110916); + poin13 = ( -0.9610728898061991, 0.1533664531864700, -0.2298208683226212); + poin14 = ( -0.8870795087724005, -0.4278302969039353, 0.1733527679825362); + poin15 = ( 0.7212726731262007, 0.4012160791697596, -0.5646161428944713); + poin16 = ( -0.5528113739219546, 0.7452763339754855, -0.3727771061620893); + poin17 = ( 0.5797275131891773, 0.8147563131365292, -0.0093893905905605); + poin18 = ( -0.0762908334114027, -0.5230879059144918, -0.8488573210047642); + poin19 = ( 0.4559835073369932, 0.6170900853351784, 0.6413102740621552); + poin20 = ( 0.7633512867021243, -0.3106468355352665, -0.5663862256995101); + poin21 = ( -0.4508345799824528, 0.2265357804581852, -0.8633827202719813); + poin22 = ( -0.7074496211764032, -0.3987032948435680, -0.5835672336400034); + poin23 = ( 0.9849663581348018, 0.1640719469282586, 0.0540524705618168); + poin24 = ( 0.3404137309548133, -0.5605840215601572, 0.7548934007850813); + poin25 = ( -0.6907194772069863, -0.0072100091830313, 0.7230868686226352); + for i=1 upto 25: +% draw rp( N( poin[i] ) )--rp( poin[i] ) withcolor raycol; +% signalvertex( poin[i], thickf, poincol ); + fill rigorouscircle( poin[i], poin[i], thickf ) withcolor poincol; + endfor; + tropicalglobe( numl, black, 1, blue ); + for i=1 upto numl: % longitudes + aux := (i-1)*180/numl; + gammacnt := (cosd(aux),sind(aux),0); + draw spatialhalfcircle(black,gammacnt,1,true); + endfor; + for i=1 upto 25: + if ( conorm( f-poin[i] ) < conorm( f ) ) and ( conorm( poin[i] ) > 0.99 ): +% draw rp( N( poin[i] ) )--rp( poin[i] ) withcolor raycol; +% signalvertex( poin[i], thickf, poincol ); + fill rigorouscircle( poin[i], poin[i], thickf ) withcolor poincol; + fi; + endfor; +endfig; + +% verbatimtex +% \end{document} +% etex + +end; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp b/Master/texmf-dist/doc/metapost/featpost/example/tshirtfig.mp index 3873ab3c1fa..35cafe5c691 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/tshirtfig.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/tshirtfig.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); f := (5,4,3); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp b/Master/texmf-dist/doc/metapost/featpost/example/tuftescatter.mp index 2df874ec1dc..4c2f31a3531 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/tuftescatter.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/tuftescatter.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -% input featpost3Dplus2D; +input featpost3Dplus2D; def linscatter = uniformdeviate( 2 ) - 1 enddef; @@ -22,12 +22,12 @@ enddef; beginfig(1); numeric totalnum, classnum, sparksiz, pointray; - totalnum = 350; % Number of data points + totalnum = 250; % Number of data points classnum = 30; % Number of sparkline classes sparksiz = 0.34; % Maximum sparkline height - pointray = 0.025; % Size of the data points + pointray = 0.035; % Size of the data points f := ( 7, 6, 5 ); - Spread := 150; + Spread := 120; numeric i, j, k, l, hx[], hy[], hz[], classtep; classtep = 2/classnum; color tmp; @@ -80,4 +80,4 @@ beginfig(1); doitnow; endfig; -end.
\ No newline at end of file +end. diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp b/Master/texmf-dist/doc/metapost/featpost/example/twistflat.mp index 080f3364282..b4d3e84da91 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/twistflat.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/twistflat.mp @@ -2,7 +2,7 @@ % L. Nobre G. % Y2K -%input featpost3Dplus2D; +input featpost3Dplus2D; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp b/Master/texmf-dist/doc/metapost/featpost/example/twistnlc.mp index b3611cfbb14..23591c6b487 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistnlc.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/twistnlc.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 1999 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp b/Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp index 59a47907a88..5377b5e0ec2 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twistroundbiax.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2002 -%input featpost3Dplus2D; +input featpost3Dplus2D; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp b/Master/texmf-dist/doc/metapost/featpost/example/twocyclestogether.mp index ca94e87dc2e..8d333280214 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twocyclestogether.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/twocyclestogether.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := (4.5,-6,5); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp b/Master/texmf-dist/doc/metapost/featpost/example/twoholes.mp index 07cf6c31964..69a8e01545b 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/twoholes.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/twoholes.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; f := 1.5*(0,1.5,1); Spread := 100; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp b/Master/texmf-dist/doc/metapost/featpost/example/twoupcones.mp index cc9b697dd37..7d8f6649859 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/repeated/twoupcones.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/twoupcones.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp b/Master/texmf-dist/doc/metapost/featpost/example/unperfection.mp index 0e95bc05451..fe7c92b3ece 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfection.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/unperfection.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 70; f := (10,4,5); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp b/Master/texmf-dist/doc/metapost/featpost/example/unperfectionremoved.mp index 1829b9e7787..0606ac9d07c 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/unperfectionremoved.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/unperfectionremoved.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; Spread := 70; f := (13,4,3); diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp b/Master/texmf-dist/doc/metapost/featpost/example/vanallenbelt.mp index 83c636ab380..6420ea64dc0 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/vanallenbelt.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/vanallenbelt.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2004 -% input featpost3Dplus2D; +input featpost3Dplus2D; def magnfield( expr pos ) = begingroup diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp b/Master/texmf-dist/doc/metapost/featpost/example/verygoodcone.mp index 8ce59552a21..d63d22e8885 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/verygoodcone.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/verygoodcone.mp @@ -2,7 +2,7 @@ % L. Nobre G. % 2003 -%input featpost3Dplus2D; +input featpost3Dplus2D; beginfig(1); numeric radiusin, fac, i, numc, stepang, xcoor, ycoor, radc; diff --git a/Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp b/Master/texmf-dist/doc/metapost/featpost/example/xraycamera.mp index b3f6e51c6de..f2fd74873de 100644 --- a/Master/texmf-dist/doc/metapost/featpost/example/standard/xraycamera.mp +++ b/Master/texmf-dist/doc/metapost/featpost/example/xraycamera.mp @@ -2,7 +2,7 @@ % L. Nobre G. % IYP (2005) -%input featpost3Dplus2D; +input featpost3Dplus2D; verbatimtex \documentclass{article} |