Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Finding coordinates of unkown point in right angle triangle


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 jack_1313   Members   -  Reputation: 536

Like
0Likes
Like

Posted 14 February 2007 - 10:21 PM

Hello. I’m trying to find the coordinates of an unknown point © in a right angled triangle. Allow me to attempt to demonstrate:
                          _ B
                     __*** |
            AB__***        |
        __***              |BC
  __***                   _|
_*_______________________|_|
A                           C?

I need to find C given A, B, AB and BC

I know the points A and B and therefore know the length of the side connecting them (AB). I also know the length of BC and that there is a right angle at point C. Finding the length of AC using Pythagoras and the unknown angles using trigonometry is trivial. The problem is that I do not know how to find the coordinates of point C efficiently. I already know I can test a circle centred on the midpoint of AB, diameter equal to that sides length, with a circle centred on B, radius equal to the length of BC. I’d prefer to avoid doing this though as it seems like an overkill, and I am hoping for the fastest method as this calculation will be a vital part of a path finding routine and will be called upon hundreds of times in one search (the true problem is finding a tangent to a circle that runs through a given point). Thanks for any help, Jackson Allan.

Sponsor:

#2 Noldorin   Members   -  Reputation: 351

Like
0Likes
Like

Posted 14 February 2007 - 10:43 PM

I'm not quite sure what you mean here. Isn't point C simply at (X of B, Y of A)? Please give us an example of where point C could be relative to any of the other points.

#3 jack_1313   Members   -  Reputation: 536

Like
0Likes
Like

Posted 14 February 2007 - 10:58 PM

Sorry, my attempted diagram is misleading. The x and y coordinates of the two known points can be anywhere and are probably not going to be aligned with the axis. They could be anything. There are also two solutions to this problem.

#4 Skizz   Banned   -  Reputation: 794

Like
0Likes
Like

Posted 14 February 2007 - 11:04 PM

This is a link to a site that details the general solution for the intersection of two circles. Using equation (5) you can work out the point on AB where a line perpendicular to AB passes through C. Equation (7) gives the distance along the perpendicular to C. Note that there are two solutions.

Skizz

#5 jack_1313   Members   -  Reputation: 536

Like
0Likes
Like

Posted 14 February 2007 - 11:17 PM

Thank's for that, but the intersecting circles method is the one I'm already using to solve this problem. I was hoping their would be a method that performs quicker (not involving several square roots).

Edit: I'm having a good read through the link now, please excuse me if I've dismissed it prematurely.

#6 0BZEN   Crossbones+   -  Reputation: 2021

Like
0Likes
Like

Posted 14 February 2007 - 11:39 PM

I can see the obvious arccosine (angle(B) = acos(BC / AB)), and generating a point 'D' at the perpendicular of AB at B, and working from that.

It's still not nice.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS