-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpeople
More file actions
70 lines (52 loc) · 1.33 KB
/
people
File metadata and controls
70 lines (52 loc) · 1.33 KB
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
#a function to draw a simple outline of a human
# x: position
# y: position
# h: height of the person
# s: seed change to get different outlines)
#NOTE: S is not yet implemented
def human (x as Number y as Number h as Number s as Number) =
{
#proportion points
def ya = h / 2.3
def yb = h - 400
def w = 2000 / h #variable width as a factor of height
def y1 = ya + y
def y2 = yb + y
def xa = 200 / w
def xb = 400 / w
def xc = -150 / w
def xd = -250 / w
def x1 = xa + x
def x2 = xb + x
def x3 = xc + x
def x4 = xd + x
#legs
#left
line(x y1 x + 100 y)
line(x3 y1 x - 100 y)
#right
line(x y1 + 140 x - 100 y)
line(x1 - 30 y1 + 100 x + 170 y)
#torso
line(x3 y1 x3 y2 - 50)#left side
line(x1 y1 x1 y2)#right side
#left arm
line(x3 y2 - 160 x4 y1)#down side
line(x3 - 120 y2 + 60 x4 y1)#up side
#right arm
line(x1 y2 x2 y1)#down side
line(x1 + 120 y2 + 150 x2 y1)#up side
#head
#circle(x y + h 150)
line(x3 - 120 y2 + 60 x y2 + 240)#left shoulder
line(x1 + 120 y2 + 150 x y2 + 240)#right shoulder
line(x3 + 40 y2 + 370 x y2 + 240)#left side b
line(x1 - 100 y2 + 350 x y2 + 240)#right side b
line(x3 + 40 y2 + 370 x3 + 80 y2 + 490)#left side t
line(x1 - 100 y2 + 350 x1 - 120 y2 + 460)#right side t
line(x1 - 120 y2 + 460 x3 + 80 y2 + 490)
}
#test:
human(0 0 1900 1)
human(700 0 1600 2)
human(1300 -600 1200 3)