We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I love this panel. I think it is a very clever idea to move one colored layer behind de front panel in order to avoid lights. I tried to simulate that effect in this sketch. I used three .svg files: The front panel, the back panel with the colors that emulate lights, and an almost invisible black panel between them to create a 3D illusion with a little shadow. You can see the final result in the image.
PShape panel, luces, sombra; // front panel, back panel, shadow panel
String s1 = "NCC 1701 / WARP ON"; // first message
String s2 = "NORMAL FUNCTION"; // second message
int x = 14;
int distanciax = 14; // pixels to move the back panel
float angulo = 1.57 ; // to make the panel go to the right and again to the left
float velocidad = 0.01; //speed
void setup() {
size (800, 565);
background (200);
panel = loadShape("panel.svg");
luces = loadShape("luces.svg");
sombra = loadShape("sombra.svg");
}
void draw() {
angulo += velocidad;
float controlador = sin(angulo); // determines if the front panel goes to right (+) or to left (-)
fill(0, 20);
noStroke();
rect(0, 0, width, height);
if ((controlador < -0.5 && controlador > -1)&&(x>0)) {
x--;
}
else if ((controlador < 0.5 && controlador >0) && (x<distanciax)) {
x ++;
}
shape(luces, x, 0);
shape(sombra, 0, 0);
shape(panel, 0, 0);
if (controlador > 0) {
textSize(8);
fill(#08FA3E);
text (s1, 245, 122);
}
else if (controlador < 0) {
textSize(8);
fill(#08FA3E);
text (s2, 254, 122);
}
}
Comments
Thanks for sharing, @Rayle. I recall that you did a sketch of Spock's science station earlier -- at this rate you will have used Processing to simulate the whole bridge set from Star Trek soon!
https://forum.processing.org/two/discussion/21597/star-trek-moire-pattern