Results 1 to 2 of 2

Thread: points on a line

  1. #1

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    points on a line

    I expect this has been asked before...

    How do I calculate points on a line?

    If I have to points (x1,y1) and (x2,x2) how do I calculate any y value for a given x?

    so if x1< x < x2 how do I calculate y?

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Equations for line.

    There are several useful equations for a line. Here are some of them.
    • Y = M*X + Y0, where M is the slope and Y0 is the Y-Intercept (value of Y when X is zero).
    • (Y - Y1) = M*(X - X1), where M is slope and (X1, Y1) is a known point on the line.
    • (Y - Y1) = (Y2 - Y1)*(X - X1)/(X2 - X1), where (X1, Y1) and (X2, Y2) are points on the line. I think this is the equation you want.
    • X/A + Y/B = 1, where A and B are the X-Intercept and the Y-Intercept.
    The third equation will work for any value of X. X need not be between X1 & X2.

    When using the second and third equations for computations, Y1 is usually changed in sign and put on the right side of the equals sign. The equations are shown as above because they are slightly easier to understand that way.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

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