Questions tagged [geometry]
Data structures and algorithms related to geometry.
13,034
questions
0
votes
0
answers
61
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. ...
0
votes
0
answers
25
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 = [(...
0
votes
0
answers
21
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 ...
0
votes
0
answers
49
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 ...
0
votes
1
answer
85
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 ...
0
votes
1
answer
51
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 ...
1
vote
0
answers
43
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?
-1
votes
0
answers
19
views
Circle slider React [closed]
Good day! I'm asking for help with my portfolio project, I need to make a circle slider, but I couldn't find how to do it anywhere, and I saw a video on YouTube where they make one like I want, but ...
0
votes
0
answers
48
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 ...
0
votes
1
answer
69
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 ...
0
votes
0
answers
52
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 ...
0
votes
0
answers
25
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 ...
0
votes
0
answers
63
views
How can we create a python script that will allow us to draw lines at intervals?
In the first picture we have intervals for wells (in the form of numbers), between which various rocks are located (text).
If you draw lines along these intervals between two wells, you will get the ...
1
vote
0
answers
16
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 ...
0
votes
1
answer
52
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 ...
0
votes
0
answers
33
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 ...
0
votes
1
answer
39
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 ...
0
votes
0
answers
32
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 ...
0
votes
0
answers
23
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 ...
0
votes
0
answers
14
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, ...
0
votes
1
answer
50
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 = ...
0
votes
1
answer
47
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 ...
0
votes
0
answers
36
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 ...
1
vote
0
answers
39
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 ...
0
votes
1
answer
40
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" ...
0
votes
0
answers
30
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 ...
0
votes
2
answers
143
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 ...
0
votes
1
answer
55
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....
-4
votes
1
answer
76
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, ...
0
votes
0
answers
18
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, ...
1
vote
1
answer
39
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.
...
0
votes
1
answer
77
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 ...
2
votes
4
answers
117
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 ...
0
votes
1
answer
50
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 ...
4
votes
1
answer
87
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 ...
-1
votes
0
answers
26
views
Creating an interactive 17 segment myocardial model in HTML, CSS, and JS
I am trying to create a workflow tool and I'm still in the very early stages of learning web development. I am trying to create the following in html and CSS:
the 17 segment myocardial model
First I ...
-2
votes
1
answer
61
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())...
1
vote
0
answers
26
views
How do I make a function that takes in a radius of a circle and returns an array of points that draws a circle in OpenGL coordinantes?
I have a function that draws me a circle in canvas coordinates but I can't find a way for me to convert those coordinates into webgl coordinates. Here's my function:
function circlearray(diameter, ...
0
votes
1
answer
22
views
Calculate spatial data
I have below code.
$zone = RestaurantZones::whereRaw( "ST_Distance(circle_coordinates, ?) <= radius", [$point] )->pluck( 'id' );
I am getting the below error.
Illuminate\Database\...
-3
votes
0
answers
73
views
3d reconstruction of a flat surface
I'm trying to implement a 3D reconstruction pipeline for a flat surface.
The first step is to estimate the relative pose using homography (or Essential mat.) decomposition for the first two frames. (...
-2
votes
0
answers
124
views
Calculate the angle between 2 vectors in 3D space using atan2
I am trying to calculate the turning angle of a moving object in 3D space. I want the angle to range in [-π, π] because of some fitting purpose later in my analysis. I know in the 2D space you can ...
0
votes
0
answers
23
views
How to calculate the angle of tilt for a cylinder hanging from two hooks known distance apart with strings of unequal length?
I'm making a wall plotter that hangs on a wall by two belts and uses stepper motors to accurately and precisely control the lengths of those belts. I'm having trouble figuring out how to calculate the ...
0
votes
2
answers
106
views
Get angle between camera Z-axis and ArUco marker Z-axis
I am interested in calculating the angle between the vector that defines the Z-axis of a camera with respect to the Z-axis of an ArUco marker.
For this purpose, I first detect the ArUco markers within ...
0
votes
0
answers
16
views
How to define the control points for a NURBS Torus Primitive
I'm trying to build a donut (Torus) like shape using NURBS, but I can't seem to think of a way to define the control points.
There is a basic way to think of this problem, if we think of this as the ...
1
vote
2
answers
89
views
How to determine the angle range that a box can rotate within an image
I want to find an algorithm that can find the angle range that a box can rotate around the top-left corner within an image. For example, in the picture below, I can calculate alpha_1 and alpha_2, ...
1
vote
1
answer
23
views
merging two geodataframes with no common elements but one is a single columned geometry column
Good afternoon,
I am using geopandas in python3 and I have a small issue that I have been stuck with and cannot seem to resolve. I have two geodataframes with the same number of rows. The first ...
0
votes
1
answer
68
views
How to create (using R's sf) a spatial data frame whose geometry column is the difference between the geometry columns of other two data frames?
I have two spatial data frames that I've loaded using the sf package in R. In the first data frame I have (61) US counties, while in the second I have a subpart of each of these (61) counties. Both ...
0
votes
2
answers
45
views
How to store Google Map Circle data in MySql Database
I am trying to store Google Map Circle data in MySql Database. I choose text data type to store Center Coordinate and int to store radius of the center. Now I am using below code to fetch data from ...
0
votes
1
answer
24
views
Ellipsis plotting in Dart
I want to create an ellipsis plotter for Minecraft players that I know. I have a Dart class:
class Ellipse with EquatableMixin implements Comparable<Ellipse> {
const Ellipse(this.width, this....
-1
votes
0
answers
20
views
Find projected point of a trendline given the angle
Given the image below, where the red solid line represents a potential trendline with an angle of 45 degrees.
How can I calculate the projected y value for any given day (e.g., 63.26 shown below), if ...