given three points, join two and find the tangent on the line to the third point

Hi Folks,

I need a bit of help here as my maths is very rusty.

Given three points:

  1. join any two to make a line
  2. draw a perpendicular to the line from the remaining point
  3. what’s the point at which this tangent intersects the first line?

Thanks in advance :slight_smile:

I’m thinking in these steps:

  1. find the slope of the first line.
  2. find the perpendicular slope of the slope from step 1
  3. find the line passing through the third point taking that slope from step 2
  4. find the point of intersection solving x,y for the two lines.
    … it’s been 20 years since I last used any maths, need to revise it all.

In the mean time I’d really really appreciate some help on this for now :slight_smile:

hmm… there was a wiki post which had loads of these types of functions worked out, but the page isn’t loading for me… found the original forum post though:

http://forum.unity3d.com/threads/126575-3d-Math-functions

in case its just me, the bookmark i’ve got for them is: http://wiki.unity3d.com/index.php/3d_Math_functions

Hey thanks for that link, saw a few points in there that’ll give me my solution :smile: