Turret design math

Posted on 2010-06-29 11:46:26

Filed under fang4

In my last blog post, I detailed the reasons behind my decision to use a turret. In the design of a turret, one might want to minimize the amount of material used. In FANG 2, the material I used for the turret cost $15 per cubic inch, so I needed to minimize the amount of material used. A better idea might be to avoid expensive materials, but I did use math to minimize the amount of material by making the minimum distance between each barrel's surface (i.e. the minimum thickness of the turret material) the same as the thickness of the rings each turret was in. You can see this in the photo below.

FANG 2 turret spacer and trigger.

Now I'm more interested in making a light and strong gun that is aesthetically pleasing. I somewhat enjoy the "mathematical perfection" of having the minimum thickness being the same as the thickness of the rings. How do I do that? Simple geometry.

Drawing showing the geometry of a turret.

In the drawing above, each circle is a barrel. The center of the turret is the bottom of the triangle. The larger curve running through the center of each barrel is a circle that runs through the center of every barrel in the turret.

theta is the angle between each each barrel, r is the outer radius of the barrel material, R is the radius of the turret (from the center of the turret to the center of each barrel), and t is the minimum thickness between each barrel. R and theta are the two things that aren't immediately obvious from the geometry. Theta can be found fairly easily based on the number of barrels; theta = 360° / n where n is the number of barrels. So now that we know theta for a given number of barrels, how do we find R to fully describe the geometry of a turret?

In a flat 2D geometry like this, the shortest distance between two points is a straight line, so we know that if we draw a straight line between the center of each barrel, the line from the outside of one barrel to the other is the shortest one possible. We also know the distance from the center of each barrel to the outside of the barrel along with the angle between each barrel. The law of sines can be applied to find R now.

From the law of sines we can write sin(theta / 2) / (r + t / 2) = sin(90°) / R. sin(90°) = 1, so the equation can be rewritten as sin(theta / 2) = (r + 1/2 * t) / R. After further manipulation we can write the following:

D = (d + t) / sin(180° / n)

D is the diameter of the turret (twice the turret radius mentioned earlier) and d is the outer diameter of the barrel material.

This equation will be very useful in the design of turrets if one wants to know the precise dimensions of a turret of arbitrary capacity and size.