Hi! I have a big problem. I wrote a code which draws/copy a rectangle. And the rotation point should always be that point of the rect with the smallest x-value. This means processing should always check the position of the rect and at the moment when there is a new smallest x-point the rotation point should translate to this new point...i hope you can help me with this problem!
Here is the code:
void setup() {
size(1000, 1000);
}
void draw() {
background(255);
// translate(500,250);
PVector pos = new PVector(0,0);
PVector dim = new PVector(60, -10);
int instances = 18;
drawRectangle(pos, dim, instances);
noLoop();
translate (pos.x, pos.y);
}
// Recursive function
void drawRectangle(PVector pos, PVector dim, int inst) {