Checking if a Point is on a Line - Jay's Query

  • Thread starter Thread starter inadaze
  • Start date Start date
  • Tags Tags
    Line Point
AI Thread Summary
To determine if a third point is on a line defined by two points on a Cartesian plane, compare the slopes of the segments formed by the points. If the slope between the first two points (p1 and p2) is equal to the slope between either of the first two points and the third point (p3), then all three points are collinear. This method can be implemented in programming for game development to validate user input. Ensuring accurate slope calculations will allow for effective checking of the point's position relative to the line. This approach is essential for enhancing user interaction in the game.
inadaze
Messages
20
Reaction score
0
Hey,
I was wondering:
If I had two points connected by a line on a cartesian plane(x and y for this) and i wanted to draw a third point, how could i tell if the third point was drawn somewhere on the line? I am programing a game where there is already a line drawn to connect to points and the user is supposed to draw a third point. i want to be able to check if it was drawn on the line or not.

Thanks
Jay
 
Mathematics news on Phys.org
Let p1 and p2 be the original two points, and p3 the third point. If the slopes between p1 and p2 is equal to that between p1 and p3 (or p2 and p3), then the three points lie on the same line.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
10
Views
2K
Replies
12
Views
1K
Replies
2
Views
2K
Replies
2
Views
2K
Replies
3
Views
1K
Replies
2
Views
1K
Replies
16
Views
3K
Back
Top