494 questions
1
vote
0
answers
25
views
On incorrect outputs in arithmetic involving large digits, especially in SDG
CGAL's Segment_Delaunay_graph has confirmed that given an input with very large digits due to minute numerical calculation errors, the correct result may not be obtained, but rounding the digits for ...
0
votes
1
answer
46
views
How to understand a strange command linked to Delaunay and Line2D?
I was intrigued by a command line that I don't understand, given in the answer of the (already old) post HERE.
So, I tried to investigate and made the following program:
import numpy as np
import ...
1
vote
1
answer
33
views
Is it possible to plot a Voronoi tessellation directly from a previous Delaunay triangulation?
I have a small Python code plotting a small Delaunay triangulation:
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial import Delaunay
points = np.array([[0, 0],
...
1
vote
1
answer
79
views
Python griddata() and Matlab griddata(): different results at some grid points
While converting some (pretty big physics) Matlab code to Python, I have stumbled upon this situation. Python/Scipy's griddata() function gives different results than Matlab's counterpart griddata() ...
2
votes
0
answers
101
views
Trouble with correctly triangulating a polygon on a sphere in THREE.js
tldr: help I can't correctly triangulate a GeoJSON polygon in 3D space to make it spherical and it has been haunting me for weeks. The question at the end of this novel is "Is this a poly2tri ...
0
votes
2
answers
185
views
Why does my Delaunay Triangulation using the Bowyer Watson algorithm not work?
I am implementing delaunay triangulation on a random set generated points, making use of the Bowyer Watson algorithm.
I seem to be running into a issue where the output seems to be generating way too ...
1
vote
0
answers
27
views
Variable metric field for delaunay computations in CGAL
is it possible to use CGAL to obtain a delaunay triangulation given ta set of points and their corresponding Riemannian metric fields. The goal is to make a triangulation that is delaunay in this ...
0
votes
0
answers
67
views
How to make surface mesh on boundary surface with TetGen from point cloud?
I have .node file which contains points of particles intersecting surfaces of my predefined geometry (these points are representing my point cloud). I am trying to make tetra mesh in this space using ...
1
vote
2
answers
224
views
How to find valleys and intersections in a distance field?
I have a 2d array representing height. It contains peaks, and then a linear gradient in between the peaks.
I am generating the array myself, based on the positions of the peaks. The gradient is simply ...
-1
votes
1
answer
115
views
Volume Calculation on PointCloud
I am currently working on pointcloud where i will select the particular area for that particular area i need volume where my code giving me huge values than expected ,please help me resolve the issue
...
1
vote
1
answer
107
views
How to find center point of 3d convexl hull, 3d polygon or polyhedron (all by Delaunay triangulation) in R
Here is the answer to solving the center point of 2d convex hull:
Centroid of the minimum convex polygon
how to find center point of 3d convex hull(package:geometry) in R?
example for bunny data:
...
1
vote
1
answer
360
views
Python Scipy Delaunay 2D doesn't connect some points
I generated 20 random points and applied Delaunay triangulation and created a visualization. I can't understand why there are always some points on the outside that aren't connected. I've looked in ...
0
votes
1
answer
204
views
First call to interpolator constructed by LinearNDInterpolator (with precomputed triangulation) slow regardless of grid size or values
I am using Scipy to interpolate several fields that are on a large irregular grid onto a regular one. I have precomputed the Delaunay triangulation of the grid and pickled it. Constructing the first ...
1
vote
0
answers
81
views
How to draw 2D Segment Delaunay Graphs in CGAL?
I am trying to reproduce the visualizations shown on the user manual for 2D Segment Delaunay Graphs:
However, I am struggling to understand how approach this issue. Concretely, how would I draw the ...
1
vote
0
answers
85
views
Contour detection in 2D scatter plot
I am looking for an algorithm, that is able to detect the contour of the attached scatter plot (only for the area y<4, y>4 is not relevant for me). I need that contour to filter out the points ...
1
vote
3
answers
136
views
How to make stateful Clojure code pure without excessive repetition?
I'm writing a Clojure library to generate Voronoi diagrams using the quad-edge data structure as described in this research paper. I was using refs to represent the edge records, but I wanted to ...
1
vote
1
answer
152
views
constant kernel crash in Delaunay triangulation code (Cython)
EDIT:
After much testing the problem has been found to be in the following loop. I put the loop in its own function. The use of it is to accept a pointer to an array of Vertex structs and remove all ...
1
vote
1
answer
90
views
Tracking changes in Delaunay triangulation when inserting new points in CGAL
I am using CGAL's Delaunay triangulation in 2D to construct a triangulation from a set of points. However, I want to track the changes in the triangulation that occur when inserting new points. ...
0
votes
1
answer
61
views
Embedding and iterating over custom faces in CGAL Delaunay triangulation
I'm using the CGAL library for performing Delaunay triangulation in my C++ application. I would like to embed custom faces into the triangulation and then iterate over them, but I'm not sure how to ...
0
votes
0
answers
44
views
CGAL EXception raised
I´m working on on a program that perform a CDT in a set of points. After I have inserted a lot of constraints CGAL raise the folowing exception:
0x0000022b9f34d7c0 "CGAL ERROR: assertion ...
3
votes
1
answer
401
views
Delaunay triangulation of a Fibonacci sphere
I have generated a set of (x,y,z) coordinates on a unit sphere using the Fibonacci sphere algorithm. Plotted with a 3d scatter plot, they look alright:
https://i.imgur.com/OsQo0CC.gif
I now want to ...
1
vote
1
answer
182
views
How to clip some polygons to the boundary of another polygon?
I have a Delaunay triangulation in a polygon with a hole (a so-called constrained Delaunay triangulation):
I'm able to construct the Voronoi cells by the duality principle. But some of them go ...
0
votes
1
answer
353
views
Delaunay triangulation on a cube
I have to create a 3d cube with a set of points for school. But when I'm trying to use Delaunay triangulation I'm getting a bad result. Does anyone has any idea how to fix that ? I'm truly a beginner ...
0
votes
0
answers
168
views
Delaunay Triangulation, JAVA. Bowyer Watson algorithm, too many triangles being added to "badTriangles"?
I am working on a school project where we are implementing Bowyer Watson triangulation algorithm. The code when triangulating creates all the correct triangles needed for the triangulation and removes ...
0
votes
0
answers
77
views
Problem triangle mesh creation with zero angles in the elements (delaunay)
I created a code in Python that help me to create a triangle mesh. However, the mesh file has elements with internal angles of zero and they are not valid for the calculations.
My question is, How can ...
0
votes
1
answer
140
views
Harvest data and attributes from Shewchuk's Triangle
Lets say I have an area with regions and I execute a constrained Delaunay with Rufat's implementation of Shewchuk's Triangle (python)
import numpy as np
import triangle as tr
import matplotlib.pyplot ...
1
vote
1
answer
100
views
Finding out if a circle can "escape" a set of points
Simplified explanation: I am trying to create a program that marks whether or not circles can be used for a later calculation. Requirements for a circle to be used:
A dot (golden points in the plots) ...
0
votes
0
answers
165
views
How to use Dalauney Triangulation to triangulate points(longitude and latitude) on Maps, within a certain radius
I am working on a problem where I need to use Dalauney triangulation to extrapolate location points on google Maps. I have tried using JTS but the output I get returned is a single Polygon of 4 ...
2
votes
0
answers
41
views
Why CDT cannot read a file created by itself?
this question is a continuing of Error on Constrained Delaunay Triangulation and Gabriel Triangulations
Trying to write a minimal example for that problem I planned insert the triangulation
in a file ...
1
vote
0
answers
71
views
Why thisexcleption is being raised on Constrained Delaunay Triangulation and Gabriel Triangulations?
I´m working on a triangulation that can be set as constrained Delaunay Triangulation or a Gabriel Triangulation. When I set it as a constrained Delaunay Triangulation all work fine but when I set it ...
0
votes
0
answers
64
views
CGAL - 2D Delaunay triangulation - remove is not removing - Part 2
This question is continuing of the question
CGAL - 2D Delaunay triangulation - remove is not removing
Trying to solve the problem I decide to use for deletion the point returned on cdt.locate() so ...
0
votes
1
answer
105
views
Scipy 3D Delaunay. Different results when translating the set of points
I thought that given a set of points, the 3D Delaunay network would be unique. But moving all the points (without changing the relative distances) gives a different result.
import numpy as np
from ...
0
votes
0
answers
58
views
CGAL - 2D Delaunay triangulation - remove is not removing
I need to remove some points from a 2d Delaunay triangulation. I´m using remove but it is not working, the code is:
//---TYPEDEFS
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
...
1
vote
0
answers
114
views
3D bounded voronoi/delaunay
I'm searching for an open-source code computing the 3D voronoi/delaunay of a point cloud bounded by a generic volume.
I'm currently coding mostly on python using scipy to generate the diagrams, but 3D ...
4
votes
1
answer
219
views
colour/fill Delaunay plot similar to this voronoi plot in R
using the iris dataset as an example,
I am trying to create plots for Voronoi and Delaunay partitions.
I can do this just fine for Voronoi PLots using ggplot and ggforce packages
#voronoi plot with ...
0
votes
1
answer
62
views
Export x/y coordinates of Delaunay triangles vertices using deldir in R
How would I generate a data frame with the following data in R using deldir?
A row for each Delaunay triangle
The x1, y1, x2, y2, x3, y3 coordinates for the vertices of each triangle
I've gone ...
0
votes
1
answer
507
views
Map corresponding points between Delaunay triangles
I'm trying to morph two images of faces using an inverse warp. I have the Delaunay triangles for both images as well as all transformation matrices for all pairs of corresponding triangles.
I have ...
3
votes
1
answer
177
views
fill delaunay triangles with colors of vertex points in R
here is a reprex
data<- structure(list(lanmark_id = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, ...
2
votes
1
answer
350
views
Create triangular mesh of pentagon or higher
I have the coordinates of the corners of a pentagon
import math
import numpy as np
n_angles = 5
r = 1
angles = np.linspace(0, 2 * math.pi, n_angles, endpoint=False)
x = (r * np.cos(angles))
y = (r * ...
0
votes
1
answer
252
views
Scipy Delaunay doesn't create faces for all points
When running Delaunay on a set of four points, I expect at least two triangles to be produced. Instead I am returned only one. How can I have all faces produced?
from scipy.spatial import Delaunay
...
0
votes
2
answers
117
views
Error: objects 'ripras', 'as.ppp', 'delaunay' are not exported by 'namespace:spatstat'
I got following error whie executing the code.
Code:install.packages("ithir", repos="http://R-Forge.R-project.org")
Error:
WARNING: Rtools is required to build R packages but is ...
1
vote
1
answer
539
views
How to delete a certain delaunay triangle from the list of tri.simplices in Python
i construct two Delaunay triangulations from two different numpy arrays of vertices.
They have two identical triangles, which i want to delete from one of the triangulation list.
If somebody can help ...
2
votes
2
answers
504
views
Can I efficiently construct a Voronoi diagram / Delaunay mesh from a subset of points?
I have a problem where I have a large number (~10,000) points (in 2-D) from which I need to repeatedly pick a small number (~100) and construct a Voronoi diagram.
I can pre-compute the Voronoi diagram ...
1
vote
1
answer
719
views
Delaunay Triangulation on sphere (unstructured long lat grid)
I work with an unstructured grid of weather data, and I'm trying to plot it. For that I use the Delaunay triangulation.
def triangulate(vertices, x="Longitude", y="Latitude"):
&...
1
vote
1
answer
2k
views
PyVista mesh triangulation - vertex indices
I have a triangulated mesh that I generated with the Delaunay 3D function in PyVista. I would like to calculate the surface area of the mesh adding up the areas of all the triangles. Is there a way to ...
0
votes
2
answers
227
views
Degeneracy in circumcircle radius for Delaunay triangulation in Python
So I'm trying to construct a Delaunay triangulation in Python. Here's my current code:
from __future__ import annotations
from functools import cache
from typing import NamedTuple
@cache
def ...
0
votes
2
answers
213
views
Delaunay plot and Igraph
I have a set of (x,y) coordinates and I want to create a graph (igraph) by using these (x,y) coordinates. First I create the Delaunay triangle from this point then use the "delaunay.simplices&...
0
votes
2
answers
120
views
Edges of CGAL hyperbolic Delaunay triangulation
I'm trying to do a hyperbolic Delaunay triangulation with CGAL. Below is my code. Rcpp is a library to use C++ with R.
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include &...
1
vote
0
answers
65
views
Scipy Delaunay triangles curve points issue
I have number of 2D points. I have to triangulate those points, for which I use Scipy Delaunay. But my triangles are returning plain shape instead of curved shape.
Here is my code:
def ...
0
votes
2
answers
120
views
Is there an optimal algorithm which can be compute a L_inf Delaunay triangulation directly?
I want to write a C++ program which draws a Delaunay triangulation of a point set in the plane using L_inf metric.
I wonder if a Divide & Conquer algorithm (from Guibas and Stolfi) and an ...