Color Field

Under Construction

How would you describe Mark Rothko’s paintings?

p5.js Web Editor

Relations

Equality

Inequality

Relations Review

Control Structures

Conditions

Loops

Control Structures Review

Solutions

Testing

Regions

Solutions Review

function setup() {
  createCanvas(400, 400);
  noLoop();
}

function draw() {
  for (let y = 0; y < height; y++) {
    for (let x = 0; x < width; x++) {
      if (y < f()) {
        stroke(255, 162, 0);
        point(x, y);
      } else if (y < g()) {
        stroke(222, 0, 7);
        point(x, y);
      } else if (y >= g()) {
        stroke(249, 96, 0);
        point(x, y);
      }
    }
  }
}

function f() {
  return height/2;
}

function g() {
  return 5*height/8;
}

Project Ideas

First Order Make f() take x as an argument and use it to implement a linear function like . Call f(x) while drawing the system.

Abstraction Research Piet Mondrian and develop your own abstraction.


This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.