Questions tagged [polygon]

For issues relating to the creation, manipulation and rendering of polygons in graphical user interfaces.

A polygon is a two-dimensional figure that is bounded by a closed path composed of a finite sequence of straight line segments. Polygons are drawn and rendered in graphical user interfaces.

4546 questions
1
vote
1 answer

Can clustering help me with even distribution of points in polygon

Hello this is more general question. I am writing program that will provide visualization of air traffic forecasts. I have a polygon made of few GPS x,y coordinates and I also have dataset of points that are in that polygon and It would look like…
Martin Kavka
  • 49
  • 1
  • 3
1
vote
0 answers

Polygons not fully deleted on .Clear and 1st marker connecting problem

I am using gmap.net and I am trying to delete the polygons on my map. When I do .Clear() , they're deleted but when I click again on the map, the old polygons I just cleared appear again on the map. Also when I click the to add a 3rd marker ,…
smfa3
  • 11
  • 1
1
vote
1 answer

Nettopologysuite Geometry.Intersection does not output the expected polygon

I am creating a web application which shows what area is reachable in x amount of minutes inside of the Netherlands. To do this I want to intersect the polygon of the reachable area(s) with the one of the Netherlands. I am displaying the polygons in…
bengs
  • 26
  • 5
1
vote
1 answer

Circle triangulation

I am currently experimenting with openGL, and I'm drawing a lot of circles that I have to break down to triangles (triangulate a circle). I've been calculating the vertices of the triangles by having an angle that is incremented, and using cos() and…
SamFF
  • 203
  • 1
  • 7
1
vote
1 answer

Swap trade in Uniswap fails using uniswap-python standard functions

I am trying to do a simple trade using uniswap-python and it doesn't work. Sample code: from uniswap import Uniswap provider = "https://polygon-mainnet.infura.io/v3/"+INFURA_API_KEY uniswap = Uniswap(address, private_key, version = 3,…
The Dare Guy
  • 487
  • 1
  • 3
  • 12
1
vote
0 answers

Find gap between two non-overlapping polygons

I want to identify the gap between two non-overlapping polygons as a new polygon. As displayed in the image below, the comparison will be between polygons A and C, and the result should be the black area (gap) between them. For display purposes the…
Migko
  • 175
  • 2
  • 9
1
vote
0 answers

React native create polygon shapes

I am pretty new to react native, and I want to create a weirdly shaped Hexagon. I tried looking up how I would do that, but the only things I could find are examples of polygons made on google maps. And I am not interested in that. This is an…
Moemen Hussein
  • 394
  • 5
  • 16
1
vote
1 answer

Shapely smoothing with dilate and erode

I am trying to implement a polygon smoothing operation with shapely. I am doing this with the combination of erode and dilate (polygon.buffer function with positive and negative numbers). The specification of my smooth function goes something like…
Stefan Karlsson
  • 1,092
  • 9
  • 21
1
vote
1 answer

Drawing no intersected polygon with dragging vertexes

I'm trying to draw a polygon without intersecting. Below is good example which I want to. Bad example what I want to prevent. If I choose red dot one, then what algorithm I can apply to prevent the intersecting sides of the polygon?
tae
  • 51
  • 2
  • 8
1
vote
1 answer

How can I write circle coordinates to a shapefile using Python?

I am very new to python so struggling! I have lat long coordinates for circles that I need to turn into a polygon shapefile from the current format (example shown of one circle): [(39.1852751477193, -4.661967433717266), (39.185270807935424,…
bsh7194
  • 19
  • 1
1
vote
0 answers

Shapely polygon buffer problem with 'y' coordinates(double value)

I use shapes to work with contours. I need to add to the contours of different sizes around the field by a given value. Do not scale the contour by a certain percentage, but expand the border by the same given value, regardless of the size of the…
Denis
  • 63
  • 6
1
vote
1 answer

how to make rotate polygon on key in pygame?

I am trying to make my polygon rotate able. But when I input new_point the report is new_point aren't define. This is giving me a headache def xoay_hinh(key): lx, ly = zip(*hinh) min_x, min_y, max_x, max_y = min(lx), min(ly), max(lx),…
Need_help
  • 31
  • 4
1
vote
1 answer

how to keep polygon in screen in pygame?

while messing with pygame.draw.polygon I found out polygon can be move by using for point in points. so I came up with a idea to move polygon shape as a player. but I can't keep the player in side the screen when it touch border import pygame win =…
Need_help
  • 31
  • 4
1
vote
0 answers

My function call is returning expensive gas cost on metamask

To context. I want to make a contract that receives USDC and send custom tokens to the buyer. After that, in the same call, the contract forwards those USDCs to another wallet. I have done tests, and calls. When I do it through Remix, I'm able to…
Tsss
  • 11
  • 2
1
vote
1 answer

Python Drawing polygon with real sizes

I'm trying to draw polygons with Python. Polygons are parcel of land with their actual coordinates. So far I have tried matplotlib and tkinter but no result. Is there a library where I can get these polygons scaled and vector based? The scale will…
user3132616
  • 67
  • 1
  • 6