forked from APCSLowell/OriginalDesign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOriginalDesign.pde
102 lines (73 loc) · 1.21 KB
/
OriginalDesign.pde
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
int xPos = 400;
float eyeSize = 20.0;
void setup()
{
size(500,500);
}
void draw()
{
background(150,150,150);
pokeball();
pig();
xPos = xPos-1;
}
void pokeball()
{
fill(0,0,0);
ellipse(xPos,150,60,60);
rect(xPos-25,140,50,20);
fill(255,0,0);
arc(xPos,150,50,50,PI,TWO_PI);
fill(255,255,255);
arc(xPos,150,50,50,0,PI);
stroke(0,0,0);
fill(0,0,0);
ellipse(xPos,150,20,20);
fill(255,255,255);
ellipse(xPos,150,15,15);
}
void pig()
{//pig
//head
fill(255, 199, 218);
ellipse(200,150,200,200);
//nose
ellipse(200,190,75,55);
//nostrils
ellipse(190,190,15,15);
ellipse(210,190,15,15);
//eyes
fill(255, 255, 255);
ellipse(170,115,40,40);
ellipse(230,115,40,40);
fill(0, 0, 0);
ellipse(162,109,eyeSize,eyeSize);
ellipse(234,107,eyeSize,eyeSize);
//eyes get bigger
if(xPos<300)
{
eyeSize = eyeSize +.5;
}
if(xPos<200)
{
xPos = 400;
}
if(xPos == 400)
{
eyeSize = 10;
}
//legs
fill(255, 240, 240);
triangle(165,245,145,275,190,276);
triangle(235,245,255,275,210,276);
//tail
ellipse(136,233,10,10);
ellipse(127,232,10,10);
ellipse(116,230,10,10);
ellipse(105,228,10,10);
ellipse(96,222,10,10);
ellipse(86,221,10,10);
//ears
triangle(150,40,120,75,180,75);
triangle(250,40,280,75,220,75);
}