For the last weeks we have been working on a project called ¨one hour of drawing with code¨. This project is from Khan Academy, here we learn how to draw with code.This guide took a lot of time (much hours of work), but at the end the hole class could achive the chllenges of the guide and finished the guide. Khan Academy is a great Website were yo can learn how to code and others subjects. I will show a few of my works that i do with khan academy during this week.
This image show the many different scripts you have to create an image. Professionals can do with this scripts very cool things.

(I use the image from the post from Ignacio)

This challenge for me was the best and more fun to do. This image was created only with codes!
I have more ideas but i mus to keep going with the work.
This is the code from the Snowman
//background
background(0, 191, 255);
noStroke();
//ground
fill(205, 206, 207);
rect(-2, 240, 402, 278);
//sun
fill(251, 255, 0);
ellipse(63, 73, 100, 100);
strokeWeight(1);
//simple snowman
fill(252, 249, 249);
ellipse(200, 300, 150, 150);
ellipse(200, 200, 100, 100);
ellipse(200, 120, 75, 75);
//arms
strokeWeight(10);
stroke(145, 42, 7);
line(238, 198, 295, 110);
line(162, 198, 102, 110);
//hat
strokeWeight(7);
stroke(3, 3, 3);
line(239, 96, 158, 96);
fill(0, 0, 0);
rect(176, 96, 46, -49);
//nose
strokeWeight(7);
stroke(252, 136, 3);
line(200, 132, 234, 132);
line(200, 127, 234, 132);
//eyes
fill(3, 3, 3);
stroke(0, 0, 0);
ellipse(185, 112, 2, 2);
ellipse(214, 112, 2, 2);
//bottons
fill(3, 3, 3);
stroke(0, 0, 0);
strokeWeight(5);
ellipse(200, 270, 12, 12);
strokeWeight(4);
ellipse(200, 230, 9, 9);
strokeWeight(3);
ellipse(200, 190, 6, 6);
To end with... this a video to learn for what is Khan Academy:

No comments:
Post a Comment