# What is a Cavaletti?

You probably already know that or you wouldn't be trying to compute the leg sizes. But for those just browsing I will give a brief explanation. They are jumps made by connecting two end pieces with a center bar that the animal jumps over (duh!). The trick are the ends. They are an "X" but the crosspoint is not in the middle.  Each leg may be a different size, giving 4 different triangles of different heights.

Now in your mind roll this one quarter turn clockwise. Did you see the cross pole become lower? The support legs went from A and B to B and C. That means that you can build a single jump that can be set at 4 different heights simply by selecting which two legs to use as supports.

# What height are possible?

Not all heights are possible. And some times you end up with two that are very similar. If A and B are the same, and C and D are the same; then it should be resaonable that D-A will produce the same height as B-C. But if each is different, things get interesting.

Ok, given these leg lengths; A=20, B=16, C=12, and D=8. Then the idealized heights will be:
A-B = 14.24,  B-C = 11.35,  C-D = 8.41, and  D-A = 9.18.

# The math...<shudder>

This is just trigonometry from here on out. It is just finding the height of a triangle.
We want to compute the height above the ground (the red line) for a right triangle using angle 'A'.
We started with a right angle at the intersection. We have an angle and two known sides. The tangent of angle A is the length of side B divided by the length of side A  (tangent = opposite over adjacent). The arctan() of that is the angle A. Now taking the sin() of angle A times the length of side A will produce the length of the red line. This is the idealized height.

H = sin ( atan ( b / A ) ) * A

I put this into an Excel spreadsheet that computes the four heights given the four leg lengths. Simply fill in the leg length and "PooF", the math is done. ( Calculator Screen Image).

# Reality sets in -- don't cut any PVC just yet !

"In theory, theory and practice are the same, in practice, they aren't ".
There is a slight difference between the triangle we computed, and what your dog will be trying to avoid. We have computed the height of a triangle whose apex is at the lower edge (corner) of the center connector, but not all the way to the top of the crossbar. That distance ("offset") will vary depending upon the size of the PVC pipe and the actual construction of the center connector. The best bet is to get out the ruler and simply measure that distance for the connector you have. That "offset" distance is a constant that is added to all the results on the spread sheet. It is in the top row.
So the ending formula is:
H = ( sin ( atan ( b / A ) ) * A ) + Offset

# My experience

The picture at the top are the first set I built for our three 16" Shelties. They are built from 1" PVC using 5-port connectors I ordered from a company advertising in CleanRun magazine.

My initial leg lengths were 17", 17", 8", 6" (= 13.3", 8.5", 6.0", 6.9" heights). When built (but not glued!) there were too many similar low heights. So I re-computed and replaced the 8" leg with a 10" leg. This increased the 8.5" height to 9.9", and the 6.0" went to a 6.4".

I glued the endcaps to the legs, and the legs to the center connector. I did not glue the cross bars into the end pieces. This allows dis-assembly for transport and such.

Also keep in mind that the two ends, if stacked on top of each other with the crossbar opening 'up' will not be the same. They are reflections. And be sure to put the legs in to the connector in the same order (accounting for reflection). Dry assemble before glueing!

Unfortunately, the schedule 40 PVC with blue printing does not seem to be available here anymore. The new pipe is off-white with black printing. This black printing didn't clean off with any solvents in my shop, or "goo" remover.