/
dancingmen.ps
106 lines (96 loc) · 1.68 KB
/
dancingmen.ps
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
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
%!
%Inspired by Sherlock Holmes and the Dancing Men.
%the good one, with Jeremy Brett.
/up {
currentpoint
gsave newpath
moveto
.5 .5 rlineto
stroke
grestore
} def
/up-flag {
currentpoint
gsave newpath
moveto
.5 .5 rlineto
0 .2 rlineto
.1 0 rlineto
0 -.1 rlineto
-.1 0 rlineto
stroke
grestore
} def
/down {
currentpoint
gsave newpath
moveto
.5 -.5 rlineto
stroke
grestore
} def
/down-flag {
currentpoint
gsave newpath
moveto
.5 -.5 rlineto
0 .2 rlineto
.1 0 rlineto
0 -.1 rlineto
-.1 0 rlineto
stroke
grestore
} def
/straight {
currentpoint
gsave newpath
moveto
0 -.8 rlineto
.15 0 rlineto
stroke
grestore
} def
/bent {
currentpoint
gsave newpath
moveto
.4 -.3 rlineto
-.3 -.4 rlineto
.1 -.05 rlineto
stroke
grestore
} def
/turned {
currentpoint
gsave newpath
moveto
.3 -.5 rlineto
.2 .2 rlineto
stroke
grestore
} def
% left-leg right-leg left-arm right-arm unit x y
/fig {
gsave newpath
moveto
dup dup scale
1 exch div setlinewidth
currentpoint .1 -90 270 arc
%currentpoint .2 0 360 arc
%currentpoint .1 90 450 arc
currentpoint fill %head
moveto
0 -.3 rlineto %neck
exec -1 1 scale %right-arm
exec -1 1 scale %left-arm
0 -.5 rlineto %body
exec -1 1 scale %right-leg
exec -1 1 scale %left-leg
stroke
grestore
} def
//turned //bent //down //down 50 100 200 fig
//straight //straight //up //down 50 150 200 fig
//turned //turned //up //up 50 200 200 fig
//bent //bent //down //up-flag 50 250 200 fig
showpage