Drawing with Pixels is a coding exercise which is inspired by Color Code Generator by zacharylemberg in openprocessing.org.
//Code for Processing 3
void setup() {
size(500, 500);
smooth();
background(0, 102, 102);
}
void draw() {
for (int l = 0;l < width;l+=20) {
float rainbow = map(l, 0, width, 200, 360);
for (int k = 0; k < height;k+=20) {
if (mouseX > l && mouseX < l +20 && mouseY > k && mouseY < k+20 && mousePressed) {
fill(rainbow, 0, 125, 100);
}
else {
noFill();
}
rect(l, k, 20, 20);
}
}
}
Drawing With Pixels is a project of IaaC, Institute for Advanced Architecture of Catalonia developed at Master in Advanced Architecture in 2015 of the Academic Program by:
Student:
Lalin Keyvan
Faculty:
Carmen Aguilar
Ramin Shambayati