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:
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:
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.
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.