# Maths question relating to TAU

**URL:** <https://discourse.processing.org/t/maths-question-relating-to-tau/22828>\
**Category:** Coding Questions\
**Created:** [July 25, 2020, 2:22am UTC](https://discourse.processing.org/t/maths-question-relating-to-tau/22828 "2020-07-25T02:22:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandl](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@pandl](https://discourse.processing.org/u/pandl)\
**Post date:** [July 25, 2020, 2:22am UTC](https://discourse.processing.org/t/maths-question-relating-to-tau/22828/1 "2020-07-25T02:22:45Z")

</div>

The following code plots a circle which is going to be a path for an image or a Pshape to follow. Where I’ve used a = (i \* TAU) / 90 seems a bit clumsy and I’m wondering if anyone can suggest what I should have done here?

```auto
void setup()
{
  size(400, 200);
  stroke(255, 0, 0);
  strokeWeight(2);
  background(204);

  timeEnd = millis();
}

float x = 0.0;
float y = 0.0;
float a = 0.0;
int i = 0;
int timeEnd;

void draw()
{
  if (millis() > timeEnd + 100)
  {
    timeEnd = millis();

    i += 1;
    //if (i > 90)
    //{
    // i = 0;
    //}  
    a = (i * TAU) / 90;
    x = (sin(a) * 50) + 60;
    y = (cos(a) * 50) + 60;

    point(x, y);    
    println("x = ", x, "y = ", y);
  }
}

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 25, 2020, 2:38am UTC](https://discourse.processing.org/t/maths-question-relating-to-tau/22828/2 "2020-07-25T02:38:22Z")

</div>

Hello,

You are moving in 4 deg steps with TAU/90.

Try TAU/360 for 1 deg steps.

`:)`
