Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
182 views

I'm looking for help to solve the following situation. I have a line segment defined by two points P1 and P2. And I have a ray that starts at P3 and intersects segment P1P2 at P4. I want to calculate ...
jpwrunyan's user avatar
  • 530
0 votes
0 answers
112 views

I have two GeoDataFrames, one is composed of LINESTRINGs ('orig_layer'), and the other of MULTILINESTRINGs ('model_layer'). Both are completely overlap each other - only their line attributes are ...
Ravid's user avatar
  • 1
1 vote
1 answer
49 views

Code from bezier.js works great for all other examples I've checked. Except for this one: const controlPoints = [450,50,300,183,150,150]; const line = { p1: {x: 400, y: 0}, p2: {x: 400, y: 100} } ...
Malik's user avatar
  • 35
0 votes
0 answers
62 views

Allow me to describe the situation. I have a 3D triangular mesh with N triangles (approx. 1e5 triangles) and M lines (in the same order of magnitude as the triangles but not necessary the same number)....
juan zaragoza's user avatar
0 votes
2 answers
161 views

The below source code is supposed to find an intersection between two curves. However, the function is unable to detect the intersection point. How can I fix it? using MathNet.Numerics.Interpolation; ...
user366312's user avatar
  • 17.5k
0 votes
3 answers
187 views

My task is to find the intersection point of two arcs on the sphere (if it exists). I used algorithm from http://www.boeing-727.com/Data/fly%20odds/distance.html but in some cases the latitude ...
Remerd's user avatar
  • 19
0 votes
1 answer
70 views

I’d like to program a game in processing (Java) in which the player draws a possibly curved line and next makes a dot on this line. I think, I would draw the line only with pixels, not lines oder ...
Ingo's user avatar
  • 1
0 votes
1 answer
146 views

As a part of the Greiner-Hormann algorithm for polygon-clipping (described here), there is this subroutine: In image form: And transcribed (attempted): intersect(P1,P2,Q1,Q2,alphaP,alphaQ) WEC_P1 = ...
NicknEma's user avatar
  • 498
0 votes
1 answer
1k views

I saw this asked but I couldn't understand the answers! I got 4 vector2s, P1 & P2 for line 1, P3 & P4 for line 2. Code for intersection position works, but how do I check if that intersection ...
weg's user avatar
  • 27
0 votes
0 answers
371 views

I have two points in my world, P0 and P1 (xyz,..) which basically represent the start of my line and the end of my line. I also have a plane/side with 4 points, ABCD (xyz,..). What I want to do is ...
yoranus's user avatar
  • 45
0 votes
0 answers
137 views

I'm trying to find the point where 2 lines intersect. I am using this example on geeks for geeks. This works well for small numbers. I am using "accurate" latitude and longitude points which ...
av4625's user avatar
  • 373
0 votes
1 answer
59 views

I'm working on a mapping project (with the Google Maps SDK). Before drawing a line segment on the map I check to see if it intersects with any existing lines. I'm experiencing a situation where the ...
flyingMonkeys's user avatar
0 votes
1 answer
276 views

I have 2 layers with links and nodes: layer A (yellow) and layer B (blue). I would like to get the places where the lines of layer A intersect with the lines of layer B (red nodes), directly in python....
fschuch's user avatar
  • 27
0 votes
0 answers
24 views

I'm trying to plot an animal's trajectory from a set of coordinates as a line segment. I want to see how many coordinates are plotted inside a circular zone vs outside. I think that coordinates which ...
lara202's user avatar
  • 11
1 vote
1 answer
634 views

I'm finding how to find intersection point between circle and line(2 points) using Mapbox(Turf). Turfjs provides "intersect" function but Turf in java doesn't provide that function. I wonder ...
Seok Hyun Cheong's user avatar
1 vote
0 answers
740 views

When I use the line intersection plugin in Qgis, it doesn't create whole intersect points. Also, the gif and picture below show that the lines intersect but the plugin doesn't assign any point to them....
ayça tabakoğlu's user avatar
0 votes
3 answers
680 views

I am trying to find the vector or angle in order to calculate the points where two "thick" lines would intersect. The end goal is to draw simple flat planes for a thick line renderer. ...
jpwrunyan's user avatar
  • 530
1 vote
0 answers
1k views

In this picture, I try to fin intersection points between the long white lines between racing lanes and the short perpendicular ones So to automaticaly obtain the black points as materialized below ...
fenaux's user avatar
  • 47
2 votes
2 answers
4k views

Different articles have discussed about the intersection of two line segments in Python such as How do I compute the intersection point of two lines?, Numpy and line intersections, How can I check if ...
Javad.Rad's user avatar
-2 votes
1 answer
419 views

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 ...
owl770's user avatar
  • 29
3 votes
2 answers
1k views

Basically, a function that fulfills this signature: function getLineIntersection(vec2 p0, vec2 direction, vec2 p2, vec2 p3) { // return a vec2 } I have looked around at existing solutions, and ...
Ryan Peschel's user avatar
2 votes
1 answer
214 views

I am trying to find a method for finding the point of intersection of 2 hyperbolae in R. Single-branch hyperbloae can be described by the following equation: or where (xi, yi) and (xj, yj) are the ...
hugh-allan's user avatar
  • 1,410
0 votes
1 answer
2k views

I have this simple code that plots two intersecting lines: x <- c(1,2,3,4,5,6) y2 <- c(6,5,4,3,2,1) y1 <- c(1,2,3,4,5,6) plot(x, y1) plot(x, y1, type="o", col="blue", pch=&...
maurobio's user avatar
  • 1,607
2 votes
1 answer
2k views

I need to find every point of intersection of lines in my code. At these points, I want to put my game pieces. The logic of the game is like that of tic tac toe in which if a player places 3 same ...
shyckh's user avatar
  • 57
0 votes
1 answer
220 views

What is the most efficient algorithm for generating a set of line segments that represent the minimum of a group of line segments (see image)? The resulting line segments should have following ...
Darko's user avatar
  • 609
-2 votes
3 answers
1k views

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 (...
user avatar
1 vote
1 answer
397 views

I'm thinking of making an online version of the game Sprouts, possibly using the JavaScript web browser graphics library p5.js You can read more about it but basically there are 2 players that draw ...
user avatar
3 votes
1 answer
1k views

I'm looking to find the intersect of 2 lines using Cramer's rule. This is for an exercise from the book An Introduction To Java Programming (Exercise 3.25 from Chapter 3 and 8.31 from Chapter 8. They ...
Sruly's user avatar
  • 179
1 vote
2 answers
1k views

I was looking for a solution for finding the intersection point of two lines. I am aware that this can be done by finding their vector product. I stumbled upon this example here: Numpy and line ...
Shibalicious's user avatar
2 votes
1 answer
264 views

I am trying to find intersection point of opposite lines of two lines: var ax=0.00, ay=0.50 ; var bx=1.00, by=1.00 ; var cx=2.00, cy=0.25 ; But I am very confused about finding an opposite of a line. ...
Digerkam's user avatar
  • 1,949
0 votes
1 answer
449 views

Given the position and dimensions of a square, what is the equation in JavaScript for testing if a line goes through the rectangle? What I have tried so far is: function isSquareIntersectingLine(...
user avatar
3 votes
1 answer
5k views

I have 4 lines segment, A, B, C and D. Each line is represented as two points. Eg. line A is represented as point A1 and point A2. What I want is point X, which is the point where line A ray ...
Syaiful Nizam Yahya's user avatar
1 vote
0 answers
603 views

I'm trying to implement the sweep line algorithm for circle intersections in which an intersection occurs iff the euclidean distance between the circles' origins are <= the sum of both radii. (...
CreativeName's user avatar
0 votes
1 answer
2k views

I have a rectangle and a line segment inside the rectangle, and the line can be extended on both sides. I know the coordinates of the rectangle's four vertices as well as the line's two vertices. I ...
Yhqjlyr's user avatar
  • 21
2 votes
1 answer
2k views

I've generated random streets using Shapely's LineString function using the following code: class StreetNetwork(): def __init__(self): self.street_coords = [] self.coords = {} def ...
Jack's user avatar
  • 413
2 votes
1 answer
171 views

I have two pairs of data sets, x1 vs y1 and x2 vs y2. x1, y1, x2, y2 all have uneven distribution of data represented by the following images: My problem is to determine the intersection of the two ...
John CAE's user avatar
1 vote
1 answer
357 views

Given the first line from a to b where a < b and the second line from x to y where x < y, how do you calculate the intersection length of those two? Example: a =0, b=5, x=3, y=7 012345 |----...
Isitar's user avatar
  • 1,469
0 votes
1 answer
391 views

I have two sets of data curves, x1,y1 and x1,y2. I wish to find the intersection between these two curves. However, I do not have the equation for x1,y1. Moreover, when using traditionnal intersection ...
Lu_'s user avatar
  • 1
6 votes
0 answers
1k views

I know there are various discussions on SO about line intersections and the math behind it. I am familiar with the math. This post nicely explains an algorithm one can implement: Determine if two ...
codingknob's user avatar
  • 11.8k
0 votes
1 answer
383 views

I want to find the closest intersection point to multiple lines/vectors in 3D space but I want to weight the influence of each vector based on its length (the greater its length, the greater its ...
Jean-François Bourdon's user avatar
-2 votes
1 answer
669 views

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 ...
MegaIng's user avatar
  • 7,954
1 vote
1 answer
2k views

I've got a pandas dataframe where each column represents the y values of a descending line from 1 to 0 and the indexes represent the x values. Now I'm interested in finding the intersection points ...
Jurgy's user avatar
  • 2,380
1 vote
4 answers
1k views

Let's say I have such a polygon public partial class Window2 : Window { public Window2() { InitializeComponent(); var myPolygon = new Polygon(); myPolygon.Stroke = ...
codeDom's user avatar
  • 1,849
0 votes
0 answers
496 views

I've been searching for a while but haven't found exactly what I'm looking for. I'm working on an app that will go in a race car. It will give the driver the ability to press a button to mark a ...
kfrosty's user avatar
  • 815
1 vote
1 answer
1k views

I want to define a bounded plane, ie a rectangle in 3d space. I realize it could be defined just by declaring its 4 vertices, but I will be using a line intersection algorithm many times on this shape ...
Theo Walton's user avatar
  • 1,115
1 vote
0 answers
380 views

I wrote a short directed graph viewer that generates random nodes and random directed relationships between nodes and presents them on screen. The nodes are currently positioned sequentially as a ...
MathuSum Mut's user avatar
  • 2,855
1 vote
1 answer
62 views

I'm looking at the Planarity model's "crossed?" method from the Models Library in order to determine if two lines are intersecting. This model seems to be working for the most part; however, there ...
mattsap's user avatar
  • 3,816
0 votes
1 answer
388 views

I'm working on a geo project and have some question about that. I draw line with latitude longitude data like the picture below. 1,2,3 are the position I get from db. I want to draw line on that route ...
Burak's user avatar
  • 135
14 votes
4 answers
32k views

I have a line and a triangle somewhere in 3D space. In other words, I have 3 points ([x,y,z] each) for the triangle, and two points (also [x,y,z]) for the line. I need to figure out a way, hopefully ...
Kaito Kid's user avatar
  • 1,123
5 votes
4 answers
9k views

I have a skeletonised image (shown below). I would like to get the intersections of the lines. I have tried the following method below, skeleton is a openCV image and the algorithm returns a list of ...
James Paterson's user avatar