GMU:Bots 'n' Plots/Maria Degand: Difference between revisions

From Medien Wiki
No edit summary
Line 8: Line 8:
<br style="clear:both">
<br style="clear:both">


<pre>
<pre style="font=2">
"""
"""
my little robot duck
my little robot duck

Revision as of 17:41, 22 April 2015

Dokumentation des Kurses

meine Fortschritte

Der erste Versuch etwas mit Processing und Phyton zu zeichnen



"""
my little robot duck

"""

size(400, 400)
colorMode(RGB, 1) 
background(0, 100, 0)


ellipse(100, 120, 90, 90) 
ellipse(90, 110, 10, 10)
ellipse(90, 110, 5, 8)
ellipse(90, 110, 3, 3)
#Körper
rect(90, 155, 155, 105, 200, 1, 250, 50)
triangle(120, 120, 120, 100, 90, 100)
    
pushMatrix()
translate(350, 0)

#Füß
scale(-1, 1)
triangle(210, 300, 210, 280, 140, 280)
triangle(220, 315, 215, 290, 140, 280)
triangle(225, 320, 220, 300, 140, 280)
popMatrix()

#Schnabel
pushMatrix()
fill(1, 1, 0)
translate(30, 70)
triangle(30, 30, 30, 70, 10, 50)
triangle(30, 50, 30, 70, 10, 50)


translate(20, 50)
rotate(-TWO_PI /8)
rect(-10, 110, 70, 90, 2, 1, 400, 400)
popMatrix()

saveFrame("robot01.png")