Search Unity

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

Discussion in 'Scripting' started by twangsta, Apr 25, 2013.

  1. twangsta

    twangsta

    Joined:
    Mar 28, 2013
    Posts:
    17
    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 :)

    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 :)
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
  3. twangsta

    twangsta

    Joined:
    Mar 28, 2013
    Posts:
    17
    Hey thanks for that link, saw a few points in there that'll give me my solution :D