# Hallo! Can you explain me why my text doesn't spinning?

**URL:** https://discourse.processing.org/t/hallo-can-you-explain-me-why-my-text-doesnt-spinning/10288
**Category:** Coding Questions
**Created:** [April 15, 2019, 8:10am UTC](https://discourse.processing.org/t/hallo-can-you-explain-me-why-my-text-doesnt-spinning/10288 "2019-04-15T08:10:01Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [April 16, 2019, 10:45am UTC](https://discourse.processing.org/t/hallo-can-you-explain-me-why-my-text-doesnt-spinning/10288/21 "2019-04-16T10:45:33Z")

</div>

> [@Now it stops spinning but it’s in the center haha now can i do to spinning =/](https://discourse.processing.org/t/now-it-stops-spinning-but-it-s-in-the-center-haha-now-can-i-do-to-spinning/10347/1):
>
> cos(j\*angleSpeed);

Yeah!

Prior to posting: remember to press ctrl-t in processing often: auto format for indents

As I said:

cos(j\*angleSpeed); : add something to it

cos(j\*angleSpeed + angleAdd);

do the same for sin line obviously

angleAdd+= 0.08;

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [April 16, 2019, 2:08pm UTC](https://discourse.processing.org/t/hallo-can-you-explain-me-why-my-text-doesnt-spinning/10288/22 "2019-04-16T14:08:26Z")

</div>

> [@Now it stops spinning but it’s in the center haha now can i do to spinning =/](https://discourse.processing.org/t/now-it-stops-spinning-but-it-s-in-the-center-haha-now-can-i-do-to-spinning/10347/1):
>
> rotateY(r);

What happens when you activate this line again…?

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [April 18, 2019, 6:17pm UTC](https://discourse.processing.org/t/hallo-can-you-explain-me-why-my-text-doesnt-spinning/10288/23 "2019-04-18T18:17:37Z")

</div>

```auto

PFont myFont;

String s1= ("OBECALP PHARMACY ");
float angleSpeed= TWO_PI/s1.length();
float letterX, letterY;
int i, cntX, cntY;
int radius = 260;

float z=random(TWO_PI);
float x=0;
float y;
float r =0;

float angle, c, x1, y1=0;
float speed = 0;
int waveStrengthHorizontal= 5;
int waveStrengthVertical= 5;

float u, v;

float angleAdd=0; 

float angleX; 

void setup() {
  size(800, 800, P3D);
  background(255);
  myFont = createFont("DrukTextWide-Heavy.ttf", 20);
  //textFont(myFont);
  frameRate(20);
  cntX = width/2;
  cntY = 0;
}

void draw() {
  background(255);

  translate(0, height/2, 0); 
  rotateX(angleX);

  printQuote();

  angleX+=0.061;
}

void printQuote() {

  int count =0;
  for (y=-250; y<250; y++) {

    if (count%10==0) {

      for (int j = 0; j < s1.length(); j++) {
        letterX = cntX + radius * cos(j*angleSpeed+ angleAdd);
        letterY = cntY + radius * sin(j*angleSpeed+ angleAdd);

        pushMatrix();

        //rotateY(r);
        //rotateX(200);

        translate(letterX, y, letterY);
        textSize(20);

        fill(0, 0, 0);
        text(s1.charAt(j), 0, 0);

        popMatrix();
      }
    }
    count++;
  }
  angleAdd+= 0.08;
}

```

[Previous page](https://discourse.processing.org/t/hallo-can-you-explain-me-why-my-text-doesnt-spinning/10288.md?page=1)
