Thread
:
[Math] Rectangle Problem
View Single Post
Andy-M
2008-03-13 #
2
Yup it's simple geometry.
A is the sum of the lengths of the longer edge of one triangle and the shorter edge of the other. B uses the other edges.
So essentially you're going to need to solve for all of the smaller triangles (which is only two or four lengths since two sides are known).
Since you know x and y, we can apply Pythagorean. I'll refer you to a tutorial I wrote in my blog:
http://www.ultrashock.com/blog/andy-...inates-30.html
If you use some geometry, you'll find that the smaller triangles are just scaled down versions of the bigger one. i.e. the angles should all be the same: theta, 90-theta, and 90.
Anyway in short I will combine the lengths from two triangles and I should get formulas like this (I'll represent theta as t):
A = A1 + A2 = x*cos(t) + y*sin(t)
B = B1 + B2 = y*cos(t) + x*sin(t)
Where A1 and A2 represent two parts of A as defined by the triangle. The same is with B.
I'm able to arrive at the first term for the equation for A by:
cos(t) = adjacent/hypotenuse = A1/x. Rearrange this to get A1 = x*cos(t). Repeat for other 3 terms.
Andy-M
View Public Profile
Visit Andy-M's homepage!
Find all posts by Andy-M