Hi,
For a given a rectangle with known width and height, I want to fit 4 circles of equal size regularly (see image) in such a way that the radius of the circles is maximized.
The aspect ratio of the rectangle is such that 4 circles fit in the latticed way shown in the image. So the 'most square' rectangle is shown on the left, and the most wide rectangle is shown on the right. The one in the middle is an arbitrary example of an intermediate rectangle.
How do I go about calculating the radius of the circles for given width and height of the rectangle? Or how do I calculate the angle between 2 circles and the horizontal? If I have the radius, I can calculate the angle, and vice versa.
I can see some relations, but do not know how to go further from that:
With width w, height h, radius r and angle a:
h = 2 * r * (1 + sin(a))
w = 2 * r * (1 + 3 * cos(a))
so:
w / h = (1 + 3 * cos(a)) / (1 + sin(a))
If w and h are given, how do I solve for a ? I am afraid my trigonometry is insufficient for this...
For the image on the left, angle a is obviously 60 deg. For the image on the right, angle a is obviously 0 deg, but what about arbitrary intermediate rectangles?
And how does this generalize to 6, 8, 10, ... circles (for appropriately wider rectangles)?
For a given a rectangle with known width and height, I want to fit 4 circles of equal size regularly (see image) in such a way that the radius of the circles is maximized.
The aspect ratio of the rectangle is such that 4 circles fit in the latticed way shown in the image. So the 'most square' rectangle is shown on the left, and the most wide rectangle is shown on the right. The one in the middle is an arbitrary example of an intermediate rectangle.
How do I go about calculating the radius of the circles for given width and height of the rectangle? Or how do I calculate the angle between 2 circles and the horizontal? If I have the radius, I can calculate the angle, and vice versa.
I can see some relations, but do not know how to go further from that:
With width w, height h, radius r and angle a:
h = 2 * r * (1 + sin(a))
w = 2 * r * (1 + 3 * cos(a))
so:
w / h = (1 + 3 * cos(a)) / (1 + sin(a))
If w and h are given, how do I solve for a ? I am afraid my trigonometry is insufficient for this...
For the image on the left, angle a is obviously 60 deg. For the image on the right, angle a is obviously 0 deg, but what about arbitrary intermediate rectangles?
And how does this generalize to 6, 8, 10, ... circles (for appropriately wider rectangles)?
Last edited: