Created
April 7, 2018 00:05
-
-
Save derfaq/fd43721affe0817019a6bdccec4af803 to your computer and use it in GitHub Desktop.
Simple scketch para simular una pantalla en el RSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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