Questions tagged [geometry]

Data structures and algorithms related to geometry.

geometry
Filter by
Sorted by
Tagged with
1 vote
1 answer
126 views

decoding binary data from SQLite database in PHP Geometry Blob Binary

I'm currently facing an issue decoding binary data retrieved from an SQLite database in PHP. I'm attempting to extract geometry coordinates. The leading number of coordinates is a 32-bit unsigned ...
Maher's user avatar
  • 33
1 vote
0 answers
31 views

Intersection points between two circles of different radius with latitude and longitude geospatial in javascript

I've got a problem trying to figure out the intersection between two circles of different radius .. I took one of theses answers here : Google Maps Two Circles Intersection Points and tryed to make an ...
Jack's user avatar
  • 192
0 votes
2 answers
72 views

Javascript Geometry: Polar to Cartesian and Back Again

I'm trying to create a program that converts Polar values to Cartesian and back again. I need to be able to switch between the two types without any change in the data. I've created class types for ...
cupofjoe's user avatar
0 votes
0 answers
92 views

SwiftUi how can I align an overlay to the top left corner of a videos with different heights

I have a video player that has videos of different heights . I have an overlay that I am using but the issue is I can not get the overlay to show up in the top left corner of a video . Since video ...
user1591668's user avatar
  • 2,761
0 votes
0 answers
53 views

ST_GeomFromText() Cannot be used with DB::raw?

I'm trying to create an UpdateOrCreate method that registers the geometry as binary By query running SELECT ST_AsGeoJSON(geometry) from mma_embargos; INSERT INTO mma_embargos (geometry) VALUES ( ...
Vowkaz's user avatar
  • 9
1 vote
1 answer
82 views

Incorrect height and area for intersection rectangle in Java

I am solving a rectangle geometry USACO problem and have an issue when calculating the intersection area of two rectangles. Summing up the problem for you, you are given three rectangles' lower-left ...
Dolfinwu's user avatar
  • 419
0 votes
0 answers
117 views

Pyvista delaunay_3d settings issues for small PolyData coordinates

I am trying to create script to fully automatize wind turbine blade model generation. I am using pyvista library and I am encountering some issues with delaunay_3d function. To obtain hight quality ....
OneptoHund's user avatar
-2 votes
1 answer
39 views

Getting exact angle a line passing through two dots will make with X Axis

I'm getting wrong output with atan2 function. I have 2 variable points i.e. p1=(x1,y1) p2=(x2,y2) angleFun(x1,y1,x2,y2): dx=x2-x1 dy=y2-y1 radAngle = math.atan2(dy, dx) degAngle = ...
Theprash's user avatar
  • 155
0 votes
3 answers
89 views

Geometry help: Plotting along a path between 2 points in a circle JS

I'm trying to plot a specified number of steps between 2 points on a polar circle graph. The angle (radius) is represented by HUE, from 0 to 360. The theta is represented by CHROMA (strength). I ...
cupofjoe's user avatar
0 votes
0 answers
62 views

Collision SwiftUI rotated shapes

I'm using CGRect and its intersects(_:) function to see if 2 rectangles collide. The problem is both rectangles have an angle of var rotationAngle: Angle and that the intersects function doesn't take ...
Nothingnoname's user avatar
0 votes
0 answers
54 views

Converting an LineString to h3 hexagons using srai

I try to convert an shapely LineString to a sequence of h3 hexagons. For that task srai offers the funciton h3_to_geoseries unfortunately the function runs into the following error message: ...
Simon's user avatar
  • 33
1 vote
2 answers
416 views

How to create a selection rectangle with rotate, resize and move abilities?

I'm trying to make a selection rectangle, with the possibility to change its position and its size and also to rotate it - everything will be done by dragging the mouse. I was successful with moving, ...
codeDom's user avatar
  • 1,585
0 votes
1 answer
37 views

Cannot make two objects in same time in Javascript. One object hides another one

I want to create a symbol using javascript. It needs to create circle and rectangle. I created circle and rectangle. But when rectangle make under the circle, then circle not display. How fix this ...
Chathura Abeywickrama's user avatar
0 votes
2 answers
79 views

Max count of coordinates within a radius

Given a list of enemy coordinates x and y, and a damage radius r of your missile, find the best coordinate (cx, cy) to detonate the bomb to kills the most number of enemy. My first intuition was to ...
TSR's user avatar
  • 18.9k
1 vote
1 answer
46 views

Why is my random vector generator creating NaN vectors when I call a seemingly unrelated function on setup?

I'm making an algorithm that involves generating a cloud of random points in P5.js. Here is my function: function generatePoints(amount) { function generatePoints(amount) { let points = [] for(...
Rafael Bispo's user avatar
0 votes
2 answers
105 views

Unexpected angle value

I have a vector A with coordinates (-51.85,-2.38,-0.93). The normal vector at point A(lets call it Na) is (0,0,1). I want to calculate the angle between the position vector A and the normal vector Na. ...
Tariq Islam's user avatar
0 votes
0 answers
32 views

Need solution with python program lagging

import pyautogui from pynput import keyboard, mouse from shapely.geometry import Point, Polygon zone1 = [(332, 1), (1051, 721), (1770, 1)] zone2 = [(1770, 1), (1051, 721), (1770, 1439)] zone3 = [(...
Hideo's user avatar
  • 1
1 vote
1 answer
48 views

Split Single polygon into mulitple polygon geopandas

I have a shapefile I'm converting to a wkt to join with some other data. Unfortunately, some of the polygon field values are too long for excels's string limit (30,000). How do I split a polygon ...
Ponle's user avatar
  • 13
0 votes
0 answers
77 views

Sweep Line algorithm for distributing rectangles randomly with minimum overlap

I currently have a webpage where I randomly place rectangles of different sizes, using just randomly chosen point for their starting positions. They currently overlap a lot. I'd like to find an ...
bolino's user avatar
  • 955
0 votes
1 answer
104 views

Rounding errors when computing intersection between two lines in python

I'm attempting to create a Python script that identifies all the unique intersection points, eliminating duplicates, among all the lines passing through a subset of points of a regular grid in 2D or ...
Edoardo Serra's user avatar
0 votes
1 answer
67 views

How to make colored Vertices for each iteration of subdivision

I have an application that has various standard geometries (for example, box geometry https://threejs.org/docs/#api/en/geometries/BoxGeometry) and the application applies up to 5 levels of subdivision ...
Vyxxen's user avatar
  • 21
1 vote
0 answers
49 views

Using distance from two points to a line, how to find line slope? [closed]

I have two point's coordinates and a distance to a line from each point (the distance is signed and measured on a normal perpendicular to the line). How can I find the line's slope?
Maz's user avatar
  • 81
0 votes
0 answers
55 views

How can I determine the "time" of contact between a circle and a wall?

I'm a relatively new programmer, and I'm trying to write a simple simulation in Java for personal enrichment using the swing library. One thing I'm struggling with is updating my entities (a ball in ...
Vincent DeCampo's user avatar
0 votes
1 answer
85 views

Fitting ellipse with 95% CI to points and calculating area within specific line segments

I have a set of points where x is in [-1, 1], y is between [-1, 1], and the maximum sum between abs(x) + abs(y) = 1. I want to fit an ellipsis (95% CI) and then calculate the are of the ellipsis ...
understorey's user avatar
0 votes
0 answers
53 views

Can one predict the location of the unseen point?

My question is quite simple. I have two images, on the first one I know the location of points P1, P2, P3, and P4. In the second image, I know the location of P2', P3', P4', and point Q'. Is there any ...
apraglez's user avatar
0 votes
0 answers
48 views

Task stuck at "GET RESULT" from Join -> groupby in Spark (sedona)

Working in spark 3.4.1, sedona, jupyter lab on a docker image I'm trying to count the month with the most vessel points from ships from a large dataset with geographic info. I have 2 dataframes, one ...
jayan's user avatar
  • 1
1 vote
0 answers
23 views

Reducing geometry based on Geometry indices in ThreeJS

Title might be a result of an XYZ problem, my original intent is to save and load multiple selected regions on a model surface. The selection logic follows the example in Three-Mesh-BVH, (Example here ...
Blaine's user avatar
  • 616
1 vote
1 answer
518 views

Cannot assign geometry column using gdf.set_geometry()

I am unable to assign an existing column containing geometry data in a geopandas.GeoDataFrame as an active geometry column recognized by geopandas. Here's my setup: from geopandas import GeoDataFrame ...
okBuber's user avatar
  • 11
0 votes
0 answers
47 views

WebGL recursive Sphere out of Octhedron

trying to generate, based on a provided recursionDepth, a sphere-like shape. Somehow I really struggle with the generation of the indices lines & triangles within the recursion. The vertices seem ...
neverhalfnot's user avatar
-1 votes
2 answers
157 views

Getting center line of a complex shape

First of all sorry for the bad title, but i found it difficult to summarize the topic in a single phrase. Second things second: the question. I have a list of points that define a complex shape by its ...
generic_dev_name's user avatar
0 votes
0 answers
129 views

Creating radius circle in flutter using flutter_map

Im trying to build a screen that allow the user to use a slider to specify a certain radius in kilometres. in this screen the user will be able to use the slider and see a circle of grow and shrink ...
Mustafa Hadi's user avatar
0 votes
0 answers
27 views

Determine the angle on the horizontal plane between two sides of the smartphone

I'm currently studying sensors in android and I don't quite understand whether it is possible to solve one problem. On my desk there is a drawing approximately the same as in the screenshot. I want to ...
user21663739's user avatar
0 votes
0 answers
17 views

Leaflet JavaScript bearings do not match Python calculations

In my app, I use bearing for detection of signal intersection. I use the following python code for detecting intersection of bearings: import nvector as nv def bearing_intersect_nvector(point_0, ...
Denis Kotov's user avatar
0 votes
1 answer
56 views

Eliminate contour intersections

I have the coordinates of the points of the objects (x, y). For example, from shapely.geometry import Polygon, Point circle1 = Point(0, 0).buffer(1.5) circle2 = Point(1, 1).buffer(1.5) circle3 = ...
Danila's user avatar
  • 1
1 vote
1 answer
58 views

How to score the consistency of angles?

I'm averaging angles by averaging their coordinates after placing them on a unit circle. I read that the length of the resulting point or centroid/center of mass is an indicator of the consistency of ...
garystu's user avatar
  • 11
0 votes
0 answers
61 views

How to make shamrock image

I am trying to make a shamrock crystal for later fabrication, and am using nazca design tool for doing it. How can I place the trapezoid so that the sides of the trapezoid are parallel to the cyrcles ...
wosker4yan's user avatar
1 vote
0 answers
48 views

Potential methods for segmenting and grouping points from lines represented by 3d point cloud

Iinked image summarizes what I want to solve: Sample Image From a combination of unordered points in 3D space, I would like to identify intersection- and end- points, and groups points that form 3D ...
HOJUN LEE's user avatar
0 votes
1 answer
64 views

Function to find the rectangle angle of the triangle that contains a given point

diagram explaining the case In a webgl / fragment shader context. I have a uv space. Is filled of right angle triangles as the image shows. Notice that "c0" is at 0.5 , 0.5. "ac" ...
Roberto Ferrero's user avatar
0 votes
0 answers
45 views

How can you translate mouse drag to rotation about a 3D object in vanilla JS?

What I am trying to do is turn mouse drag (x,y) along the screen into full rotation for a 3D object (in this example, a sphere) (as of writing this there is no option for me to include a stack snippet ...
Yonk's user avatar
  • 1
0 votes
2 answers
193 views

How to check if given points form a continuous figure? (Python)

I need to implement a function that takes coordinates of any number of points (in 3D space) and return True if points form a continuous figure. There are three figures below (in 2D space for ...
ae_fed's user avatar
  • 65
1 vote
1 answer
474 views

Creating VoxelGrid using Voxels (Open3D)

I'm using open3d to voxelize two point clouds, then color the voxels based on the point count difference for each voxel. I do this by creating 2 VoxelGrid objects using o3d.geometry.VoxelGrid....
Máté Kosztricz's user avatar
-6 votes
1 answer
535 views

How do i use opencv to measure an object height and width with a changing distance?

Im currently working on a code that is running on python where the idea of the code is to measure an object height and width accurately regardless of the distance of the camera from the object, ...
yong jie's user avatar
0 votes
0 answers
26 views

Issue: Insufficient authorization Arcgis pro

On ArcGIS Pro I connected to a PostgreSQL database. In the database, I have tables that when I want to open I get the following issue of 'insufficient authorization'. When I try to open other tables, ...
si mo's user avatar
  • 1
1 vote
1 answer
45 views

Trying to draw a parallelogram on this gray band. Why does it *sometimes* not align with the gray band?

To make it simple, I'm working with one contour, which is a very close approximation to a parallelogram. I need to draw a line through the contour such that the line fits under the contour perfectly. ...
vs07's user avatar
  • 542
0 votes
1 answer
190 views

Find minimal enclosing quadrilateral [duplicate]

I have a polygon in the first picture below. This polygon was taken from yolov8-seg. I know that it should be rectangle. My task is to correct perspective of this mask. I can easily do this by finding ...
Vlad Timofeev's user avatar
2 votes
4 answers
265 views

How can I check if all given points (in space) lie on the same line?

I need to implement a function that takes coordinates of any number of points as input data and return True or False depending on whether these points lie on the same line or not. I use Python to ...
ae_fed's user avatar
  • 65
0 votes
1 answer
63 views

Computer Graphics-related Tasks Involving The "Smallest-circle problem"

I have two tasks related to the "Smallest-circle problem": Implement a one-pass algorithm that calculates an enclosing circle for a generic set of 2D points. Define a set of 2D points Q for ...
zellez11's user avatar
  • 400
4 votes
1 answer
110 views

How to use CGAL to slice up a sphere with great circles?

A bunch of great circles on the sphere slice up the sphere into spherical polygons. I'd like to know the areas of each of these polygons. (In fact, I only need the smallest of the areas, but I don't ...
Dániel Varga's user avatar
-1 votes
1 answer
65 views

What units does the Google Maps API's event.overlay.getRadius return value use? [duplicate]

I am using the below code: google.maps.event.addListener(drawingManager, "overlaycomplete", function(event) { if(event.type == 'circle') { $('#radius').val(event.overlay.getRadius())...
abu abu's user avatar
  • 6,838