Making multiple images rotate in a circle

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.

the picture files are:

“ttps://pbs.twimg.com/profile_images/784033734492295171/0bjAltXy_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/998483212337729536/ttKM1rva_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/796705836177428480/sydPXxza_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/448386911485571072/hExlryDp_400x400_normal.jpeg”,
“ttps://pbs.twimg.com/profile_images/854404645615267841/b_My2Osh_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/684285213002854400/rsLOYDnL_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/666937735811346433/bNwwscqA_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/1094388795439501314/D_TbQ70q_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/1032541875012612096/69Mm0RUu_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/615142808480051200/p49qK4BR_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/510685434343862273/nN7iTNf2_400x400_normal.jpeg”,
“ttps://pbs.twimg.com/profile_images/1116626248988381184/SIXwL_bg_400x400_normal.png”,
“ttps://pbs.twimg.com/profile_images/672354743289712640/VzOhnPiC_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/876452994463801345/d3mYj8jJ_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/1198941852650627072/jy-YgI28_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/1164932031786180611/BTLwV64k_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/1029267040132128768/jPBvj279_400x400_normal.jpg”,
“ttps://pbs.twimg.com/profile_images/1171488902856622080/3j_6Gc32_400x400_normal.jpg”;

*** they are all https:// but apperently i am not allowed to write that

<3 <3

Something along the lines of this?

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"};

String[] urls = {
  "https://pbs.twimg.com/profile_images/784033734492295171/0bjAltXy_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/998483212337729536/ttKM1rva_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/796705836177428480/sydPXxza_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/448386911485571072/hExlryDp_400x400_normal.jpeg", 
  "https://pbs.twimg.com/profile_images/854404645615267841/b_My2Osh_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/684285213002854400/rsLOYDnL_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/666937735811346433/bNwwscqA_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/1094388795439501314/D_TbQ70q_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/1032541875012612096/69Mm0RUu_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/615142808480051200/p49qK4BR_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/510685434343862273/nN7iTNf2_400x400_normal.jpeg", 
  "https://pbs.twimg.com/profile_images/1116626248988381184/SIXwL_bg_400x400_normal.png", 
  "https://pbs.twimg.com/profile_images/672354743289712640/VzOhnPiC_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/876452994463801345/d3mYj8jJ_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/1198941852650627072/jy-YgI28_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/1164932031786180611/BTLwV64k_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/1029267040132128768/jPBvj279_400x400_normal.jpg", 
  "https://pbs.twimg.com/profile_images/1171488902856622080/3j_6Gc32_400x400_normal.jpg"
};

PImage [] images = new PImage [urls.length];
float delta = TWO_PI / names.length;
int radius = names.length *4;

void setup() {
  size(500, 500);

  for (int i = 0; i<urls.length; i++) {
    images[i] = loadImage(urls[i]);
  }
  imageMode(CENTER);
}

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);
    image(images[i], 150, 0);
    popMatrix();
  }
}

2 Likes

AndresRef you are my new bestfriend! that is exactly what I was trying to do!!

you deserve the best and most positive karma in your future!

1 Like

No problem, glad I could help.

Btw, I assume you are from Denmark :denmark:? Me too :stuck_out_tongue:

1 Like

thank you so much for your help last time. You dont happen to be a genius with SQLite also do you? :slight_smile:

Hi Alex. Sorry, I guess I saw this post way to late. No, I forgot everything I ever learned about SQL a long time ago :upside_down_face: