Skip to content

Instantly share code, notes, and snippets.

View vincentsijben's full-sized avatar
🎓
coaching students

Vincent Sijben vincentsijben

🎓
coaching students
View GitHub Profile
PGraphics pg;
int dim;
void setup() {
size(400, 400, P2D);
dim = width*2;
pg = createGraphics(dim, dim);
pg.colorMode(HSB, 360);
pg.beginDraw();
//description: convert one or more https://coolors.co/ URLs to color palettes
//author: @vincentsijben
//references: https://discourse.processing.org/t/function-to-extract-colors-from-coolors-co/28986
Palettes pal;
color randomColor;
void setup() {
size(390, 400);
//test met 3 arraylists
ArrayList<ArrayList<ArrayList<Integer>>> mainpalettes = new ArrayList<ArrayList<ArrayList<Integer>>>();
int count =0;
void setup()
{
for (int k = 0; k < 5; k++) {
PShape cube;
PShape cube_front;
PShape cube_back;
PShape cube_left;
PShape cube_right;
PShape cube_bottom;
PShape cube_top;
float w = 100;
float h = 100;
void setup() {
size(1100, 500, P3D);
pixelDensity(2);
smooth();
textSize(40);
}
void draw() {
background(220);
void setup() {
size(500, 500, P3D);
pixelDensity(2);
}
void draw() {
background(220);
translate(width/2, height/2);
noFill();
void setup() {
size(500, 500, P3D);
}
void draw() {
background(220);
translate(width/2, height/2);
noFill();
rotate(radians(frameCount));
//function: convert a https://coolors.co/ URL to a color array.
//author: vincentsijben
//source: enhanced version based on https://discourse.processing.org/t/function-to-extract-colors-from-coolors-co/28986
String url = "https://coolors.co/56a3a6-484538-cad49d-d4eac8-c0d8e0";
color[] palette;
int paletteIndex = 0;
void setup() {
size(400, 400);
float bpm = 60;
float triggerValue = 0;
float counter = 0;
float triggerNorm = 0;
float start = 0;
float runtime = 0;
boolean flip = false;
boolean doOnce = false;
int vincent = 0;
//hit the r key when running, to start recording 40 frames and automatically exiting after recording those 40 frames
// drag 'n drop the exported frames into https://ezgif.com/maker to create a .gif.
int x = 0;
int y = 100;
int snelheid = 10;
boolean record = false;
int currentFrame = 0;
int totalFrames = 40;