summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-03 16:47:39 +0000
committerKarl Berry <karl@freefriends.org>2011-12-03 16:47:39 +0000
commit97e4684a37e4899e8cdd42ab670b6e25dd319d1a (patch)
treebc263a56d75c177b79ae13c6e6ec7a3c30278dbf /Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp
parenta2c8654f8955a0d35c8b0c2d1752a506a426681b (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/joinedemptylines.mp')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp47
1 files changed, 47 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp b/Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp
new file mode 100644
index 00000000000..970f862c5a9
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/joinedemptylines.mp
@@ -0,0 +1,47 @@
+% joinedemptylines.mp
+% L. Nobre G.
+% 2001
+
+input featpost3Dplus2D;
+
+numeric altura;
+altura = 1;
+
+f := (2,3,1.8+altura);
+Spread := 125;
+LightSource := 0.7*(4,-1,4);
+ShadowOn := true;
+
+def helixone( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cblu, param;
+ par1 = 3*360;
+ par2 = 0.3;
+ par3 = 0.8;
+ param = par1*TheVal;
+ cred = par2*cosd( param );
+ cblu = par2*sind( param );
+ ( (cred,cblu,par3*(-1+TheVal)+altura) )
+ endgroup
+enddef;
+
+def helixtwo( expr TheVal ) =
+ begingroup
+ numeric par[], cred, cblu, param;
+ par1 = 3*360;
+ par2 = 0.1;
+ par3 = 0.8/3;
+ param = par1*TheVal;
+ cred = par2*cosd( param );
+ cblu = par2*sind( param );
+ ( (cred+0.2,cblu,par3*TheVal+altura) )
+ endgroup
+enddef;
+
+beginfig(1);
+ emptyline( false, 0.91, black, 0.5background, 360, 0.88, 2, helixone );
+ emptyline( true, 0.91, black, 0.5background, 120, 0.88, 2, helixtwo );
+ drawarrow rp((0.5,0,altura))--rp((0.32,0,altura));
+endfig;
+
+end;