I NEED HELP FROM THE PROCESSING GODS!
i need to make multiple images rotate in a circular shape so it fits with the lines of text. so far i have these lines of code, and i need to make the images rotate in the same fashion:
String[] names = { “Nicolai Wammen, S”,“Jakob Ellemann-Jensen, V”,“Alex Vanopslagh, LA”,“Pernille Skipper, EL”,“Pia Olsen Dyhr, SF”,“Søren Pape, KF”,“Mai Mercado, KF”,
“Jacob Mark, SF”,“Sophie Løhde, V”,“Martin Lidegaard, RV”,“Mattias Tesfaye, S”,“Morten Østergaard, RV”,“Rune Lund, EL”,“Josefine Fock, ALT”,“Peter Skaarup, DF”,“Uffe Elbæk, ALT”,
“Pernille Vermund, NB”,“Karina Adsbøl, DF”};
float delta = TWO_PI / names.length;
int radius = names.length *4;
void setup() {
size(500,500);
}
void draw() {
background(0);
fill(255);
for(int i = 0; i<names.length; i++) {
float xPos = width/2+radius * cos(i* delta);
float yPos = height/2+radius * sin(i* delta);
pushMatrix();
translate(xPos, yPos);
rotate(delta * i);
text(names[i], 0, 0);
popMatrix();
}
i have no idea how to make this work, i feel that i have tried everything but i just keep getting errors. so please if there is someone out there who is an processing beast and wants to help a struggling brother out, please do. thank you in advance to any comment.