วันพุธที่ 13 สิงหาคม พ.ศ. 2557

Lab 0 - Tree

It's an apple tree.

Here is my coding

void setup()
{
    //setup
    size(300,500);
    background(0,238,255);
    //draw tree
    fill(194,88,52);
    noStroke();
    rect(110,150,80,300);
    //add curve to tree
    noStroke();
    fill(0,238,255);
    ellipse(110,300,40,300);
    ellipse(190,300,40,300);
    //add leaf
    noStroke();
    fill(98,255,0);
    ellipse(60,150,80,80);
    ellipse(80,120,80,80);
    ellipse(100,100,80,80);
    ellipse(240,150,80,80);
    ellipse(220,120,80,80);
    ellipse(200,100,80,80);
    ellipse(150,80,120,85);
    ellipse(150,100,120,85);
    ellipse(150,160,150,80);
    //add apple
    noStroke();
    fill(255,0,0);
    ellipse(70,150,24,24);
    ellipse(152,160,24,24);
    ellipse(220,140,24,24);
    stroke(125,49,9);
    strokeWeight(4);
    line(70,138,70,128);
    line(152,148,152,138);
    line(220,128,220,118);
}