Line 18: | Line 18: | ||
Code: | Code: | ||
<pre | <pre> | ||
""" | """ |
Revision as of 18:03, 22 April 2015
Wellcome to my participant page! My name is Oliver Hannemann.
Follow me!
My Bots'n'Plots proyects
My first animated Python robot
Code:
""" My little Robot """ def setup(): size(400, 400) frameRate(10) def draw(): r = random (225) background(r, 150 ,r) pushMatrix() translate(0,50) # 1. Antenne pushMatrix() translate(200, 100) rotate(r/2) line(0, 100, 0, 0) popMatrix() # 2. Antenne pushMatrix() translate(200, 100) rotate(-r/2) line(0, 0, 0, 100) popMatrix() # Kopf ellipse(200, 100, 100, 100) # L Bein pushMatrix() translate(175, 145) rotate(TWO_PI / 20) line(0, 0, 0, 150) popMatrix() # R Bein pushMatrix() translate(225, 145) rotate(-TWO_PI / 20) line(0, 0, 0, 150) popMatrix() # L Schuh pushMatrix() translate(130, 285) scale(-1, 1) triangle(0, 0, 0, 30, 80, 40) fill(255, 204, 0) popMatrix() # R Schuh pushMatrix() translate(270, 285) triangle(0, 0, 0, 30, 80, 40) popMatrix() popMatrix()
Contributed links
Random
Twitter Bots