163
edits
No edit summary  | 
				No edit summary  | 
				||
| Line 4: | Line 4: | ||
=== My Works ===  | === My Works ===  | ||
[[Image:First_robot_as.png|400px|thumb|left|Angelica's robot]]  | [[Image:First_robot_as.png|400px|thumb|left|Angelica's robot]]  | ||
==== Animated Bot ====  | |||
<pre style="font-size:smaller" >  | |||
"""  | |||
Animated Bot  | |||
"""  | |||
rain = 24  | |||
def setup():  | |||
    size(400,400)  | |||
    background(100,100,100)  | |||
    noStroke()  | |||
def draw():  | |||
    windshield = 30+10 * sin(frameCount * 2)  | |||
    #windshield  | |||
    fill(0)  | |||
    rect(50,100,300,200)  | |||
    #windshield wiper 1  | |||
    fill(255)  | |||
    rect(150,180,windshield,100)  | |||
    fill(255)  | |||
    rect(250,180,windshield,100)  | |||
    rain = 20 + 4 * sin(frameCount * 0.1)  | |||
    #rain   | |||
    fill(0,255,0)  | |||
    ellipse(random(400),random(400),rain,rain)  | |||
    #rain2  | |||
#     fill(0,255,0)  | |||
#     ellipse(100,200,rain,rain)  | |||
    saveFrame('animatedbot_###.png')  | |||
    #saveFrame('animatedbot_###.gif')  | |||
def mouseClicked():  | |||
    background(100,100,100)  | |||
</pre>  | |||
edits