Questions tagged [line-intersection]

A common problem in is to find the intersection of two lines.

In the common case in two dimensions, the result is a point, which can be expressed as a parameter along one or both of the lines. For rays and line segments, the intersection of the containing lines is computed, then its parameters are checked to see whether the intersection falls within the subset of the line.

Common approaches produce poor answers for lines that are (nearly) parallel, so often an angle test is performed first. Parallel rays and line segments can intersect in a ray or line segment rather than a point.

Special search structures exist for finding intersections among many line segments.

In more than two dimensions, almost all pairs of lines have no intersection, but skew lines can be projected into the unique plane (through the origin) parallel to each. The intersection in that plane identifies the point of closest approach between the lines.

125 questions
-1
votes
1 answer

how to connect 4 random points with 4 no intersecting line segments?

The points are in a plane,marked with two numbers indicating coordinates.give out a connect sequence.
-2
votes
1 answer

XML/KML - How to test if a polygon 'touches' another polygon in a bash script

I am using Google My Maps to map a suburb (as a polygon) on one layer and then on a second layer, all the (rural) properties (also as polygons) that exist in and around that suburb. The polygons are using geo coordinates to define the points. Eg…
owl770
  • 19
  • 4
-2
votes
3 answers

how many line segments will intersect in a plane will intersect with a horizontal line ? what will be the most effective way to find this

I’m trying to solve this Cyberchef challenge: You are given N points in a plane (numbered 1 through N); for each valid i, the i-th point is Pi=(i,Ai). There are N−1 line segments between them (numbered 1 through N−1); for each valid i, the i-th…
user12856563
-2
votes
1 answer

Test is two lines are intersecting

So this question already has many answers but i was not able to find one for my specific problem. I have a very special case with only positive integers where always a line has always either the same x-values or the same y-values. I have two such…
MegaIng
  • 7,361
  • 1
  • 22
  • 35
-3
votes
1 answer

Calculation of intersection points of two lines returns -1.#IND in CSV-file

In my software I try to calculate the intersection points of two lines. I start with four double variables for the first line (two for x/two for y), and four double variables for the second line. The math is clear to me, and on paper it's working.…
user3794592
  • 183
  • 2
  • 16
1 2 3
8
9