Jj

"Josh"

13/01/2006 8:16 AM

Compound miter brainteaser

Not for those who don't remember their trigonometry:

My father recently built a gazebo. Just for fun, he did it with ten
sides, rather than the traditional six or eight. He gave the roof a
5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
comprised of 10 triangular wedges. He sheathed the roof with planks
forming concentric ten-sided rings around the center.

At what angles did he have to miter the planks to get them to fit
perfectly?

If the roof was flat (zero pitch) like a ten-sided deck, the miter
would have been 36 degrees from perpendicular, with a zero degree tilt
(vertical cut). If the roof was infinitely steep (like building the
walls of a ten-sided tower), he would have to have cut the boards with
a zero degree miter (perfectly perpendicular cross-cut) with a 36
degree tilt from vertical.

What would the formula be for N sides with a roof pitch of A degrees?

Josh


This topic has 43 replies

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 10:18 AM

Yes. My bad. I meant to say 18 degrees for both of my examples.

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 11:18 AM

I agree with you on the miter, not the bevel (though you're close).

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 9:12 AM

I agree with your algorithm, DJ. Several such algorithms can be found
on the web, often for computing compound miters for crown molding,
which is essentially the same problem. But many of them give slightly
different answers. Why is yours right, and what's wrong with the other
ones?

If you don't want to see a bunch of crazy math, stop reading now.

One of the other common algoriths for computing the miter (x in your
notation) is x=1/2*arccos(cos^2(b)*cos(a)+sin^2(b)). This is a pretty
simple equation to derive using simple vector algebra. Going back to
first semester Calculus, recall that the dot product of two vectors is
defined as a scalar value equal to the product of the vector magnitudes
times the cosine of the angle between them.

A.dot.B = |A| * |B| * cos(alpha),

where alpha is the angle formed between them, and the | | notation
means magnitude (i.e. length, independent of direction).

A second way to calculate the dot product is to write the vectors as
functions of the unit vectors i, j, and k which are simply vectors of
length 1 along the x, y, and z axes. If the vectors are written as A =
ax*i + ay*j + az*k and B = bx*i + by*j + bz*k then their dot product is
simply

A.dot.B = ax*bx + ay*by + az*bz

Now if we simply find two vectors which form one wedge of the ten-sided
roof, we can easily compute the angle between them by using the two
definitions of dot product. It's an easy construction:

If we take the peak of the roof to be the point (0,0,0), and we imagine
ten rafters radiating outward, angled down with a pitch (slope) of
5/12, then it's easy to find their endpoints (which will define our
vectors). If we assume for simplicity's sake that they have a length
of 1 foot, then one of the rafters would stretch from (0,0,0) to
(cos(atan(5/12)),0,-sin(atan(5/12))). Since the choice of 5/12 for a
pitch gives us a 5-12-13 right triangle, we can simpify the second
coordinate of the vector to (12/13,0,-5/13). A second rafter would
start at (0,0,0) and go to (12/13*cos(36), 12/13*sin(36), -5/13). The
36 degree angle is the angle of one wedge of roof when viewed from
directly above (i.e. there are ten sides so the the angle is a tenth of
360).

Now that we have two vectors, we can compute their dot product both of
the ways desribed above.

A.dot.B = |A| * |B| * cos (angle) = 1 * 1 * cos (alpha) = cos(alpha)
A.dot.B = 12/13*12/13*cos(36) + 0*12/13*sin(36) + 5/13*5/13

Equating the two different definitions we get ((12/13)^2*cos(36) +
(5/13)^2)= cos (alpha)

Thus alpha = arccos(0.83727) = 33.147 degrees.

This is the angle between the two vectors (i.e. the two roof rafters).
The miter angle is simply going to be half of this angle, or

x = 16.57 degrees.

This is pretty close to what DJ's formula gives us, yet it's slightly
different. Why?

I'll post the reason next. I don't want this one post to get too long.

Josh

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 9:21 AM

Even though the formula I referenced previously (which can be found as
the basis for several compound miter calculators) is easily derived,
there was an essential flaw in the construction of the problem (but not
in the math, itself). The crux of the problem is that even though the
roof pitch is 5/12, the pitch of the rafters is not 5/12 (at least not
the ten main rafters which form the wedges which comprise the roof).
If we added ten more secondary rafters to the roof frame ran down the
middle of each wedge, bisecting the 36 degree angle, those would have a
pitch of 5/12.

To put this in a way that is easier to picture, imagine that the
secondary rafters are 13 feet long, thus forming a 5-12-13 triangle.
The would have a rise of 5 feet, a horizontal run of 12 feet, and an
overall length of 13 feet. To keep the eaves of the roof level, the
main rafters would, of course, have to drop the same 5 feet total at
their end points. However, they would have to be longer than 13 feet.
They would in fact be 13/cos(18) feet long. Thus, their pitch would
actually be less than 5/12, and that's why the other formula is wrong.

Josh

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

18/01/2006 5:01 PM

I'll bet you made the same mistake in SolidWorks that I alluded to in
an earlier post. If you were to start at the peak of the roof and draw
10 lines extending radially outward with a downward pitch of 5/12,
you'd come up with angles of 16.57 and 7.12, as you did. However, for
a 5/12 slope going straight down the roof (i.e. along a path bisecting
two adjacent lines of the ten sided "starfish"), the slope along the
ridges would not be 5/12; it would be (5/12)*cos(18). If you were to
implement that slope in SolidWorks or Inventor or any other 3D modeling
program, you should get the same answers as those given by DJ's
algorithm (16.7 miter, and 6.8 bevel).

Josh

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 7:00 AM

If you can email me a .SAT file I can check it out. Given that you get
the exact angles that I get with my dot-product solution above, It
seems like you must be defining the hip rafters at 5/12 pitch, which is
slightly off from their actual pitch, but then again, maybe we're all
wrong ;-)

If you picture the roof comprised of 10 triangular wedges, the two long
sides of each triangle would be the hips of the roof, and the short
side would be the eave. Now bisect this triangle into two right
triangles by drawing a line from the point of the roof to the center of
the eve (If the triangle was a Christmas tree, you'd be drawing the
trunk). This new line should have a pitch of exactly 5/12 (i.e. should
form a 22.62 degree angle from horizontal). Meanwhile, the hip rafters
should form an angle of 21.62 degrees from horizontal because they are
slightly longer than the common rafter you just drew, but they rise the
same distance. In other words, they're slope (rise/run) is less
because "rise" is the same, but "run" is longer.

If you measure the angle from your miter joint to horizontal (which
should be the same as the pitch of the hip rafters), does it come out
to 22.62 degrees or 21.62?

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 11:24 AM

Nice. I put a couple of pictures of my father's gazebo online.
They're not very good, but I think I have some better ones at home that
I might upload.

http://www.geocities.com/jcaron2/gazebo1.jpg
http://www.geocities.com/jcaron2/gazebo2.jpg

Josh

ee

"entfillet"

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 7:15 PM

Surely this a simple problem. Akin to cutting crown molding, where
the number of sides are plugged into the 360 and divided by two to get
the miter, and the spring is replicated on the bed of the cutting
table, or mathed out to be cut on the flat according to existing
tables. The more interesting concern is that the butting joints be
undercut, so as to avoid expansion under the inevitable expansion under
moisture absorbtion, which would destroy the geometry quickly. This is
a carpenter's problem, rather than one for the mathematicians, and a
decent carpenter would say to allow for a sixteenth between the joints,
along with the underbevel, so that the whole structure has a decent
chance of survival. (caveat - it is often assumed that there is no
expansion along the lateral line but in this situation it must be
alllowed for by creating a relief space and an undercut at the joints)

Jj

"Josh"

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 7:34 PM

Nice tutorial.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 2:07 PM

"Josh" <[email protected]> wrote:

>Not for those who don't remember their trigonometry:
>
>My father recently built a gazebo. Just for fun, he did it with ten
>sides, rather than the traditional six or eight. He gave the roof a
>5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
>comprised of 10 triangular wedges. He sheathed the roof with planks
>forming concentric ten-sided rings around the center.
>
>At what angles did he have to miter the planks to get them to fit
>perfectly?

Answer 1: 18 degrees, after first building a jig to hold the planks at
a 5:12 slope in his chop saw, RAS, etc. <g>

Answer 2: 16.7 degree miter and 7.1 degree bevel. If that's not right,
then I'll have to solve it on something bigger than a post-it, and
write out my steps more carefully!

>If the roof was flat (zero pitch) like a ten-sided deck, the miter
>would have been 36 degrees from perpendicular, with a zero degree tilt
>(vertical cut). If the roof was infinitely steep (like building the
>walls of a ten-sided tower), he would have to have cut the boards with
>a zero degree miter (perfectly perpendicular cross-cut) with a 36
>degree tilt from vertical.
>
>What would the formula be for N sides with a roof pitch of A degrees?

This is the point where the prof says "The generalization is trivial,
and is left as an exercise for the class."
--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

kk

kimnach

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 10:01 PM

In article <[email protected]>,
[email protected] says...
>
>
>Not for those who don't remember their trigonometry:


>
>What would the formula be for N sides with a roof pitch of A degrees?
>

an interesting problem. it is solved by noting that the rafters, when viewed from
above, look like an outside corner crown moulding (c.m.) problem.

the pitch of the rafters (5:12 = 22.6degrees) becomes the c.m. angle, while the
inclusion angle becomes (180-36)/2 = 72degrees (again, since it's an outside
corner crown moulding).

in this specific case the result is:
miter = pi/2 - [atan (cos(22.6) / tan (72)] = 16.7deg
bevel = atan [cot(pi/2 - 22.6) * sin(pi/2 - 16.7) ] = 6.8degrees

for those who want to visualize what's going on or who aren't necessarily good at
trig, check out my tutorial at
<<http://users.adelphia.net/~kimnach/woodworking/compoundangle.htm>>


--
regards,
greg

http://users.adelphia.net/~kimnach

Rr

"Relz"

in reply to "Josh" on 13/01/2006 8:16 AM

18/01/2006 1:03 PM


"Josh" <[email protected]> wrote in message
news:[email protected]...
> Not for those who don't remember their trigonometry:
>
> My father recently built a gazebo. Just for fun, he did it with ten
> sides, rather than the traditional six or eight. He gave the roof a
> 5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
> comprised of 10 triangular wedges. He sheathed the roof with planks
> forming concentric ten-sided rings around the center.
>
> At what angles did he have to miter the planks to get them to fit
> perfectly?
>
> If the roof was flat (zero pitch) like a ten-sided deck, the miter
> would have been 36 degrees from perpendicular,

Wouldn't it be 18 degrees?

Rr

"Relz"

in reply to "Josh" on 13/01/2006 8:16 AM

18/01/2006 1:57 PM


"alexy" <[email protected]> wrote in message
news:[email protected]...
> "Josh" <[email protected]> wrote:
>
>>Not for those who don't remember their trigonometry:
>>
>>My father recently built a gazebo. Just for fun, he did it with ten
>>sides, rather than the traditional six or eight. He gave the roof a
>>5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
>>comprised of 10 triangular wedges. He sheathed the roof with planks
>>forming concentric ten-sided rings around the center.
>>
>>At what angles did he have to miter the planks to get them to fit
>>perfectly?
>
> Answer 1: 18 degrees, after first building a jig to hold the planks at
> a 5:12 slope in his chop saw, RAS, etc. <g>
>
> Answer 2: 16.7 degree miter and 7.1 degree bevel. If that's not right,
> then I'll have to solve it on something bigger than a post-it, and
> write out my steps more carefully!

For what it's worth, I modeled it up in SolidWorks and I got a 16.57 degree
miter with a 7.12 degree bevel.
So, I think you're pretty close alexy.

Relz

Rr

"Relz"

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 7:49 AM


"Josh" <[email protected]> wrote in message
news:[email protected]...
> I'll bet you made the same mistake in SolidWorks that I alluded to in
> an earlier post. If you were to start at the peak of the roof and draw
> 10 lines extending radially outward with a downward pitch of 5/12,
> you'd come up with angles of 16.57 and 7.12, as you did. However, for
> a 5/12 slope going straight down the roof (i.e. along a path bisecting
> two adjacent lines of the ten sided "starfish"), the slope along the
> ridges would not be 5/12; it would be (5/12)*cos(18). If you were to
> implement that slope in SolidWorks or Inventor or any other 3D modeling
> program, you should get the same answers as those given by DJ's
> algorithm (16.7 miter, and 6.8 bevel).
>
> Josh
>

I guess I don't understand what you're saying. Could you or someone please
explain it to me?

I've modeled two sections of a ten-sided roof with a 5/12 pitch. I've
modeled two 1 x 4 "boards" that would join up on the theoretical middle of
the rafters. For the boards to come together in both miter and bevel, the
CAD software is still telling me that the miter should be 16.57358103
degrees and the bevel should be 7.12327393 degrees.

Sorry, but I've learned to trust my CAD software and either you are all
wrong, or more likely, I've put something into my program that's wrong.
Also, if anyone has SolidWorks, I am willing to email you my file and maybe
you could tell me what I'm doing wrong.

Relz

Rr

"Relz"

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 12:44 PM


"Josh" <[email protected]> wrote in message
news:[email protected]...
> If you can email me a .SAT file I can check it out. Given that you get
> the exact angles that I get with my dot-product solution above, It
> seems like you must be defining the hip rafters at 5/12 pitch, which is
> slightly off from their actual pitch, but then again, maybe we're all
> wrong ;-)
>
> If you picture the roof comprised of 10 triangular wedges, the two long
> sides of each triangle would be the hips of the roof, and the short
> side would be the eave. Now bisect this triangle into two right
> triangles by drawing a line from the point of the roof to the center of
> the eve (If the triangle was a Christmas tree, you'd be drawing the
> trunk). This new line should have a pitch of exactly 5/12 (i.e. should
> form a 22.62 degree angle from horizontal). Meanwhile, the hip rafters
> should form an angle of 21.62 degrees from horizontal because they are
> slightly longer than the common rafter you just drew, but they rise the
> same distance. In other words, they're slope (rise/run) is less
> because "rise" is the same, but "run" is longer.
>
> If you measure the angle from your miter joint to horizontal (which
> should be the same as the pitch of the hip rafters), does it come out
> to 22.62 degrees or 21.62?
>

Okay, I think I know where I went wrong. I was modeling the 5/12 pitch on
the rafter, not the roof (your tree trunk).

I remodeled the senario as you described and I'm getting a hip rafter angle
of 21.62, just as you described. And, now I am getting a bevel degree of
6.83 which is what everyone else was getting.

Thank you Josh and alexy for helping me see where I went wrong. This
information will come in handy when I go to build my gazebo. I just may do
it ten sided! :-)

Relz

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 9:18 PM

DJ Delorie wrote:
> "Josh" <[email protected]> writes:
>
>>What would the formula be for N sides with a roof pitch of A degrees?
>
>
> There's a reason why I have a web page to do this:
>
> http://www.delorie.com/wood/compound-cuts.cgi?nsides=10&angle=5/12
> http://www.delorie.com/wood/compound-cuts.html
>
> Number of sides: 10
> Angle of sides: 22.6
>
> Cross Cut Angle: 16.7
> Blade Angle: 6.8

Now three people have three different answers for the bevel.

Yours is closed source, so no way to check. fwiw, I got my formula from
this page:

http://www.woodcentral.com/bparticles/miter_formula.shtml

and tossed up the (interactive!) script myself.

er
--
email not valid

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 5:46 PM

alexy wrote:
> "Josh" <[email protected]> wrote:
>
>
>>Not for those who don't remember their trigonometry:
>>
>>My father recently built a gazebo. Just for fun, he did it with ten
>>sides, rather than the traditional six or eight. He gave the roof a
>>5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
>>comprised of 10 triangular wedges. He sheathed the roof with planks
>>forming concentric ten-sided rings around the center.
>>
>>At what angles did he have to miter the planks to get them to fit
>>perfectly?
>
>
> Answer 1: 18 degrees, after first building a jig to hold the planks at
> a 5:12 slope in his chop saw, RAS, etc. <g>
>
> Answer 2: 16.7 degree miter and 7.1 degree bevel. If that's not right,
> then I'll have to solve it on something bigger than a post-it, and
> write out my steps more carefully!

If you use Un*x.

bc has a very limited set of functions, and then only if you invoke it
with the -l flag. The initial stuff adds a tangent and arcsin function
to make up for that, and defines pi so I didn't have to write it out.
Save the below to a file named compound-miter.bc, and use

"bc -ql [path/to/]compound-mitre.bc"

to calculate the angles for a (roof) of an arbitrary number of sides and
roof pitch.

=8<----------------------------------------
define asin (k) {
return a( k / sqrt(1 - sqrt(k)) );
}

define tan (p) {
return s(p) / c(p);
}

pi=4.0 * a(1);

print "how many sides?: ";
#angle=360 / angle * pi / 180;
angle=2 * pi / read ();

# won't take a fraction :( needs a decimal number
print "what is the slope?: ";
slope=a(read());

miter=a( c(slope) * tan(angle/2.0));
bevel=asin( s(slope) * s(angle/2.0) );

scale=2;
print "\nThe miter is: ", miter * 180.0 / pi, " degrees.\n";
print "The bevel is: ", bevel * 180.0 / pi, " degrees.\n";

quit;
=8<----------------------------------------

er
--
email not valid

dn

"dr-whoopie"

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 4:08 PM

somehow after atepting to try and understand

i declare myself (STUPID)
"Josh" <[email protected]> wrote in message
news:[email protected]...
>I agree with your algorithm, DJ. Several such algorithms can be found
> on the web, often for computing compound miters for crown molding,
> which is essentially the same problem. But many of them give slightly
> different answers. Why is yours right, and what's wrong with the other
> ones?
>
> If you don't want to see a bunch of crazy math, stop reading now.
>
> One of the other common algoriths for computing the miter (x in your
> notation) is x=1/2*arccos(cos^2(b)*cos(a)+sin^2(b)). This is a pretty
> simple equation to derive using simple vector algebra. Going back to
> first semester Calculus, recall that the dot product of two vectors is
> defined as a scalar value equal to the product of the vector magnitudes
> times the cosine of the angle between them.
>
> A.dot.B = |A| * |B| * cos(alpha),
>
> where alpha is the angle formed between them, and the | | notation
> means magnitude (i.e. length, independent of direction).
>
> A second way to calculate the dot product is to write the vectors as
> functions of the unit vectors i, j, and k which are simply vectors of
> length 1 along the x, y, and z axes. If the vectors are written as A =
> ax*i + ay*j + az*k and B = bx*i + by*j + bz*k then their dot product is
> simply
>
> A.dot.B = ax*bx + ay*by + az*bz
>
> Now if we simply find two vectors which form one wedge of the ten-sided
> roof, we can easily compute the angle between them by using the two
> definitions of dot product. It's an easy construction:
>
> If we take the peak of the roof to be the point (0,0,0), and we imagine
> ten rafters radiating outward, angled down with a pitch (slope) of
> 5/12, then it's easy to find their endpoints (which will define our
> vectors). If we assume for simplicity's sake that they have a length
> of 1 foot, then one of the rafters would stretch from (0,0,0) to
> (cos(atan(5/12)),0,-sin(atan(5/12))). Since the choice of 5/12 for a
> pitch gives us a 5-12-13 right triangle, we can simpify the second
> coordinate of the vector to (12/13,0,-5/13). A second rafter would
> start at (0,0,0) and go to (12/13*cos(36), 12/13*sin(36), -5/13). The
> 36 degree angle is the angle of one wedge of roof when viewed from
> directly above (i.e. there are ten sides so the the angle is a tenth of
> 360).
>
> Now that we have two vectors, we can compute their dot product both of
> the ways desribed above.
>
> A.dot.B = |A| * |B| * cos (angle) = 1 * 1 * cos (alpha) = cos(alpha)
> A.dot.B = 12/13*12/13*cos(36) + 0*12/13*sin(36) + 5/13*5/13
>
> Equating the two different definitions we get ((12/13)^2*cos(36) +
> (5/13)^2)= cos (alpha)
>
> Thus alpha = arccos(0.83727) = 33.147 degrees.
>
> This is the angle between the two vectors (i.e. the two roof rafters).
> The miter angle is simply going to be half of this angle, or
>
> x = 16.57 degrees.
>
> This is pretty close to what DJ's formula gives us, yet it's slightly
> different. Why?
>
> I'll post the reason next. I don't want this one post to get too long.
>
> Josh
>

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 4:54 PM

Josh wrote:
> I agree with you on the miter, not the bevel (though you're close).
>

I got 8.35287747524613872127

er
--
email not valid

kk

kimnach

in reply to "Josh" on 13/01/2006 8:16 AM

22/01/2006 10:10 PM

In article <[email protected]>, [email protected]
says...

>>in this specific case the result is:
>> miter = pi/2 - [atan (cos(22.6) / tan (72)] = 16.7deg
>> bevel = atan [cot(pi/2 - 22.6) * sin(pi/2 - 16.7) ] = 6.8degrees
>
>And I guess you can say that anyone that doesn't spot and correct the
>mixed use of radians and degrees probably shouldn't be trusted with
>such dangerous formulas!? <g>

i just work in "degrians" until it's time to hit the calculator.

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

14/01/2006 9:10 PM

DJ Delorie wrote:
> Enoch Root <[email protected]> writes:
>
>>s/b $a/2:
>>
>>$x = atan(cos($angle)*tan($a/2));
>>$y = asin(sin($angle)*sin($a/2));
>
>
> $a is already halved. It's computed as $pi / $sides, not 2*$pi /
> sides.

Right you are. It was my definition of Asin. :(

er
--
email not valid

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

14/01/2006 9:12 PM

Enoch Root wrote:

[snip]

I got the definition of Asin messed up.

should be:

define asin (k) {
return a( k / sqrt(1 - k^2) );
}

er
--
email not valid

DS

"Doug Schultz"

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 5:07 PM

5/12 pitch is 5 divided by 12 x 90 = degrees. 37.5


"Josh" <[email protected]> wrote in message
news:[email protected]...
> Not for those who don't remember their trigonometry:
>
> My father recently built a gazebo. Just for fun, he did it with ten
> sides, rather than the traditional six or eight. He gave the roof a
> 5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
> comprised of 10 triangular wedges. He sheathed the roof with planks
> forming concentric ten-sided rings around the center.
>
> At what angles did he have to miter the planks to get them to fit
> perfectly?
>
> If the roof was flat (zero pitch) like a ten-sided deck, the miter
> would have been 36 degrees from perpendicular, with a zero degree tilt
> (vertical cut). If the roof was infinitely steep (like building the
> walls of a ten-sided tower), he would have to have cut the boards with
> a zero degree miter (perfectly perpendicular cross-cut) with a 36
> degree tilt from vertical.
>
> What would the formula be for N sides with a roof pitch of A degrees?
>
> Josh
>

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 3:56 PM

Josh wrote:
> Even though the formula I referenced previously (which can be found as
> the basis for several compound miter calculators) is easily derived,
> there was an essential flaw in the construction of the problem (but not
> in the math, itself). The crux of the problem is that even though the
> roof pitch is 5/12, the pitch of the rafters is not 5/12 (at least not
> the ten main rafters which form the wedges which comprise the roof).
> If we added ten more secondary rafters to the roof frame ran down the
> middle of each wedge, bisecting the 36 degree angle, those would have a
> pitch of 5/12.
>
> To put this in a way that is easier to picture, imagine that the
> secondary rafters are 13 feet long, thus forming a 5-12-13 triangle.
> The would have a rise of 5 feet, a horizontal run of 12 feet, and an
> overall length of 13 feet. To keep the eaves of the roof level, the
> main rafters would, of course, have to drop the same 5 feet total at
> their end points. However, they would have to be longer than 13 feet.
> They would in fact be 13/cos(18) feet long. Thus, their pitch would
> actually be less than 5/12, and that's why the other formula is wrong.

Hah, that's gorgeous... 5/12 is the pitch along a line perpendicular to
the direction of the slope, but the rafters are not that. :)

The other formula will work if you adjust your slope to

slope = sqrt(rise^2/(rise^2+run^2))

won't it? (seems to, based on a test using my own proggie)

er
--
email not valid

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

20/01/2006 1:08 AM

kimnach <[email protected]> wrote:

>In article <[email protected]>,
>[email protected] says...
>>
>>
>>Not for those who don't remember their trigonometry:
>
>
>>
>>What would the formula be for N sides with a roof pitch of A degrees?
>>
>
>an interesting problem. it is solved by noting that the rafters, when viewed from
>above, look like an outside corner crown moulding (c.m.) problem.
>
>the pitch of the rafters (5:12 = 22.6degrees) becomes the c.m. angle, while the
>inclusion angle becomes (180-36)/2 = 72degrees (again, since it's an outside
>corner crown moulding).
>
>in this specific case the result is:
> miter = pi/2 - [atan (cos(22.6) / tan (72)] = 16.7deg
> bevel = atan [cot(pi/2 - 22.6) * sin(pi/2 - 16.7) ] = 6.8degrees

And I guess you can say that anyone that doesn't spot and correct the
mixed use of radians and degrees probably shouldn't be trusted with
such dangerous formulas!? <g>

>for those who want to visualize what's going on or who aren't necessarily good at
>trig, check out my tutorial at
><<http://users.adelphia.net/~kimnach/woodworking/compoundangle.htm>>

Thanks. I'm looking forward to reading that.

--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 10:09 PM

DJ Delorie wrote:

> There's a reason why I have a web page to do this:
>
> http://www.delorie.com/wood/compound-cuts.cgi?nsides=10&angle=5/12
> http://www.delorie.com/wood/compound-cuts.html

*Looks again*

Heh. The more I look at your web pages the more silly I feel having
made that statement.

er
--
email not valid

MD

"Morris Dovey"

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 6:32 PM

Enoch Root (in [email protected]) said:

| Hah, that's gorgeous... 5/12 is the pitch along a line
| perpendicular to the direction of the slope, but the rafters are
| not that. :)
|
| The other formula will work if you adjust your slope to
|
| slope = sqrt(rise^2/(rise^2+run^2))
|
| won't it? (seems to, based on a test using my own proggie)

You're obviously having too much fun with this. Just to open things up
a bit for all the people who don't have bc (but _do_ have a C
compiler):

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void)
{ char input[128];
double sides,rise,run,slant,angle,miter,bevel;

printf("How many sides? ");
fflush(stdout);
fgets(input,80,stdin);
sscanf(input,"%lf\n ",&sides);
angle = 2 * M_PI / sides;

printf("What is the slant (degrees or rise/run)? ");
fflush(stdout);
fgets(input,80,stdin);
if (strchr(input,'/'))
{ sscanf(input,"%lf/%lf",&rise,&run);
slant = atan(rise / run);
}
else
{ sscanf(input,"%lf",&slant);
slant = M_PI * slant / 180;
}

miter = atan(cos(slant) * tan(angle / 2));
bevel = asin(sin(slant) * sin(angle / 2));

printf("\nThe miter is %0.2lf degrees\n", miter * 180 / M_PI);
printf("The bevel is %0.2lf degrees\n" , bevel * 180 / M_PI);

return EXIT_SUCCESS;
}

This program allows entering the "slant" in degrees or as rise/run
(like 5/12). It's "quick and dirty" and does no error checking, but
should be compilable with even TurboC version 1 (I used 3.0).

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/solar.html

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 9:17 AM

"Relz" <[email protected]> wrote:

>
>"Josh" <[email protected]> wrote in message
>news:[email protected]...
>> I'll bet you made the same mistake in SolidWorks that I alluded to in
>> an earlier post. If you were to start at the peak of the roof and draw
>> 10 lines extending radially outward with a downward pitch of 5/12,
>> you'd come up with angles of 16.57 and 7.12, as you did. However, for
>> a 5/12 slope going straight down the roof (i.e. along a path bisecting
>> two adjacent lines of the ten sided "starfish"), the slope along the
>> ridges would not be 5/12; it would be (5/12)*cos(18). If you were to
>> implement that slope in SolidWorks or Inventor or any other 3D modeling
>> program, you should get the same answers as those given by DJ's
>> algorithm (16.7 miter, and 6.8 bevel).
>>
>> Josh
>>
>
>I guess I don't understand what you're saying. Could you or someone please
>explain it to me?

I'll try different terminology. I thin what you probably modeled has
hip rafters at 5:12 rather than common rafters at 5:12.

I don't have solidworks, but have another solid modeler. I'll try it
and see what I get.

>
>I've modeled two sections of a ten-sided roof with a 5/12 pitch. I've
>modeled two 1 x 4 "boards" that would join up on the theoretical middle of
>the rafters. For the boards to come together in both miter and bevel, the
>CAD software is still telling me that the miter should be 16.57358103
>degrees and the bevel should be 7.12327393 degrees.
>
>Sorry, but I've learned to trust my CAD software and either you are all
>wrong, or more likely, I've put something into my program that's wrong.
>Also, if anyone has SolidWorks, I am willing to email you my file and maybe
>you could tell me what I'm doing wrong.
>
>Relz
>

--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

14/01/2006 1:17 AM

Enoch Root <[email protected]> wrote:

>DJ Delorie wrote:
>> "Josh" <[email protected]> writes:
>>
>>>What would the formula be for N sides with a roof pitch of A degrees?
>>
>>
>> There's a reason why I have a web page to do this:
>>
>> http://www.delorie.com/wood/compound-cuts.cgi?nsides=10&angle=5/12
>> http://www.delorie.com/wood/compound-cuts.html
>>
>> Number of sides: 10
>> Angle of sides: 22.6
>>
>> Cross Cut Angle: 16.7
>> Blade Angle: 6.8
>
>Now three people have three different answers for the bevel.
>
>Yours is closed source, so no way to check. fwiw, I got my formula from
>this page:
>
> http://www.woodcentral.com/bparticles/miter_formula.shtml
>
>and tossed up the (interactive!) script myself.

And mine was no formulas--just visualize and figure it out, with lots
of chances for errors.But sounds like we are all agreed on the miter,
and just need to settle on the bevel.

--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 12:29 PM

"Doug Schultz" <[email protected]> wrote:

>5/12 pitch is 5 divided by 12 x 90 = degrees. 37.5
So 12/12 pitch, which most of us think is a 45 degree angle, is really
12/12*90 = 90 degrees?

No, roof pitch refers to "rise over run". except for special cases,
you are going to have to resort to tables or trig [angle =
atan(rise/run)] to get the angle. Josh stated this angle correctly. I
think he forgot to divide by two in his other angle.
>
>
>"Josh" <[email protected]> wrote in message
>news:[email protected]...
>> Not for those who don't remember their trigonometry:
>>
>> My father recently built a gazebo. Just for fun, he did it with ten
>> sides, rather than the traditional six or eight. He gave the roof a
>> 5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
>> comprised of 10 triangular wedges. He sheathed the roof with planks
>> forming concentric ten-sided rings around the center.
>>
>> At what angles did he have to miter the planks to get them to fit
>> perfectly?
>>
>> If the roof was flat (zero pitch) like a ten-sided deck, the miter
>> would have been 36 degrees from perpendicular, with a zero degree tilt
>> (vertical cut). If the roof was infinitely steep (like building the
>> walls of a ten-sided tower), he would have to have cut the boards with
>> a zero degree miter (perfectly perpendicular cross-cut) with a 36
>> degree tilt from vertical.
>>
>> What would the formula be for N sides with a roof pitch of A degrees?
>>
>> Josh
>>
>

--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 12:35 PM

"Josh" <[email protected]> wrote:

>Not for those who don't remember their trigonometry:
>
>My father recently built a gazebo. Just for fun, he did it with ten
>sides, rather than the traditional six or eight. He gave the roof a
>5/12 pitch (22.6 degree angle from horizontal). Thus, the roof was
>comprised of 10 triangular wedges. He sheathed the roof with planks
>forming concentric ten-sided rings around the center.
>
>At what angles did he have to miter the planks to get them to fit
>perfectly?
>
>If the roof was flat (zero pitch) like a ten-sided deck, the miter
>would have been 36 degrees from perpendicular, with a zero degree tilt
>(vertical cut).

Josh, I think you forgot to divide by two here. each angle of an
equilateral decagon is 144 degrees. To cut _one_ board to get that
angle, you would cut 36 degrees from perpendicular. But presuming that
you want the bevel or miter to line up (and maybe my assumption is not
correct?), you would want to cut 18 degrees on each board.

--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

MD

"Morris Dovey"

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 11:56 PM

DJ Delorie (in [email protected]) said:

| "Morris Dovey" <[email protected]> writes:
|| You're obviously having too much fun with this. Just to open things
|| up a bit for all the people who don't have bc (but _do_ have a C
|| compiler):
|
| If you have neither bc nor a C compiler, my script uses the same
| math (and allows for rise/run too):
|
| http://www.delorie.com/wood/compound-cuts.html

Your script is much appreciated (but not as much your ABPW archive and
nowhere near as much as your efforts to make a C compiler freely
available to all) - but there are more than 15 miles between my shop
and my internet access.

For those with a similar situation, the C source can be found in the
collection at www.iedu.com/mrd/c/ as cbevel.c - sometimes it's a Good
Thing to be able to function independently from the internet. :-)

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

17/01/2006 9:59 AM

"Josh" <[email protected]> wrote:

>Even though the formula I referenced previously (which can be found as
>the basis for several compound miter calculators) is easily derived,
>there was an essential flaw in the construction of the problem (but not
>in the math, itself).
Well, not to be picky, but...
There is no flaw in the construction of the problem. The flaw is in
the solution, using the roof slope as the slope of the diagonal
rafters.

> The crux of the problem is that even though the
>roof pitch is 5/12, the pitch of the rafters is not 5/12 (at least not
>the ten main rafters which form the wedges which comprise the roof).
>If we added ten more secondary rafters to the roof frame ran down the
>middle of each wedge, bisecting the 36 degree angle, those would have a
>pitch of 5/12.
>
>To put this in a way that is easier to picture, imagine that the
>secondary rafters are 13 feet long, thus forming a 5-12-13 triangle.
>The would have a rise of 5 feet, a horizontal run of 12 feet, and an
>overall length of 13 feet. To keep the eaves of the roof level, the
>main rafters would, of course, have to drop the same 5 feet total at
>their end points. However, they would have to be longer than 13 feet.
>They would in fact be 13/cos(18) feet long. Thus, their pitch would
>actually be less than 5/12, and that's why the other formula is wrong.
>
>Josh

this part, getting the miter angle, is way easier than the dot product
solution. Consider 1/2 of one of the roof wedges. Vertically, it is a
12/5/13 right triangle, so the length from the peak to the eve is 13.
Horizontally, it is an 18 degree right triangle, with the long leg of
12. Trig tables give us the other leg as 3.9. So the half wedge
forming the roof is a right triangle with legs of 13 and 3.9, from
which we use trig to get a miter angle of 16.7.

It's the bevel angle that stumps me. I got an answer consistent with
the one posted from the calculators, but without more digits of
precision, I'm not very confident of mine. And unless one of you
computer types want to "program" this solution in Excel <gasp!>, I'm
not able to play around with the precision. My solution still causes
brain strain when I try to reconstruct it! <g>
--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

15/01/2006 3:14 AM

alexy <[email protected]> wrote:

>Enoch Root <[email protected]> wrote:
>
>>DJ Delorie wrote:
>>> "Josh" <[email protected]> writes:
>>>
>>>>What would the formula be for N sides with a roof pitch of A degrees?
>>>
>>>
>>> There's a reason why I have a web page to do this:
>>>
>>> http://www.delorie.com/wood/compound-cuts.cgi?nsides=10&angle=5/12
>>> http://www.delorie.com/wood/compound-cuts.html
>>>
>>> Number of sides: 10
>>> Angle of sides: 22.6
>>>
>>> Cross Cut Angle: 16.7
>>> Blade Angle: 6.8
>>
>>Now three people have three different answers for the bevel.
>>
>>Yours is closed source, so no way to check. fwiw, I got my formula from
>>this page:
>>
>> http://www.woodcentral.com/bparticles/miter_formula.shtml
>>
>>and tossed up the (interactive!) script myself.
>
>And mine was no formulas--just visualize and figure it out, with lots
>of chances for errors.But sounds like we are all agreed on the miter,
>and just need to settle on the bevel.

Finally, I got 6.827. I found this pretty tricky to visualize. Glad
some of you had formulas and programs, so I would know each time I got
a wrong answer!

Josh, are these the answers you expected?
--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

ER

Enoch Root

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 10:35 PM

DJ Delorie wrote:
> Enoch Root <[email protected]> writes:
>
>>Yours is closed source, so no way to check.
>
>
> Ok, here it is, check it. "woodlib.pl" just sets $in{} from the CGI
> variables.


> $x = atan(cos($angle)*tan($a));
> $y = asin(sin($angle)*sin($a));

s/b $a/2:

$x = atan(cos($angle)*tan($a/2));
$y = asin(sin($angle)*sin($a/2));

Though, I didn't verify on your page.

er
--
email not valid

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

19/01/2006 9:48 AM

alexy <[email protected]> wrote:

>"Relz" <[email protected]> wrote:

>>I guess I don't understand what you're saying. Could you or someone please
>>explain it to me?
>
>I'll try different terminology. I thin what you probably modeled has
>hip rafters at 5:12 rather than common rafters at 5:12.
>
>I don't have solidworks, but have another solid modeler. I'll try it
>and see what I get.
>
>>
>>I've modeled two sections of a ten-sided roof with a 5/12 pitch. I've
>>modeled two 1 x 4 "boards" that would join up on the theoretical middle of
>>the rafters. For the boards to come together in both miter and bevel, the
>>CAD software is still telling me that the miter should be 16.57358103
>>degrees and the bevel should be 7.12327393 degrees.

Actually, before I model, let me explain what I'd do, and see if what
you did is equivalent.

Start with a plan view of 1/20 of the gazebo: a right triangle with
(for convenience) a long leg of length 12.

Extrude this at 90 degrees, to a height greater than 5, leaving you
with a triangular prism.

on the surface defined by the long leg (not hypotenuse) of the first
right triangle: draw another right triangle consisting of the top of
this surface (12 units long), down one side 5 units, and the
hypotenuse.

Extrude cut (or whatever it is called in solidworks) with this
triangle to cut away the top of the prism.

What you have left is a solid that if reflected on the short side and
repeated 10 times at 36 degrees would be the gazebo (but don't do
that).

Look at the shape of the "roof" piece to get the miter cut.

Now define a plane perpendicular to the roof, and to the edge of the
roof that is the hypotenuse in the plan view. Look at the angle on
this plane of the intersection of the roof and the side. This is the
bevel cut.
--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

17/01/2006 11:34 AM

alexy <[email protected]> wrote:


> And unless one of you
>computer types want to "program" this solution in Excel <gasp!>, I'm
>not able to play around with the precision. My solution still causes
>brain strain when I try to reconstruct it! <g>

Never mind. I created a spreadsheet solution that duplicates the web
page cited here, and in so doing got my brain round the bevel angle.
--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

an

alexy

in reply to "Josh" on 13/01/2006 8:16 AM

22/01/2006 11:40 PM

kimnach <[email protected]> wrote:

>In article <[email protected]>, [email protected]
>says...
>
>>>in this specific case the result is:
>>> miter = pi/2 - [atan (cos(22.6) / tan (72)] = 16.7deg
>>> bevel = atan [cot(pi/2 - 22.6) * sin(pi/2 - 16.7) ] = 6.8degrees
>>
>>And I guess you can say that anyone that doesn't spot and correct the
>>mixed use of radians and degrees probably shouldn't be trusted with
>>such dangerous formulas!? <g>
>
>i just work in "degrians" until it's time to hit the calculator.

LOL! I'll have to remember that one!
--
Alex -- Replace "nospam" with "mail" to reply by email. Checked infrequently.

DD

DJ Delorie

in reply to "Josh" on 13/01/2006 8:16 AM

14/01/2006 11:00 AM


Enoch Root <[email protected]> writes:
> s/b $a/2:
>
> $x = atan(cos($angle)*tan($a/2));
> $y = asin(sin($angle)*sin($a/2));

$a is already halved. It's computed as $pi / $sides, not 2*$pi /
sides.

DD

DJ Delorie

in reply to "Josh" on 13/01/2006 8:16 AM

14/01/2006 1:09 AM


Enoch Root <[email protected]> writes:
> Yours is closed source, so no way to check.

Ok, here it is, check it. "woodlib.pl" just sets $in{} from the CGI
variables.

#!/usr/bin/perl
# -*- perl -*-

use POSIX;

$pi = atan2(1,1) * 4;

$original_email = '

From: "Robert Smith" <[email protected]>
Subject: Re: Best CAD Program for Woodworkers
Newsgroups: rec.woodworking
Date: Fri, 31 Oct 2003 13:51:59 GMT

Now to try and make the formula easier to understand we need to define two
variables. The number of sides will be in variable "s". The angle of the
sides, which we just calculated will be in variable "b"
Just plug the correct values in this short formula and you will have your
answer

a=360/s
x=arctan((cos b)*tan(a/2))
y=arcsin((sin b)*sin(a/2))

The "x" value will be the angle that you set your cross cut to.

The "y" value will be the angle that you set your saw blade to.

';

require "./woodlib.pl";

$sides = $in{'nsides'};
$angle = $in{'angle'};

$sides = 4 unless $sides > 0;
$angle = 0 unless $angle > 0;

if ($angle =~ m@([0-9\.]+)/([0-9\.]+)@) {
($rise, $run) = ($1, $2);
$angle = atan2($rise, $run);
} else {
$angle = $angle * $pi / 180;
}

$a = $pi / $sides;

$x = atan(cos($angle)*tan($a));
$y = asin(sin($angle)*sin($a));

print "Content-type: text/html\n\n";
print `header Compound Cut Calculations`;

print "<center><table>";

&row("Number of sides:", $sides);
&row("Angle of sides:", $angle * 180/$pi);
&row("<br>", "");
&row("Cross Cut Angle:", $x * 180/$pi);
&row("Blade Angle:", $y * 180/$pi);

sub row {
$v = $_[1];
if ($v =~ m@[0-9]\.@) {
$v = sprintf("%.1f", $v);
}
print "<tr><td align=right nowrap>$_[0] </td><td align=right><tt>&nbsp; $v</tt></td></tr>\n";
}

print "</table></p>";

print "<p><a href=\"compound-cuts.html\">Return to the Form</a></p>\n";

print "</center>";

print `trailer`;

DD

DJ Delorie

in reply to "Josh" on 13/01/2006 8:16 AM

13/01/2006 10:19 PM


"Josh" <[email protected]> writes:
> What would the formula be for N sides with a roof pitch of A degrees?

There's a reason why I have a web page to do this:

http://www.delorie.com/wood/compound-cuts.cgi?nsides=10&angle=5/12
http://www.delorie.com/wood/compound-cuts.html

Number of sides: 10
Angle of sides: 22.6

Cross Cut Angle: 16.7
Blade Angle: 6.8

DD

DJ Delorie

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 9:25 PM


"Morris Dovey" <[email protected]> writes:
> You're obviously having too much fun with this. Just to open things
> up a bit for all the people who don't have bc (but _do_ have a C
> compiler):

If you have neither bc nor a C compiler, my script uses the same math
(and allows for rise/run too):

http://www.delorie.com/wood/compound-cuts.html

DD

DJ Delorie

in reply to "Josh" on 13/01/2006 8:16 AM

16/01/2006 9:24 PM


Enoch Root <[email protected]> writes:
> Hah, that's gorgeous... 5/12 is the pitch along a line perpendicular to
> the direction of the slope, but the rafters are not that. :)

Except for the corner ones, my rafters are. They have to run parallel
to the seams in the plywood sheathing.


You’ve reached the end of replies