File: tdarrow.mp

package info (click to toggle)
texlive-base 2020.20210202-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 791,092 kB
  • sloc: perl: 45,038; sh: 4,926; makefile: 4,655; ansic: 2,266; ruby: 2,231; tcl: 2,156; xml: 1,874; python: 822; cpp: 695; awk: 606; lisp: 199; sed: 8
file content (26 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (10)
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
% tdarrow.mp
% L. Nobre G.
% 2004

input featpost3Dplus2D;

beginfig(1);
  numeric size, num, i, j, coos[];
  string comm;
  color tmpc, fro, tip;;
  size = 1.5;
  num = 250;
  draw rp(black)--rp((size,0,0))--rp((size,size,0))--rp((0,size,0))--cycle;
  for i=1 upto num:
    for j=1 upto 6:
      coos[j] := uniformdeviate(size);
    endfor;
    fro := (coos1,coos2,coos3);
    tip := (coos4,coos5,coos6);
    comm := "tdarrow(" & cstr(fro) & "," & cstr(tip) & ");";
    tmpc := 0.5[fro,tip];
    getready( comm, tmpc );
  endfor;
  doitnow;
endfig;
end.