# Solve angles of a trapezoid

For questions about using Classic.

### » 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

B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

### » Sun Jan 18, 2009 11:42 pm

Have you peeked at the javascript on that page?
Scirra Founder
B
413
S
244
G
92
Posts: 25,104
Reputation: 199,850

### » Mon Jan 19, 2009 12:46 am

i dont know how

EDIT: is this it?
[quote:2jhgahsb]angA=(Math.atan(height/xval))*k1;
if(angA<0){angA=angA+180};
angB=180-angA;
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
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

### » 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
413
S
244
G
92
Posts: 25,104
Reputation: 199,850

### » 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 7 guests