How to get text(); vertical

How do I get the numbers vertical? Starting from 0 down to 9

char alphabet = 'a';
char nextChar;
float chatX = 20;
int spacing;

char neuChar;
float chaX = 20;
char alp = 'Z';

char zahlenChar;
float chaXX = 5;
char count = '0';

void setup() {
  size(420, 330); 
  spacing = width/30;
  surface.setTitle("Farbiges_Alphabet");
}

void draw() {
  background(0);
  textSize(24);
  float nextChatX = chatX;
  for ( int i = 0; i < 26; i++) {
    nextChar = char(alphabet + i);
    textSize(24);
    fill(random(255), random(255), random(255), random(255));
    noLoop();
    text( nextChar, (nextChatX) + (spacing * i), 25);

    float neuCharX = chaX;     
    int r = -1;
    while (r < 25) {
      r++;
      neuChar = char(alp - r);
      textSize(24);
      fill(random(255), random(255), random(255), random(255));
      noLoop();
      text( neuChar, (neuCharX) + (spacing * r), 310);
      
      float zahlenCharX = chaXX;     //**here are the numbers**
int s = -1;
do {
  s++;
  zahlenChar = char(count + s);
  textSize(24);
  fill(random(255), random(255), random(255), random(255));
  noLoop();
  text( zahlenChar, (zahlenCharX) + (spacing+30*s),100);
} while (s < 9);
    }
  }
}

Hello,

For starters…

Try working with swapping the x, y for text() output.
Then you will have to clean it up a bit for the spacing.

https://processing.org/reference/text_.html

:)

1 Like

I will try it out, thanks!

2 Likes