Can I use map () in a loop?

Do you mean something like this?

void setup() {
  size(200, 200);
}

void draw() {
  noFill();
  int[] vals = {1, 77, 100, 20, 56, 32, 88};
  for (int v: vals) {
    circle(width / 2, height / 2, map(v, 1, 100, 5, 60));
  }
}

Resulting image:

Edited to correct a typographical error.

2 Likes