0
$\begingroup$

I have two distinct line segments on a cartesian plane, which may or may not interest. The line segments are defined by their endpoints $((x_{1},y_{1}),(x_{2},y_{2}))$ and $((x_{3},y_{3}),(x_{4},y_{4}))$.

Now, imagine that the endpoints of these two line segments are connected such that the connections do not intersect. You should be imagining the formation of one triangle(when the two lines share an endpoint), two triangles(when the endpoint of one line is on the other line but not the other line's endpoint), three triangles(when one line goes through the other line but not one of it's endpoints), or a trapezoid(the lines do not touch).

Given a new point on the plane $(x_{5},y_{5})$, how can I tell if that point is within the bounds of the polygons created between the two lines?

$\endgroup$
4
  • $\begingroup$ aren't you going to need four points to define the two line segments ? $\endgroup$
    – WW1
    Jul 6, 2019 at 20:29
  • $\begingroup$ Sorry, edited the post to clear up any confusion about that. $\endgroup$ Jul 6, 2019 at 20:32
  • $\begingroup$ I expect that it’ll come down to comparing the signs of certain $3\times3$ determinants. $\endgroup$
    – amd
    Jul 6, 2019 at 21:16
  • $\begingroup$ Why the discussion of triangles? In general you use the line equations and insert the point x,y into it to find which side it is - the fifth point share the sign with the given points $\endgroup$
    – Moti
    Jul 7, 2019 at 1:06

0

You must log in to answer this question.

Browse other questions tagged .