Results 1 to 5 of 5

Thread: [RESOLVED] Right Triangle Solve for 3rd Point Coordinate

Threaded View

  1. #3

    Thread Starter
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Right Triangle Solve for 3rd Point Coordinate

    Quote Originally Posted by techgnome View Post
    I haven't given it too much thought, but it should be simple... with a right triangle, you have three known angles, a 90, and two 45s. If you normalize the 90 angle at 0, and mark it with x0,y0... and mark the upper angle with x1,y1 and give it the coordinate of 0,1, the lower right coordinate becomes x2,y2 with a coordinate of 1,0 ... you'll see that this pattern repeats... no matter what the coordinate is for x0,y0, the coordinate for x2,y2 is simply the flipped values of x1,y1 such that x2=y1 and y2=x1.

    Maybe... that works for right triangles that are perfectly flat... I didn't take into consideration rotation of any kind... and I don't have graph paper to try it out... dang... I may have just gotten that all wrong... in fact, I'm sure I have... never mind.

    -tg
    The problem is, is that the right triangle is not gonna be 45 45 and 90. You have 90 since its a right triangle, another angle which can literally be anything, and 2 known 2d coordinates. The reason why this particular angle is known is because it is against a line segment that the ball collided into. So my known 2 points are the balls position, and the predicted collision point. For me to get the length of this side, I can do the distance formula. Sqrt(x2- x1)^2 + (y2-y1)^2). Now i know the length of the side. The line segment it collided into has a direction its facing, kind of a reverse perpendicular normal of the line segment, which i can use to multiply to this side. And believe it or not, this now gives me the length of side 2! Doing an arccos(b/c) * 180/PI to the 2 known sides now gives me the angle of those 2 sides. Now given that, how do i get the 3rd coordinate point?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width