Skip to content

Instantly share code, notes, and snippets.

@derfaq
Created April 7, 2018 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derfaq/fd43721affe0817019a6bdccec4af803 to your computer and use it in GitHub Desktop.
Save derfaq/fd43721affe0817019a6bdccec4af803 to your computer and use it in GitHub Desktop.
Simple scketch para simular una pantalla en el RSD
int numLines = 6;
int[] partition = new int[numLines];
void setup() {
frameRate(60);
fullScreen();
for (int i = 0; i < numLines; i++) {
if(i == 0) {
partition[i] = i;
} else {
partition[i] = partition[i-1] + height/numLines;
}
}
background(0);
}
/*
int i, j;
*/
float fase;
void draw() {
background(160,33,39);
//background(0,33,1);
noStroke();
fill(250,189,8);
//fill(18,77,29);
for (int i = 0; i < numLines; i++) {
rect(0,partition[i],width, height/numLines/2 + 0.75*(height/numLines)*sin(fase)/2);
}
fase = (TWO_PI/240)*frameCount;
/*
i++;
j = i + 1;
if (i >= width/2) {i = 0; j=0;};
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment