summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/standard/simplecarparam.mp
blob: c98c6bcdd8796ca543de3d25198300ea301b0893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
% 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;