190 likes | 327 Views
Processing. Kosmo Broom info@bykosmo.com 06 52 015 699. today. Who am I What have I done Semester overview First assignment. Who am I. Kosmo not 'Sir', 'Meneer' or 'U' Student IAD (Hardware) Programer. What have I done. Klaver Kollectief Classes in Arduino (in Mexico) PhotoBooth
E N D
Processing Kosmo Broom info@bykosmo.com 06 52 015 699
today • Who am I • What have I done • Semester overview • First assignment
Who am I • Kosmo • not 'Sir', 'Meneer' or 'U' • Student IAD • (Hardware) Programer
What have I done • Klaver Kollectief • Classes in Arduino (in Mexico) • PhotoBooth • AutoMapping • Arduino • Build a guitar
Semester overview • 10 homework assignments: • Every week there will be an assignment to be made for the following class • At the beginning of class they will be checked • You need to pass at least 8 assignments • 2 major assignments • 1 assignment before the brake and one after • If you are using Processing during your project let me know
Class is for you not me • Ask questions • Be pro active • Take away what you need
Online backup • Processing has a very good base of information • www.processing.org
PROGRAMMING • IF • ELSE • WHILE • FOR
if (myWeight < 100) { • print(“ You are still within bounds ”); • }
if (myWeight < 100) { • print(“ You are still within bounds ”); • } • else{ • print(“ You might want to think about going to the gym! ”); • }
if (myWeight < 100 && myWeight > 40) { • print(“ You are still within bounds ”); • } • else if(myWeight < 40) { • print(“ It would be healthy to eat more ”); • } • else{ • print(“ You might want to think about going to the gym! ”); • }
while (myValue < 10) { • myValue++; • }
for (int i=0; i < 10; i++) { • myValue = i; • print(myValue); • }
First assignment • void setup(){ • } • void draw() { • }
void setup(){ • // set size • // set background • // set stroke color • } • void draw() { • // draw a line • }
void setup(){ • size(250,250); • background(0); • Stroke(255); • } • void draw() { • line(0,0,50,50); // make the line end up at the mouse point • }
void setup(){ • size(250,250); • background(0); • Stroke(255); • } • void draw() { • line(0,0,mouseX,mouseY); • }
Questions • What do you need to change in the code so the line will not start in the left top hand corner? • How can you get a line from every corner of the screen to meet up with the mouse pointer?
Thanks! By Kosmo Broom