geometry Questions

11

Solved

I have two lines that intersect at a point. I know the endpoints of the two lines. How do I compute the intersection point in Python? # Given these endpoints #line 1 A = [X, Y] B = [X, Y] #line 2...
Rintoul asked 19/12, 2013 at 9:29

4

Solved

How can I detect whether a line (direction d and -d from point p) and a line segment (between points p1 and p2) intersects in 2D? If they do, how can I get their intersection point. There are lots...
Strophe asked 27/10, 2010 at 6:35

3

Solved

My algorithm produces a list of (usually) several thousand line segments (all 2D) which I need to join up into large polylines. These resulting polylines might be closed or open, but they are never...
Magnificence asked 16/9, 2009 at 23:57

11

From the man page for XFillPolygon: If shape is Complex, the path may self-intersect. Note that contiguous coincident points in the path are not treated as self-intersection. If shape is Conv...
Shorter asked 23/1, 2009 at 5:16

10

Solved

Finding the point of intersection for two 2D line segments is easy; the formula is straight forward. But finding the point of intersection for two 3D line segments is not, I afraid. What is the alg...
Gasparo asked 23/2, 2010 at 7:49

6

I recently created a MySQL table with a column of type GEOMETRY. When I back up the table with mysqldump, it outputs my geometry column as a quoted string, containing some escaped characters like ...
Predestine asked 5/7, 2013 at 3:13

27

Solved

How can I tell whether a circle and a rectangle intersect in 2D Euclidean space? (i.e. classic 2D geometry)
Kellen asked 30/12, 2008 at 23:35

4

I have created a function to calculate the intersection point of two line segment . Unfortunantly the code below dosen't work if one of the segment is verticale public static Point intersection(...
Zito asked 24/4, 2015 at 17:41

9

Solved

How does one compute the area of intersection between a triangle (specified as three (X,Y) pairs) and a circle (X,Y,R)? I've done some searching to no avail. This is for work, not school. :) It wou...

5

When I run the command: from shapely.geometry import LineString I get this error: Could not find module 'C:\Users\SWWB\Anaconda\Library\bin\geos_c.dll' (or one of its dependencies). Try using the f...
Derain asked 17/12, 2020 at 17:6

10

Solved

I'm looking for a formula to find the shortest distance in degrees between two degree marks on a circle: for instance, 30 degrees and 170 degrees (140 degrees). The two degree marks can be virtual...
Ace asked 29/2, 2012 at 20:9

9

I'm trying to devise a method for generating random 2D convex polygons. It has to have the following properties: coordinates should be integers; the polygon should lie inside a square with corner...
Innocency asked 20/7, 2011 at 6:54

18

Solved

I need an algorithm that can give me positions around a sphere for N points (less than 20, probably) that vaguely spreads them out. There's no need for "perfection", but I just need it so none of t...
Seth asked 7/3, 2012 at 11:39

23

Solved

I need to generate a uniformly random point within a circle of radius R. I realize that by just picking a uniformly random angle in the interval [0 ... 2π), and uniformly random radius in the inte...
Know asked 29/4, 2011 at 21:27

1

For some reason that I cannot understand, the open cv function cv2.moments returns a dictionary with all zero values for the contour I am providing. Here is a MWE: contour = [[[271, 67]], [[274, 6...
Mercuri asked 15/6, 2020 at 16:2

16

Solved

I need a function to find the shortest distance between two line segments. A line segment is defined by two endpoints. So for example one of my line segments (AB) would be defined by the two points...
Allocate asked 13/5, 2010 at 4:49

15

Solved

How can I draw a perpendicular on a line segment from a given point? My line segment is defined as (x1, y1), (x2, y2), If I draw a perpendicular from a point (x3,y3) and it meets to line on point (...
Diurnal asked 28/11, 2009 at 4:25

5

Solved

I'm working on a game where I create a random map of provinces (a la Risk or Diplomacy). To create that map, I'm first generating a series of semi-random points, then figuring the Delaunay triangul...
Rasorial asked 17/9, 2008 at 16:53

6

Solved

I want to convert GPS location (latitude, longitude) into x,y coordinates. I found many links about this topic and applied it, but it doesn't give me the correct answer! I am following these steps...
Flitting asked 28/4, 2013 at 19:23

1

Solved

I have a path composed of multiple cubic bezier curves, and I need to simplify it to a smoother path. This is basically what Inkscape's Simplify(Ctrl+L) algorithm does, when applying it multiple...
Manor asked 28/2, 2018 at 22:31

5

Solved

How do I generate circular image thumbnails using PIL? The space outside the circle should be transparent. Snippets would be highly appreciated, thank you in advance.
Tingle asked 20/5, 2009 at 20:26

2

Solved

I need to implement a donut chart with a legend for each sector in the center of the slice. I use compose and there are no problems with the chart itself, but I don't understand how to draw text in...

2

Solved

I need to find the two points which are most far away from each other. I have, as the screenshots say, an array containing two other arrays. one for the X and one for the Y coordinates. What's the ...
Palinode asked 22/5, 2018 at 13:12

4

Solved

I want to calculate the centroid of a figure formed by the points: (0,0), (70,0), (70,25), (45, 45), (45, 180), (95, 188), (95, 200), (-25, 200), (-25,188), (25,180), (25,45), (0, 25), (0,0). I kno...
Helga asked 10/3, 2023 at 17:2

3

Solved

I want to find the minimum distance between two polygons with million number of vertices(not the minimum distance between their vertices). I have to find the minimum of shortest distance between ea...
Remiss asked 13/9, 2010 at 13:44

© 2022 - 2024 — McMap. All rights reserved.