aboutsummaryrefslogtreecommitdiffstats
path: root/dev/robot_transforms/robot_transforms.pde
blob: 380c34f5aa02ad85129b3632b3cceeb923f25879 (plain) (blame)
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
float t = 0.0;

void setup()
{
  size(600, 310);
  smooth();
}

void draw() {
  background(255);
  drawFloor();
  drawRobot();
  t += 0.05;
}


void drawRobot() {

}


// HELPER ROUTINES FOR DRAWING THE ROBOT'S BODY PARTS

// 50x65 rectangle with origin at bottom center (pelvis area)
void drawTorso() {
  noStroke();
  fill(38, 38, 200);
  rect(-25, -65, 50, 65); // body
}

// 38x30 rectangle with origin at bottom center
void drawHead() {
  noStroke();
  fill(38, 38, 200);
  rect(-19, -30, 38, 30);
  fill(222, 222, 249);
  ellipse(-8, -18, 12, 12); // left eye
  ellipse( 8, -18, 12, 12); // right eye
}

// 12x26 rectangle with origin at top center
void drawArmPart() {
  noStroke();
  fill(38, 38, 200);
  rect(-6, 0, 12, 26);  
}

// 12x20 ellipse with origin at the top center
void drawHand() {
  noStroke();
  fill(122, 122, 249);
  ellipse(0, 10, 12, 20);
}

// 16x40 rectangle with origin at top center
void drawLegPart() {
  noStroke();
  fill(38, 38, 200);  
  rect(-8, 0, 16, 40);
}

// 26x12 ellipse with origin at top center
void drawFoot() {
  noStroke();
  fill(122, 122, 249);
  ellipse(0, 6, 26, 12);
}



void drawFloor()
{
  noStroke();
  fill(100, 255, 100);
  rect(0, 300, 600, 10);   
}