delaunay

Voronoi diagram, Delaunay triangulation - data structures

元气小坏坏 提交于 2019-12-01 08:40:36
问题 I want to compute Voronoi and its dual, Delaunay triangulation. I am using Watson Bowyer algorithm. My goal afterwards is to compute alpha-shapes (concave hulls). So I will need to rapidly access the voronoi cell for a given point, the neighbors... Which data structures did you use for your Voronoi/Delaunay algorithm? I have thought of using a disjoint set data structure with union-find operations, so that I can 'bind' to one parent, the point p in original data set, the set of point in Vp.

Confusion on Delaunay Triangulation and Largest inscribed circle

孤街浪徒 提交于 2019-12-01 07:49:02
问题 I need to find a largest inscribed circle of a convex polygon, I've searched many sites and I get that this can be done by using Delaunay triangulation. I found a thread in CGAL discussion with an algorithm using CGAL: You can compute this easily with CGAL: First, compute the Delaunay triangulation of the points. Then, iterate on all the finite faces of the triangulation. For each finite face f compute its circumcenter c locate c in the triangulation (to speed up things, you can give one

Plotting surface of a sphere using 3d Delaunay triangulated panels in R

坚强是说给别人听的谎言 提交于 2019-12-01 05:11:04
问题 [ EDIT : more general solutions can be seen in answers to this question] I'm wondering if anyone can help me plot an approximation of the surface of a sphere using XYZ coordinates. I have tried calculating Delaunay triangulated panels using the package geometry and then to plot iwith rgl . The first attempt, which looks nice, unfortunately created Delaunay 3d triangles that cross through the sphere. I would ultimately like to only plot the surface: Generate 3d xyz data of a sphere n <- 10 rho

Bowyer-Watson algorithm: how to fill “holes” left by removing triangles with super triangle vertices

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 14:14:39
I am implementing the Bowyer-Watson algorithm as presented at Wikipedia . In my implementation, everything works as I would expect up until the last part of the pseudocode: for each triangle in triangulation // done inserting points, now clean up if triangle contains a vertex from original super-triangle remove triangle from triangulation If I follow the pseudocode here literally, I can end up with missing triangles in my Delaunay triangulation. As an example, please consider the images below. The sites I am triangulating are rendered as blue circles. The triangles are rendered with black

Return surface triangle of 3D scipy.spatial.Delaunay

限于喜欢 提交于 2019-11-30 13:21:50
问题 I have this problem. I try to triangulate points cloud by scipy.spatial.Delaunay. I used: tri = Delaunay(points) # points: np.array() of 3d points indices = tri.simplices vertices = points[indices] But, this code return tetrahedron. How is it possible return triangle of surface only? Thanks 回答1: To get it to work as in code form, you have to parametrize the surface to 2D. For example in the case of ball (r,theta, psi), radius is constant (drop it out) and points are given by (theta,psi) which

plotting and coloring data on irregular grid

帅比萌擦擦* 提交于 2019-11-30 02:23:14
I have data in the form (x, y, z) where x and y are not on a regular grid. I wish to display a 2D colormap of these data, with intensity (say, grey scale) mapped to the z variable. An obvious solution is to interpolate (see below) on a regular grid, d <- data.frame(x=runif(1e3, 0, 30), y=runif(1e3, 0, 30)) d$z = (d$x - 15)^2 + (d$y - 15)^2 library(akima) d2 <- with(d, interp(x, y, z, xo=seq(0, 30, length = 30), yo=seq(0, 30, length = 50), duplicate="mean")) pal1 <- grey(seq(0,1,leng=500)) with(d2, image(sort(x), sort(y), z, useRaster=TRUE, col = pal1)) points(d$x, d$y, col="white", bg=grey(d$z

CGAL - Retrieve Vertex Index After Delaunay Triangulation

二次信任 提交于 2019-11-29 00:16:08
I am computing the 2D delaunay triangulation of a few thousand points. Each point has more data associated with it beyond x and y coordinates. Therefore, I was wondering if it is possible to retrieve the index of each point so that I can access my own point struct in another vector. Currently, as I access vertices from a Face_handle, it returns a point (i.e. x,y coordinates) How can I return each vertex by its ID (index) instead of its x,y coordinates? Thank you. #include <vector> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_2.h> typedef

plotting and coloring data on irregular grid

痴心易碎 提交于 2019-11-28 23:14:22
问题 I have data in the form (x, y, z) where x and y are not on a regular grid. I wish to display a 2D colormap of these data, with intensity (say, grey scale) mapped to the z variable. An obvious solution is to interpolate (see below) on a regular grid, d <- data.frame(x=runif(1e3, 0, 30), y=runif(1e3, 0, 30)) d$z = (d$x - 15)^2 + (d$y - 15)^2 library(akima) d2 <- with(d, interp(x, y, z, xo=seq(0, 30, length = 30), yo=seq(0, 30, length = 50), duplicate="mean")) pal1 <- grey(seq(0,1,leng=500))

How do I derive a Voronoi diagram given its point set and its Delaunay triangulation?

半腔热情 提交于 2019-11-28 17:52:44
I'm working on a game where I create a random map of provinces (a la Risk or Diplomacy). To create that map, I'm first generating a series of semi-random points, then figuring the Delaunay triangulations of those points. With that done, I am now looking to create a Voronoi diagram of the points to serve as a starting point for the province borders. My data at this point (no pun intended) consists of the original series of points and a collection of the Delaunay triangles. I've seen a number of ways to do this on the web, but most of them are tied up with how the Delaunay was derived. I'd love

Python: Calculate Voronoi Tesselation from Scipy's Delaunay Triangulation in 3D

别来无恙 提交于 2019-11-28 16:21:48
问题 I have about 50,000 data points in 3D on which I have run scipy.spatial.Delaunay from the new scipy (I'm using 0.10) which gives me a very useful triangulation. Based on: http://en.wikipedia.org/wiki/Delaunay_triangulation (section "Relationship with the Voronoi diagram") ...I was wondering if there is an easy way to get to the "dual graph" of this triangulation, which is the Voronoi Tesselation. Any clues? My searching around on this seems to show no pre-built in scipy functions, which I