I have to project a Mondrian painting on one of the Bauhaus' facades.
I'm using a triple-axis accelerometer to control the rectangles. Mondrian used 4 colors for this painting. What I need is to control each color independantly from the others. What I would like to do is to move one color, put it anywhere I want, and let it on this place. Then, take another color, move it, and let it where it is, and so on... And I want to be able to take a color I've already moved and move it again.
My only problem is I don't know what to say to the squares: "hey guys, stay here!"
Do you know what is the order to tell them?
Here is the code I use:
float x = cordx;
float y = cordy;
float z = cordz;
float targetX, targetY, targetZ;
float easing = 0.1;
arduino = new Arduino(this, Arduino.list(), 57600);
I am a beginner with Porcessing and don't understand really well the vocabulary and the process to make the things into it.
I need to control rectangles through processing using Arduino's interface, with a triple axis accelerometer. I want to be able to take a rectangle, move it using the accelerometer coordinates, and let it where it is, then, take another one, move it, and let it where it is, and so on.
I also need to assign a different color to each square.
My question is: how to fix an object in a certain position(x,y)?
Here is the code I use. What I want is to take the first rectangle by pressing the 'a' key, move it with the mouse, and let it where it is. Then I want to take the second rectangle, move it, and let it where it is. And so on with the two next rectangles. I want to keep the possibility to reset the position of the rectangles when I want, and to control the position of each one independantly of each other.
It shouldn't be difficult, but I don't know how to do.