Calculate the bounding box of any Reuleaux triangle

geometry

How to calculate the bounding box of any Reuleaux triangle?

The Reuleaux triangle are given in the following form:

[
    [
        (-13.705965094283357, -8.320529222222632),
        27.771461198696837,
        1.2608311697667869,
        61.260831169766824
    ],
    [
        (14.058772226517263, -7.70944934392086),
        27.771461198696837,
        121.2608311697668,
        181.2608311697668
    ],
    [
        (-0.3528071322338966, 16.029978566143498),
        27.771461198696837,
        241.26083116976682,
        301.2608311697668
    ]
]

The above is a Python list of three sub-lists, each list describes an arc, the first element is a tuple, it is a coordinate of the arc's center, the second element is the radius of the arc, the third and fourth elements are the starting and ending degrees of the arc.

The centers of the arcs are vertices of an equilateral triangle, all arcs have the same radius and span 60 degrees.

(The center of the Reauleaux triangles are all at the origin)

Basically, I want to remove the extra blank spaces in pictures like this by limiting the axes:

enter image description here

To do that, I need to calculate the bounding box of any given Reuleaux triangle, but I don't know how to do that, and again, Google searching proved futile.

I only know a very specific case, if the Reuleaux triangle is directly upwards (I don't know how to describe it in any natural language), like this:

enter image description here

Then the left-most point is the left vertex, the right-most point is the right vertex, the top is the other vertex, and the lowest point is on the lowest arc halfway between the vertices, and the bounding box is a square.

I know how to calculate the bounding box in this specific case, but I won't show the calculations here, for fear of over-cluttering the post.

So how to calculate the bounding box of any Reuleaux triangle given the parameters above?


I am trying to find the four coordinates of the square that is tangent to the Reuleaux triangle.

For example, if the lowest side is parallel to the x axis, and the equilateral triangle has radius $r$, then the three coordinates of the vertices are:

$\begin{aligned}
(0&, r) \\
(- \frac{\sqrt{3} r} {2}&, – \frac{r} {2}) \\
(\frac{\sqrt{3} r} {2}&, – \frac{r} {2})
\end{aligned}$

And the lowest point is:

$(0, r – \sqrt{3} r)$

Then the coordinates of the vertices of the bounding square is (counter-clockwise):

$\begin{aligned}
(- \frac{\sqrt{3} r} {2}&, r – \sqrt{3} r) \\
(\frac{\sqrt{3} r} {2}&, r – \sqrt{3} r) \\
(\frac{\sqrt{3} r} {2}&, r) \\
(- \frac{\sqrt{3} r} {2}&, r)
\end{aligned}$

I already worked all these out before I have written the post, and that's how I made the second picture.

I am asking, given the coordinates of the three vertices of a ROTATED Reuleaux triangle, how to calculate the four coordinates of the vertices of the bounding square of the triangle?


The accepted method indeed does work.

enter image description here

Best Answer

In any orientation of a Reuleaux triangle, at least two of the three vertices will lie on the desired bounding square. This is a property that I encourage you to try to prove on your own.

Given this fact, plus the property that the bounding box is a square whose edge length $r$ equals the radius of the defining arcs of the triangle (i.e. the triangle's "width"), one can use the provided coordinate data in a simple way to deduce the bounding box coordinates.

  1. Extract the coordinates of the arc centers.
  2. Find the minimum and maximum $x$-values; call these $x_{\text{min}}$ and $x_{\text{max}}$.
  3. Calculate $\delta_x = x_{\text{max}} - x_{\text{min}}$.
  4. There are two cases: either $\delta_x = r$, or $\delta_x < r$. In the first case, you know $x_{\text{min}}$ is the left edge of the bounding square and $x_{\text{max}}$ is the right edge.
  5. In the second case, you know that the triangle has exactly one vertex on the left or right bounding square edge. To determine whether it is the min or max $x$-value, compute $|x_1 - x_2|$, $|x_2 - x_3|$, $|x_3 - x_1|$ for the three vertices, and whichever distance is the smallest corresponds to the two vertices that are not on the left or right bounding square edge. The third vertex will either be $x_{\text{min}}$ or $x_{\text{max}}$; if the former, then the bounding square will have left edge $x_{\text{min}}$ and right edge $x_{\text{min}} + r$; if the latter, then the left edge is $x_{\text{max}} - r$ and the right edge is $x_{\text{max}}$.
  6. Repeat steps 2 through 5 for the $y$-values, which give you the top and bottom bounding square edges.