First Processing Assignment: Drawing

Processing is an open source language that originated as a sort of sketchbook. It is based on the Java framework, which means that it will run on any platform that has the Java Virtual Machine installed (which almost all machines do at this point).

For the first project, we were supposed to create a drawing using various shapes. This is what my code looks like:

size(600,400);
//The Sky
background(191,239,255);
//The Sun
fill(255,255,0);
noStroke();
ellipse(300,250,80,80);
triangle(300,220,330,0,270,0);
triangle(320,230,580,-10,640,25);
triangle(280,230,20,-10,-40,25);
triangle(270,245,0,220,0,250);
triangle(330,245,600,220,600,250);
//The Ocean
fill(0,0,255);
rect(0,250,600,150);
//The Boat
fill(117,117,177);
rect(450,300,50,20);
triangle(450,320,450,300,420,300);
triangle(500,320,500,300,520,300);
rect(470,280,20,20);
//The Island
fill(230,240,130);
ellipse(200,320,60,25);
//Palm Tree
fill(139,90,0);
rect(200,275,5,40);
fill(34,139,34);
triangle(200,275,183,267,177,277);
triangle(205,275,220,267,223,277);
triangle(203,275,195,287,211,287);

and you can see the final product here.

This entry was posted in Intro to Computational Media. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>