Be seen. Boost your question’s priority for more expert views and faster solutions

I have a right angle triangle and I know two cordinates and the length of all thres sides. I need to find the third cordiante in VB. e.g. I have (0,0) and (3,0) and lengths as 3 (for base), 4 (for perp), 5 for (hypoteneous). How to find third cordinate in VB?

Help Req.

Help Req.

Sin(angle) = Side opposite/hypotenuse

Cos(Angle) = side adjacent/hypotenuse

you can also use the Pythogorean theorem:

H^2 = A^2 + B^2

However, this IS NOT a VB question, but rather a basic question about Trigonometry and Algebra.

If you take the time to read the original question, He/She states EXPLICITLY that they are working with RIGHT TRIANGLES.

Let A be the left side of the triangle, B be the base of the trinangle, C the right Side. ThetaA the angle between side A and side B, ThetaB the angle between side B and side C.

First, the A + C must be > B (or it won't form a triangle, the sides are too short.

Next

B = A Cos(ThetaA) + C Cos(ThetaB)

A Sin(ThetaA) = C Sin(ThetaB)

You now have two equations w/ two unknowns (ThetaA & ThetaB). Solve for ThetaA & ThetaB

But wait, we are not done yet, we need to calculate the coordinates for that point. If we assume the base is horizontal (if not, we need to do some more trig), we can calculate the offsets from the intersection of sides A & B by:

DeltaX = A Cos(ThetaA)

DeltaY = +/- A Sin(ThetaA) (two solutions, one where the point is above line B, one where it is below line B)

The Y cord is the length of A, X cord is either 0 (the x position of the intersection of A & B) or B (the intersection of B & C).

Clear.

For a base that could be at an angle,

ThetaBase = Atn((BaseYRight - BaseYLeft) / (BaseXRight - BaseXLeft)

XCoord = A Cos(ThetaA) + B Cos(ThetaBase) + BaseXLeft

YCoord = +/- A Sin(ThetaA) + B Sin(ThetaBase) + BaseYLeft

DO NOT ACCEPT THIS COMMENT AS AN ANSWER. If you have further comments on this question or the recommendation, please leave them here.

aqk139,

Some of these questions have been open for some time, and records indicate you logged in as recently as last week. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days.

http://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20202508

http://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20255526

http://www.experts-exchange.com/jsp/qShow.jsp?ta=oracle&qid=20167212

http://www.experts-exchange.com/jsp/qShow.jsp?ta=oracle&qid=20165928

http://www.experts-exchange.com/jsp/qShow.jsp?ta=oracle&qid=20141926

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20243322

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20207867

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20207526

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20191215

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20183720

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20180355

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20175537

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20175003

Thanks,

Netminder

Community Support Moderator

Experts Exchange

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.

Unfortunately you cannot have one. There are two possible answers to this problem: Think about a mirror image of the triangle, flipped along the side defined by the two points you have - you cannot know which of the two answers is correct.

So, how would you like a general function which takes two coordinates and three lengths, and returns two sets of two coordinates represenging the two possible answers? Or do you have any extra information which would help you determine which of the two possible positions for the third point you want.