# Trigonometry/TurnCircleRadius

Robo Home | Trigonometry | Changes | Preferences | AllPages

```

/**
* </a> for a description of this method.
*
* @author David Alves
* @param velocity - velocity that the robot is traveling at
* @return the radius of the turning circle if the robot is traveling in a circle, turning at max velocity
*/
return (Math.abs(v) * 360.0 / (10.0 - .75 * Math.abs(v))) / (2.0 * Math.PI);
}

```

Here's the math behind this shortcut:

A robot at velocity v has a max turn rate of (10 - .75 * Math.abs(v)) degrees / tick. Therefore it takes 360 / (10 - .75 * Math.abs(v)) ticks to drive in a complete circle. After this time it will have traveled a distance of Math.abs(v) * 360 / (10 - .75 * Math.abs(v)). This is the circumference of the circle the bot is driving in, so dividing by 2 * pi gives the radius: Math.abs(v) * 360 / (10 - .75 * Math.abs(v)) / (2 * Math.PI). Note that this is not an exact answer (bots don't drive in continuous curves), but it should be within a pixel or two.

Radius at velocity 5: 45.8 (SpinBot)

``` --David Alves
```

``` --[Russ Graham]?