really thank you!
but the code still doesn’t work
float counter = 1;
void setup() {
size(1920, 1080, P2D);
background(0);
}
void draw() {
background(0);
for (int i=0; i<3; i++) {
pushMatrix();
translate(width/2 - (i-1)*(height-60), height/2);
Block(i);
popMatrix();
}
pushMatrix();
stroke(255);
strokeWeight(2);
line(0, 10, width, 10);
line(0, height-10, width, height-10);
popMatrix();
}
void Block(int noiseSeed) {
noiseSeed = noiseSeed == 0 ? 1 : noiseSeed;
if (frameCount>100) {
counter = lerp(counter, 200, 0.1);
}
int selected = int(noise(frameCount/400, noiseSeed)*100);
for (int i=0; i<100; i++) {
pushMatrix();
float ang = noise(frameCount/500, i, noiseSeed*100)* 3 * PI + noiseSeed*10;
float r = counter;
PVector p =new PVector(1, 1).mult(r).rotate(ang);
fill(255);
if (i==selected) {
fill(255, 0, 0);
}
stroke(255, 70);
line(0, 0, p.x, p.y);
noStroke();
rect(p.x, p.y, 5, 5);
if (i==selected) {
pushMatrix();
translate(p.x, p.y);
rect(20, 0, 40, 3);
rect(20, 10, 15, 3);
rect(20, 20, 65, 3);
text("POZ: "+ int(p.x)+ ", " + int(p.y) + "<"+ang, 20, 50);
popMatrix();
}
popMatrix();
}
stroke(255);
noFill();
ellipse(0, 0, 50, 50);
textSize(10);
text("TARGET #ID: "+selected, 20, 20);
if (frameCount % 200 <30) {
if (frameCount % 4<2) {
background(255);
} else {
// background(0)
}
}
int edge = height - 100;
stroke(255) ;
rect(-edge/2, -edge/2, edge, edge);
edge = height - 80;
stroke(255, 30);
rect(-edge/2, -edge/2, edge, edge);
noStroke();
fill(255);
textSize(12);
text("EXPR#"+noiseSeed, -edge/2, -edge/2+ 10);
}
what’s wrong?