summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp62
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp b/Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp
new file mode 100644
index 00000000000..5377b5e0ec2
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/twistroundbiax.mp
@@ -0,0 +1,62 @@
+% twistroundbiax.mp
+% L. Nobre G.
+% 2002
+
+input featpost3Dplus2D;
+
+
+
+beginfig(1);
+
+ f := (2,1,1);
+
+ Spread := 250;
+
+ color gridvec, sizevec, currpos, starpos, bordpos;
+ numeric i, j, k, counter, theta, phi, gamma, thetamin, innercircle,
+ thetamax, thetastp, long, base, radius, polar, larg;
+ sizevec := (4,36,1);
+ gridvec := (0.143,0.1,0.1);
+ thetamin := 90;
+ thetamax := 150;
+ long := 0.08;
+ larg := 0.02;
+ base := 0.2;
+ gamma := -30;
+ innercircle := 0.5;
+ thetastp := (thetamax-thetamin)/(X(sizevec)-1);
+ starpos := ( -X(gridvec)*X(sizevec) ,
+ -X(gridvec)*X(sizevec) ,
+ 0 );
+ bordpos := starpos;
+ npf1 := 4;
+ F1p1 := bordpos;
+ F1p2 := (X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p3 := (-X(bordpos),-Y(bordpos), Z(bordpos));
+ F1p4 := (-X(bordpos),Y(bordpos), Z(bordpos));
+ NF := 1;
+ draw facepath(1);
+ counter := 0;
+ for i=1 upto X(sizevec):
+ radius := (i-innercircle)*X(gridvec);
+ polar := i*floor(Y(sizevec)/X(sizevec));
+ for j=1 upto polar:
+ for k=1 upto Z(sizevec):
+ phi := 360*(j-1)/polar;
+ theta := thetamin+(i-innercircle)*thetastp;
+ currpos := radius*(cosd(phi-90),sind(phi-90),0)
+ +(k-1)*(0,0,Z(gridvec));
+ counter := incr(counter);
+% generateonebiax( counter, phi, theta, long,
+% gamma, larg, currpos );
+ generatedirline( counter, phi, theta, long, currpos );
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, base, false );
+endfig;
+
+end;
+
+