Solve angles of a trapezoid

For questions about using Classic.

Post » Sun Jan 18, 2009 11:25 pm

this isnt really related to construct, but i cant seem to find out how to solve the angles of a trapezoid, with all given side lengths.

i know its possible, because theyre are calculators on the internet, i just cant seem to find out HOW to do it.

anyone here know how?

this is what i need to know sorta

http://www.1728.com/quadtrap.htm
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Jan 18, 2009 11:42 pm

Have you peeked at the javascript on that page? ;)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Jan 19, 2009 12:46 am

i dont know how :lol:

EDIT: is this it?
[quote:2jhgahsb]angA=(Math.atan(height/xval))*k1;
if(angA<0){angA=angA+180};
angB=180-angA;
angD=(Math.atan(height/adj))*k1;
if(angD<0){angD=angD+180};
angC=180-angD;[/quote:2jhgahsb]

i dont know how to use java, this is the first time ive ever looked at it, but it seems pretty simple.
im just wondering what does math.atan mean? does it just mean atan? also what is k1? and what is xval? what is adj (adjacent im guessing)? srry for all the questions, i just want to be sure of what im doing.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Mon Jan 19, 2009 1:19 am

Yeah, atan is probably just inverse tangent, and xval, adj and other variables are probably defined earlier in the code.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Jan 19, 2009 7:13 am

Yikes, that's more complicated than I thought it would be.
Here's what I would suggest:



Divide the trapezoid into two triangles by drawing AC. Now instead of having all four sides pretend that you have the three sides and angle of your choice. Let's pretend you know b, c, d and angle B. Then you can solve triangle ABC. Drop a line down from B perpendicular to AD and you can solve the right triangle you just made. This gives you the height. Solve the corresponding right triangle on the other side of the trapezoid. At this point solving the rest of the trapezoid is simple.

Once you've got all those equations written down you should have enough equations to solve for any four unknowns. So you should be able to use those same equations to solve the trapezoid given the four side lengths.

Just a thought, sorry I'm too lazy to go through all the math. But anyway this method avoids having to use the expression they give for the height. (I don't like using expressions I can't derive.)
B
3
S
2
G
4
Posts: 271
Reputation: 2,017


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests