How to calculate length of roof sides when distance across is known? a2 +b2 = c2

anglepvcroofroofingshed

I am building an A-frame PVC greenhouse. I plan to make the pitch 45 degrees for each side. I have a 10 foot gap across from each side of the wall.

How do I calculator the exact length of each half of the roof? I know there's Pythagoras Theorem (a2 +b2 = c2) but I am unsure how to apply it because I only know "A" and the 45 degree Angle, but not "B" or "C".

Thanks for any help!!

Best Answer

If it's a 45 degree angle, B=A.

Or you can set any value you please for roof height. You don't need to know any trig, nobody cares what the angle is. People who do roofs work in rise/run ratio, not angles.

The Pythagorean Theorem requires one corner be a regular square corner (90 degrees. Fit it to your roof one of two ways:

  • if you are committed to 45 degree angles on the roof, the apex angle will be 90 degrees. Roof angle is 100% or 12" per foot. You can put the square corner up there, and just make A and B equal as they are the sides of the roof. A2+A2=C2. You know C, the width of the building.
  • If you want a roof of any height, then drop an imaginary line straight down from the apex, and the 90 degrees is where it meets the ground. Now A is 1/2 the width of the building, B is the height of the roof. You can take it from there. Roof slope is B/A, stated as % or inches per foot. For instance 4" per foot or a 33% grade.

enter image description here


Since in comments you say you are stuck with 45 degree angles*, here's how you use diagram A to do that. You've already established your bottom edge is 10' so c=10'. That is a stocking size, and let's say your PVC pipe does not have a flare on the end that you'd have to cut off (otherwise you'd need to recalc). a and b are the same since your roof is symmetrical, so you plug into Pythagoras's Theorom (with a few substitutions):

a2+a2=102 -------------- this rewrites easily into

2 a2 = 100 --------------- and from here it's straight up solving.

a2 = 50

a = sqrt(50)

a = 7.071'

7.071' = 7 feet + 7/8 inches

That 7/8 inches will getcha. Remember these measurements are from actual corners, so when choosing PVC length you need to measure the connectors to see how far the pipe stops short of the actual corner. PVC elbows are not made for building structures, so the manufacturers don't think about these things.

If you want to get good at that, talk to the people doing geodesic domes. They have to get the numbers right for the structure to be stable.