Solve angles of a trapezoid

This forum is currently in read-only mode.
  • 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

  • Have you peeked at the javascript on that page?

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

    angD=(Math.atan(height/adj))*k1;

    if(angD<0){angD=angD+180};

    angC=180-angD;

    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.

  • Yeah, atan is probably just inverse tangent, and xval, adj and other variables are probably defined earlier in the code.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yikes, that's more complicated than I thought it would be.

    Here's what I would suggest:

    <img src="http://www.1728.com/quadtrp7.gif">

    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.)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)