Hello.
I have this "circuit!
void setup() {
size(600, 600);
}void draw() {
ellipse (300, 150, 40, 40);
line (280, 150, 120, 150);
line (120, 150, 120, 220);
line (120, 220, 120, 290); //closed circuit
line (120, 290, 120, 380);
line (80, 220, 120, 270); // open circuit
line (320, 150, 500, 150);
line (500, 150, 500, 250);
line (500, 250, 500, 380);
line (500, 380, 350, 380);
rect (250, 350, 100, 50);
line (250, 380, 120, 380);
ellipse (500, 250, 40, 40);
line (270, 320, 325, 425);
}
I need to know hot change the switch from open to close and viceversa using space key. How I can hide closed line by the open one and the opposite.
Thanks so much