Given an arc with a known start(x, y), end(x, y) and angle, how can I calculate its bounding box?
<p>The title says it all. Given an arc with (for example):</p>

<pre><code>Start Point: x = 53.34, y = 52.07
End Point: x = 13.97, y = 52.07
Angle: 180 degrees
</code></pre>

<p><a href="http://i.stack.imgur.com/xxQ0i.png" rel="nofollow"><img src="http://i.stack.imgur.com/xxQ0i.png" alt="enter image description here"></a>
How can I find its bounding box?</p>

<p>Even though I am writing in python, puesdocode is preferred, so that it will be useful to other people.</p>

<p>Thanks!</p>

<p>-Tom</p>

<pre><code>h = Sqrt( (start.x - end.x)^2 + (start.y - end.y)^2)
or
h = Math.Hypot(start.x - end.x, start.y - end.y)

R = Abs(h / (2*Sin(Angle/2)))

if angle &lt;= Pi/2
    top = end.y
    left = end.x
    bottom = start.y
    right = start.x
else if angle &lt;= Pi 
    top = start.y - R
    left = end.x
    bottom = start.y
    right = start.x
else if angle &lt;= 3*Pi/2 
    top = start.y - R
    left = start.x - 2*R
    bottom = end.y
    right = start.x
else 
    top = start.y - R
    left = start.x - 2*R
    bottom = start.y + R
    right = start.x
</code></pre>

python math geometry bounding-box