Category "geometry"

The circle animation is not displayed with the following code in anaconda spyder. Why?

The circle animation is not displayed with the following code in anaconda spyder. Why? The code is given below. from matplotlib import pyplot as plt from matplo

How to create a curved line vector plot of a triangle in Python?

Question Suppose one has 3 random coordinates with 3 random functions that describe the continuous lines between them*, how would one create a vector plot in Py

Finding closest pair of points in the plane with non-distinct x-coordinates in O(nlogn)

Most of the implementations of the algorithm to find the closest pair of points in the plane that I've seen online have one of two deficiencies: either they fai

Multi-part geometries: Get line & part number when extracting parts (via SDO_UTIL.EXTRACT_ALL)

I have multi-part SDO_GEOMETRIES in Oracle 18c. I can extract the parts as individual rows using the SDO_UTIL.EXTRACT_ALL() function: with cte as ( --Each part

Python - Find fewest number of rectangles that enclose a list of rectanges (while avoiding others)

I have lists of coordinates for "good" rectangles and "bad" rectangles. Rectangles may or may not be adjacent to others from either list, but will never overlap

shortest distance between a point and a rectangle based on numpy implementation

Goal: For a point a and a rectangle B, I would like to calculate the shortest distance between these two objects. Motivation Because this calculation is part of

Algorithm for drawing profiles using long thin rectangles

I want to draw profiles similar to the ones at https://steeldoor.org like: programmatically. (Probably in FreeSCAD, but possibly Python). I want to define a g

Algorithms to find shapes among random points

Let's assume we have: A) a large set of random 2D points, and B) a small set of 2D points representing a simple geometric shape of choice, e.g. a triangle (3 x

Crop a polygon shape from an image without libraries except numpy

I have a list of points let's say 5 points. I want to crop the area that this polygon is covering from the image. Here, red areas are the points and I want to c

How to prevent WebGL from clipping outside bounds when drawing a wavy circle?

I have a shader that draws a bunch of instanced circles, and it works great! It works by basically drawing a bunch of rectangles at every given location, and th

How is it possible to create a circle in CSS that always keeps the same size?

I have the problem that I have a circle that adjusts according to the content of the text. However, I would like the font size to adjust to the circle and not h

Convert a set of overlapping cuiboids to a minumum set of non-overlapping cuiboids

I am trying to decompose an overlapping set of cuboids to non-overlapping ones, the fewer non-overlapping cuboids used the better. For example, in the case belo

Custom aggregate function to collapse vertices to SDO_GEOMETRY

I have multi-part polyline vertices stored as individual rows in an Oracle 18c table. ASSET_ID PART_NUM VERTEX_NUM X Y M --------

Visualizing the permutohedron in 3D plot

I am trying to plot the Permutohedron in python using plotly, numpy, and pandas. This is my current code: import plotly.express as px import numpy as np import

How to draw circles of defined radius around multiple points and export to kml file

I have a set of points saved with their respective latitude and longitude in a data frame like this: points = data.frame(point_id = 1:3, lat = c

I can't assign the value of a geometry point to a variable

I was trying to assign the value of a geometry point (it has x,y,z. All of them are float64. If you want to check it: http://docs.ros.org/en/noetic/api/geometry

How to create a path drawing algorithm to display specific landmarks of a face mesh in Landmark Detection with Tensorflow.JS and React?

I have currently implemented a version of this tutorial: Real Time AI Face Landmark Detection in 20 Minutes with Tensorflow.JS and React It demonstrates how to

Is there a cleaner / simpler way to calculate the edge in a geometry that a line crosses?

In the code below it is fairly simple to check does the line cross into the geometry or not - it's also trivial to work out the coordinate that the line crosses

Count number of polygons within a polyline

I have a collection of vertices that have been drawn sequentially by a user and I need to count how many enclosed areas there are within this shape. I have mana

center of mass in each cell of N-dimensional rectilinear grid

I have an n-Dimensional rectilinear grid, such that the edges in each dimension i are given by x_i = {x[i, 0], x[i,1], ..., x[i, Ni-1], x[i, Ni]}, with N_i edge