No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
[[Image:Robot_1.jpg|80px|thumb|left|First Robot]] | [[Image:Robot_1.jpg|80px|thumb|left|First Robot]] | ||
[https://imgflip.com/gif/ktag3 Animation] | |||
'''Code Animation Robot''' | |||
""" | |||
My Robot | |||
""" | |||
# Set up canvas | |||
eye = 15 | |||
def setup(): | |||
size(400,400) | |||
background (255) | |||
noStroke() | |||
def draw(): | |||
#color change background | |||
R = random(10,200) | |||
G = random(10,150) | |||
B = random(200,200) | |||
background(R,G,B) | |||
# Head | |||
fill(50,100,255) | |||
rect(100, 50, 170, 150) | |||
# # Glasses | |||
fill(255) | |||
rect (170, 110, 50, 3) | |||
rect(120, 100, 50, 30) | |||
rect(200, 100, 50, 30) | |||
#line(170, 110, 200, 110) | |||
# increase eyes | |||
eye = 10 + 5 * sin(frameCount * 0.1) | |||
# arm movement | |||
#position1 = up1, | |||
#Right Eye | |||
fill(100) | |||
ellipse(220,120,eye,eye) | |||
#Left Eye | |||
ellipse(150,120,eye,eye) | |||
# Body | |||
fill(50,200,255) | |||
rect(155, 200, 60, 150) | |||
#Right foot | |||
fill(150,70,190) | |||
ellipse(200,350,25,25) | |||
#Right foot | |||
ellipse(170,350,25,25) | |||
#Right Arm | |||
fill(50,200,255) | |||
#rotate (-TWO_PI /8) | |||
#translate(-215,100) | |||
rect(220, 200, 20, 90) | |||
#Left Arm | |||
#translate(100,100) | |||
rect(130, 200, 20, 90) | |||
#saveFrame('robot_1.jpg') | |||
saveFrame('myrobot_###.jpg') |
Revision as of 10:33, 29 April 2015
Hello | Hallo | Hola
-Graphic Designer studying Media Art and Design (M.F.A.)-
Code Animation Robot
""" My Robot """
- Set up canvas
eye = 15
def setup():
size(400,400) background (255)
noStroke()
def draw():
#color change background R = random(10,200) G = random(10,150) B = random(200,200) background(R,G,B) # Head fill(50,100,255) rect(100, 50, 170, 150) # # Glasses fill(255) rect (170, 110, 50, 3) rect(120, 100, 50, 30) rect(200, 100, 50, 30)
#line(170, 110, 200, 110)
# increase eyes eye = 10 + 5 * sin(frameCount * 0.1) # arm movement #position1 = up1,
#Right Eye fill(100) ellipse(220,120,eye,eye) #Left Eye ellipse(150,120,eye,eye) # Body fill(50,200,255) rect(155, 200, 60, 150)
#Right foot fill(150,70,190) ellipse(200,350,25,25) #Right foot ellipse(170,350,25,25) #Right Arm fill(50,200,255) #rotate (-TWO_PI /8) #translate(-215,100) rect(220, 200, 20, 90) #Left Arm #translate(100,100) rect(130, 200, 20, 90)
#saveFrame('robot_1.jpg') saveFrame('myrobot_###.jpg')