Determine the angle from the origin for each of 2 planes when both are rotated about perpendicular axes

geometrytrigonometry

I'm sure this question has been asked before. In fact, there is likely a free online calculator out there that will solve it for me, except I'm not sure what terms to search for so I'm having a hard time finding them. My math skills are fairly rusty, so please explain it to me like I'm in high school (or Jr. high… I'd be OK with that, too).

BACKGROUND:
I'm building a climbing wall in the corner of my basement. Note that this is the corner–we have 2 walls that meet at 90 degrees and I'm building onto both of them. For the top part of the wall, I want to have the wall angle inward to make it more challenging. The lower part of the wall is easy since it will go straight up from the floor–the plywood that goes up will sit one edge on the floor, one face against the wall, and then the edges of each of the 2 will meet up nicely with no modifications needed. Since the top part is angling inward, though, I'll need to cut a triangle out where the edges of the boards meet. I want to know HOW to determine the angle to cut each sheet. For simplicity, let's ignore the bottom section completely and assume the entire wall will be angled inward.

PROBLEM:
Assume I have 2 walls. One is in the X,Y plane and the other is in the Y,Z plane. We will call the point where both walls and the floor meet the origin. I have a 2 sheets of plywood that are 4×4 squares. I want to mount the plywood such that:

  1. the first starts on the X,Y plane, but is then rotated 20 degrees about the X axis such that the bottom is still on the X axis (On the line {0,0,0}, {0,4,0}), but the top comes in (positive Z value).
  2. the second starts on the Y,Z plane, but is then rotated 30 degrees about the Z axis such that the bottom is on the line ({0,0,0}, {0,0,4}) and the top comes in (positive X value).
    I need to know the angle to cut each sheet of plywood.

MUSINGS:
At first I thought I could just cut one at a 20 degree angle and the other at a 30 degree angle, but then I got to thinking: If I angled just one in at 30 degrees and left the other flat on the wall (0 degrees), then, yes–that one could be cut at 30 degrees and it would work. However, if I angled the second all the way down to the floor (90 degrees) then it wouldn't need to be cut at all. Since both are angling on each other, I think it is more complicated than simply cutting at the angle I want the other wall.

I know how to use trigonometry to determine how far away from the wall the top will be and stuff like that, but I don't know how to put the 2 together. I've tried using GeoGebra, but I can't quite figure out how to get it to tell me the solution. I did get a nice picture, though. I include it for reference:

Rendering of 2 walls
And since 3D is hard to show on 2D screens, here's another angle:

Second rendering of same

HOW do I determine the angles to cut? Are you aware of any tools out there that would solve this for me or are there search terms I should use to look for one myself?

Best Answer

I made a figure with GeoGebra, representing your two sheets (blue and red). As you can see, they intersect along a line forming an angle of $28.481°$ with the side of the red sheet, and an angle of $17.495°$ with the side of the blue sheet.

enter image description here

EDIT.

It is not so difficult to find an exact expression for those angles. Consider for instance the square on $yz$-plane, before rotation. This square then undergoes a 30° rotation, carrying it to the blue square. Its vertex $P=(0,4,0)$ is carried by the rotation to $P'=(2,2\sqrt3,0)$ (endpoint of a blue side), whose projection on $x$-axis is $H=(2,0,0)$. Point $P''$, which is the intersection of the side of the blue square parallel to $z$-axis with the red square, has then coordinates $P''=(2,2\sqrt3,2\sqrt3\tan20°)$.

If $\theta=\angle P'OP''$, it follows $$ \tan\theta={2\sqrt3\tan20°\over 4}, \quad\text{and}\quad \theta=\arctan{\sqrt3\tan20°\over 2}\approx17.495. $$ A similar reasoning leads to $$ \tan\phi={2\cos20°\over 2\sqrt3}, $$ where $\phi$ is the other angle to be found.