Workshop Overview: DAY 1
Warm-Up
- Data Examples
- Visualization Examples
- What would you like to learn
- Processing experience
data Process
Data Collection
What? Questions Data Collection Databases Sensors Who? Scientist Journalists Government Academics Engineers |
|
Data Manipulation
What? Data Cleaning Descriptive Statistics Inferential Statistics Machine Learning Who? Engineers Mathematicians Computer Scientists Scientist |
|
Data Representation
What? Representations Models Simulations Tangible Who? Artists Designers Engineers Computer Scientist Marketing UX |
|
Processing Activity
/**
* changing colors and size by moving the mouse
*
* MOUSE
* position x : size
* position y : color
*
* KEYS
* s : save png
* p : save pdf
*/
import processing.pdf.*;
import java.util.Calendar;
boolean savePDF = false;
void setup() {
size(720, 720);
noCursor();
}
void draw() {
// this line will start pdf export, if the variable savePDF was set to true
if (savePDF) beginRecord(PDF, timestamp()+".pdf");
colorMode(HSB, 360, 100, 100);
rectMode(CENTER);
noStroke();
background(mouseY/2, 100, 100);
fill(360-mouseY/2, 100, 100);
rect(360, 360, mouseX+1, mouseX+1);
// end of pdf recording
if (savePDF) {
savePDF = false;
endRecord();
}
}
void keyPressed() {
if (key=='s' || key=='S') saveFrame(timestamp()+"_##.png");
if (key=='p' || key=='P') savePDF = true;
}
String timestamp() {
Calendar now = Calendar.getInstance();
return String.format("%1$ty%1$tm%1$td_%1$tH%1$tM%1$tS", now);
}
* changing colors and size by moving the mouse
*
* MOUSE
* position x : size
* position y : color
*
* KEYS
* s : save png
* p : save pdf
*/
import processing.pdf.*;
import java.util.Calendar;
boolean savePDF = false;
void setup() {
size(720, 720);
noCursor();
}
void draw() {
// this line will start pdf export, if the variable savePDF was set to true
if (savePDF) beginRecord(PDF, timestamp()+".pdf");
colorMode(HSB, 360, 100, 100);
rectMode(CENTER);
noStroke();
background(mouseY/2, 100, 100);
fill(360-mouseY/2, 100, 100);
rect(360, 360, mouseX+1, mouseX+1);
// end of pdf recording
if (savePDF) {
savePDF = false;
endRecord();
}
}
void keyPressed() {
if (key=='s' || key=='S') saveFrame(timestamp()+"_##.png");
if (key=='p' || key=='P') savePDF = true;
}
String timestamp() {
Calendar now = Calendar.getInstance();
return String.format("%1$ty%1$tm%1$td_%1$tH%1$tM%1$tS", now);
}