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

Reply to
Josh
Loading thread data ...
5/12 pitch is 5 divided by 12 x 90 = degrees. 37.5

Reply to
Doug Schultz

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.

Reply to
alexy

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.

Reply to
alexy

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

Reply to
Josh

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

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!

This is the point where the prof says "The generalization is trivial, and is left as an exercise for the class."

Reply to
alexy

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

Reply to
Josh

I got 8.35287747524613872127

er

Reply to
Enoch Root

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

Reply to
Enoch Root

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

formatting link
of sides: 10 Angle of sides: 22.6

Cross Cut Angle: 16.7 Blade Angle: 6.8

Reply to
DJ Delorie

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:

formatting link
tossed up the (interactive!) script myself.

er

Reply to
Enoch Root

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

er

Reply to
Enoch Root

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" 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 "";

&row("Number of sides:", $sides); &row("Angle of sides:", $angle * 180/$pi); &row("", ""); &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 "$_[0]   $v\n"; }

print "";

print "Return to the Form\n";

print "";

print `trailer`;

Reply to
DJ Delorie

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.

Reply to
alexy

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

Reply to
Enoch Root

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

Reply to
DJ Delorie

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

er

Reply to
Enoch Root
[snip]

I got the definition of Asin messed up.

should be:

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

er

Reply to
Enoch Root

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?

Reply to
alexy

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

Reply to
Josh

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.