How to calculate a bounding box of a circle? I'm writing a program in C++ to calculate the boundary box of a circle. The user provides me with a coordinate point (10, -5) and a radius of 23.
I'm not very good at geometry and I need help in calculating the bounding box of this circle. How would I calculate this?
 A: By bounding box I'm assuming you mean the box (square) in which the circle is inscribed, like in this picture:

Notice that the radius of the circle is exactly half the length of a side of the square.
So if the center of the circle is $(10,-5)$ and the radius of the circle is $23$, and if we're assuming a standard coordinate system ($y$-values increase in the up direction and $x$-values increase in the right direction), then the corners of the box are located at the following points:
\begin{align*}
  \text{upper left corner} &= (10-23, -5+23)\\
    &= (-13, 18)\\[0.3cm]
  \text{upper right corner} &= (10+23, -5+23)\\
    &= (33, 18)\\[0.3cm]
  \text{lower right corner} &= (10+23, -5-23)\\
    &= (33, -28)\\[0.3cm]
  \text{lower left corner} &= (10-23, -5-23)\\
    &= (-13, -28)
\end{align*}
A: Let us assume that the bounding box' sides are parallel to the coordinate axes. Then you just need to go 23 steps in every direction, so you'd get the square with the points
$$(10+23,-5+23),(10+23,-5-23),(10-23,-5+23),(10-23,-5-23)$$
i.e. 
$$(33,18),(33,-28),(-13,18),(-13,-28)$$
