Questions tagged [polygon]
For issues relating to the creation, manipulation and rendering of polygons in graphical user interfaces.
polygon
4,620
questions
0
votes
0
answers
29
views
How to get the upper line of a polygon
I am trying to create an application to automate the workflow of dam analysis for the geotechnical sector I work in. The app takes as input a DXF file that contains the geometry of the dam section. ...
0
votes
0
answers
38
views
How to do circle packing in an irregular polygon
I have been trying to pack as many circles in a polygon as possible.
Having found this - Controlled circle packing with Python -
I though it would be a useful code if the checkBorders function was to ...
-2
votes
0
answers
15
views
solidity contract function execution failed
I am trying to build a test contract for flash loan arbitrage in solidity for polygon blockchain. Contract deployed successfully, but when I am calling the function : fn_RequestFlashLoan I am getting ...
0
votes
0
answers
18
views
Code -32000 ("processing response error") when reading data from a polygon smart contract
I am just starting out with ethers.js and smart contracts in general. I am attempting to read the price between two tokens (MATIC => WETH) using the getAmountsOut() function on the sushiswap router ...
0
votes
1
answer
21
views
Error: "execution reverted" when calling Chainlink Data Feed function in Remix on Polygon Cardano Testnet
I am trying to use the ETH/USD price data feed on the Polygon Cardano Testnet via Remix. I deployed the following contract successfully:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import ...
0
votes
2
answers
83
views
Identify two figures for similarity [closed]
I am trying to find a reliable way to determine the similarity between geometric shapes (polygons).
In one of my approaches, I tried to use the cvopen library and the findContours() and matchShapes() ...
1
vote
1
answer
52
views
Display adjacent Java Swing Polygons without gap even when using antialiasing
Using antialiasing in filling adjacent polygons in Java Swing can result in a fine gap between the polygons. The gap can be closed when using drawPolygon in addition to fillPolygon, but the polygon is ...
0
votes
0
answers
16
views
How to specifiy networks in turffle contract
I am following a tutorial creating peer to peer payment on Polygon, and when using loadWallet I think we need to specify the network and in the code, the chainID of mumbai testnet is used.
const ...
0
votes
0
answers
14
views
Godot4 2d - issue with how polygons and re-useable textures work
I’m trying to create irregular shaped tiles using polygons, and I want to use the same texture for each tile. I have the minimum code below that creates a number of polygons in a row.
extends Node2D
#...
0
votes
0
answers
23
views
Web3ValidationError when trying to use web3.js and metamask
I am running into quite a puzzling problem. I have built an app that execute on Polygon or in this case Amoy (testnet) and is essentially like a vending machine. You can add items then via contract ...
3
votes
2
answers
86
views
Fastest algorithm for filling overlapping rectangles of pixels
I have an image. The pixel value is either 0 or 1. All pixels are initially zero.
Given a set of overlapping rectangles characterized by (bottom left pixel coordinate, width, height), I need to flip ...
0
votes
1
answer
17
views
How to shrink a polygon vertices to find Net floor area
I am workin on a project in c# of modeling building for greenBuilding.
for the simulation, I need to put the vertices for the outside of the flat external wall, the the centeral of the wall between ...
1
vote
0
answers
34
views
Which algorithm should be used to merge free hand drawings like lasso tool - add mode?
I'm trying to make an application that merge user free hand drawings, like lasso tool add mode in photoshop.
I tried to find the algorithms but I failed it (https://www.sciencedirect.com/topics/...
0
votes
0
answers
12
views
libgdx ShapeRenderer on xz plain
I have set of point on xz-plane and need to draw polygon, probably using ShapeRenderer. But it is intended for xy-plane, and, using my set of points, render polygon in perpendicular to expected ...
0
votes
0
answers
35
views
Color inversion while increasing zoom level while plotting polygon string with Bing Maps API key in python
I want to increase zoom level of plot consisting of polygon plotted using matplotlib library on Bing Maps. I am using the following code:
import requests
from PIL import Image
from io import BytesIO
...