Saturday, June 21, 2014

Gate Brace Math

Sooner or later, a homestead will need a gate. Or a door on something. Or some other swinging rectangle. It's inevitable. The part that swings is usually constructed by building a rectangular frame with a diagonal cross piece for stabilization and support, and then covered with boards or pickets, or whatever. The dimensions of the perpendicular pieces are fairly straightforward, but what about the diagonal brace? What size should that be and what angles should it have? Many folks just lay a board across the frame, mark where the edges should be, and cut along a line between the marks. But what if the frame is slightly out-of-square when the board is set on it? What if you're building with old warped wood (or twisty-turny, cool-looking logs) and the brace won't sit right on the frame? Wouldn't be nice if there were a way to calculate what the dimensions should be? Fortunately, there is! Time to pull out some triangle math and get measurin'.

The first step is to decide on the dimensions of the gate. Once you know the height and width, and thickness of the wood (or other material) you're going to build it with, you can build the frame, minus the crosspiece. Then decide what type of diagonal brace you want.

Three common choices are the trapezoid (left), the parallelogram (middle), or the 'skinny hexagon' (right). As a side note, the brace should be positioned with the bottom on the side with the hinges (i.e., in the figure, the hinges should be on the left side of each gate). That way, the weight of the gate compresses down on the brace, which gives more support than nails and screws can provide on their own, and helps mitigate sagging over time.

Now it's time to do math! Yay! Fortunately, we can get all the dimensions we need with just three equations: the Pythagorean theorem, SOH CAH TOA, and the law of sines, since we know the inner dimensions of the gate frame and the thickness of the wood we're planning to use for the brace (e.g., 1.5" for the thin side of a 2 x 4).

Case 1: Trapezoid brace. Easy peasy. The length of the brace is the hypotenuse of the frame, z, which we calculate from the Pythagorean theorem, with L1 and L2 as the side lengths. The angle Θ1 is the arctan of L2/L1. The angle Θ2, which is the angle to cut the board at, is calculated by subtracting Θ1 from 90°. The length, d, is the quotient of the brace board width, w, and tan Θ2. The length d is often the most useful measure since we can measure down d from one corner, draw a line to cut along from there to the opposite corner (on the same end of the board), and the angles and other dimensions will take care of themselves. As a check that everything's kosher, x and y can be calculated as shown. Note: similar, but not the same, equations apply at the opposite end of the brace. There, tan Θ1 = w/d.

Case 2: Parallelogram brace. Probably the most common, but also the
most math-intensive to figure out. The hypotenuse of the gate frame, z,
is now the long diagonal of the parallelogram. The angle between z and L1 is Θ1; the angle between y and L1 (the angle at which to cut the
board), is Θ2. z and Θ1are calculated as in Case 1 above. Next, the SOH part of SOH CAH TOA means there are alternate equations for Θ1 and Θ2; namely using L2, w, x, and y, which will be helpful in the next step. For the triangle with x, y, and z as sides, we can use the law of sines, substituting for y and sin Θ1, to find the difference between Θ1 and Θ2, and from there, Θ2;. Once Θ2 is known, substituting back into the equations from SOH makes for easy calculation of x and y, and since d is one side of a right triangle with w and x as the other sides, we can use the Pythagorean theorem to calculate d, which is what we really wanted in the first place. Phew! One advantage to this design is that it's possible to use a slightly shorter board (by, like, fractions of an inch) since the hypotenuse of the frame is the diagonal of the board instead of the length. But if you've got a piece of scrap 2 x 4 that's a quarter of an inch too short for the other brace designs...

Case 3: Skinny hexagon brace. This one is kind of like Case 1, with two trapezoids back to back. The hypotenuse of the frame lies along the centerline of the board, which means that to calculate d1 and d2 we can use the tangents of Θ1 and Θ2, which are the ratios of the sides and also of half the brace board width and one of the d's, as shown. As a check, x1, x2, and y can be calculated from the Pythagorean theorem and the SOH or CAH parts of the right triangle with (L2 - x2), (L1 - x1), and y as sides, respectively.

With the equations above, it's possible to make perfectly-fitting braces every time on gates, doors, and lots of other swinging rectangles around the homestead. (Within the experimental error of the craftsman's skills, of course). Clearly, the chickens appreciate the extra effort, since they're always crowding into the door frame when the chicken tractor door opens. They're probably eager for a chance to admire the gate brace from a new angle, and not at all excited that they suddenly have more space around the feeder.

We've also compiled this information into a handy Excel-based calculator, free for download here. Let us know if you have any suggestions to improve it!

How do you size the diagonal braces for your gates, etc.? What was the last thing you attached a gate to? Let us know in the comments section below!

8 comments:

If you don't have a calculator, and you need a quick way to square a rectangle, just remember 3-4-5. 3Sq+4Sq=5Sq so if you have a 3 foot board, and a 4 foot board (usable gate sizes) Square it up with a 5 foot board. (keeping in mind inside and outside dimensions)

The sides of the brace are parallel and the diagonal z transverses them, so the alternate interior angles are congruent.

In the picture inset, you can see the alternate interior angle of X; think of drawing theta2 downward from the opposite side of the brace (i.e., across the brace), and hopefully it will be easier to visualize!

I am making a wire gate with a wooden (2x2) frame. The gate does not have two halves that swing separately, but it will have a horizontal cross-member halfway up. It will also have a diagonal brace from a top corner to the midpoint of the opposite vertical, and a diagonal brace from a bottom corner to the midpoint of the opposite vertical (both diagonals meet the middle horizontal member).

My question is: should the top diagonals be parallel, or "oppose" one another? I am wondering how to correctly analyze the forces at play. I remember doing force vector diagrams in physics classes to describe situations like this, but can't remember quite how to go about it. Intuitively, I think they should not be parallel, but the few photos of examples of this gate construction have shown parallel diagonal braces. I think they should oppose because they will meet at the same end of the middle horizontal. If the vertical part of the force vector along the lower diagonal pushes up on the end of the middle horizontal member, and the the vertical part of the force vector along the upper diagonal pushes down on the SAME end of the middle horizontal member, it would seem to me that they cancel one another in a very stable way. Whereas if the two diagonals are parallel, the lower diagonal will push up on one end and the upper diagonal will push down on the the OPPOSITE end of the middle horizontal member, potentially inducing it to rotate, make it much less stable. That is where my intuition stems from, but I don't know if it is mathematically complete, especially as it does not consider the outside forces on the door.

I have also read that a diagonal brace should start at the top corner opposite the hinges (as in your example photo). I wonder why this is? The answer to this question might help with understanding how to apply the external forces on the the diagonals to analyze whether parallel or opposing is better.

Lastly, it would be interesting to go into a similar comparison of the effectiveness/stability/stiffness of the three choices of brace that you talk about...