qhull

how to plot non-convex surface from set of n x 3 data

本秂侑毒 提交于 2020-01-02 07:32:07
问题 Is there a straight forward way to plot a non-convex surface in R? I have used something like the following for convex surfaces and it works fine: xyz <- cbind(y,x,z) tbr <- t(surf.tri(xyz, delaunayn(xyz))) rgl.triangles(xyz[tbr,1], xyz[tbr,2], xyz[tbr,3]) However, for non-convex surfaces, concave areas become filled. I think this is a problem with the function delaunayn() as it uses the Qhull library which does not support constrained Delaunay triangulations or mesh generation of non-convex

Find the projection of a point on the convex hull with Scipy

情到浓时终转凉″ 提交于 2020-01-01 16:48:29
问题 From a set of points, I'm getting the convex hull with scipy.spatial , either with Delaunay or ConvexHull (from the qhull library). Now I would like to get the projection of a point outside this convex hull onto the hull (i.e. the point on the hull that is the smallest distance from the point outside). This is the code I have so far: from scipy.spatial import Delaunay, ConvexHull import numpy as np hu = np.random.rand(10, 2) ## the set of points to get the hull from pt = np.array([1.1, 0.5])

Why does Qhull error when computing convex hull of a few points?

丶灬走出姿态 提交于 2019-12-23 14:12:44
问题 I'm trying to compute the convex hull of 9 points in 10 dimensional space. Through the scipy interface, I'm calling scipy.spatial.ConvexHull(points) and getting QH6214 qhull input error: not enough points(9) to construct initial simplex (need 12) I think the definition of convex hull is well defined regardless of the dimension. What is going on here? Is there a different function I can call that might fix this? 回答1: Maybe projecting the points on a hyperplane before computing the hull will do

C++ CMake FLANN failing when building pcl in vs2012

社会主义新天地 提交于 2019-12-23 09:56:39
问题 Trying to build PCL on VS2012 in Windows 8.1 so I can attempt to integrate my Kinect for Windows v2 sensor with it, however I seem to be running into a bunch of CMake errors that I don't know what to do with. this is partially because I am not very familiar with CMake, and so I am following the tutorial here which outlines the building of dependencies using the CMake GUI. However, throughout this process I have found that the only things that have built properly are the ones I build using

C++ CMake FLANN failing when building pcl in vs2012

故事扮演 提交于 2019-12-23 09:53:42
问题 Trying to build PCL on VS2012 in Windows 8.1 so I can attempt to integrate my Kinect for Windows v2 sensor with it, however I seem to be running into a bunch of CMake errors that I don't know what to do with. this is partially because I am not very familiar with CMake, and so I am following the tutorial here which outlines the building of dependencies using the CMake GUI. However, throughout this process I have found that the only things that have built properly are the ones I build using

griddata: QH6214 qhull input error: not enough points(2) to construct initial simplex

一曲冷凌霜 提交于 2019-12-23 04:39:12
问题 I am trying to create an above-head view heat map of relatively sparse EEG data (27 electrodes). I convert x,y cartesian coordinates of the EEG electrodes to polar, and attempt to map them as such. Each x,y coordinate corresponds to a given value (if you want to know: Hurst exponent) to which I would like the color around that location to correspond. I started with working code from this page and tried to adapt it to my problem. Unfortunately, my adaptation is not working. Here is my code:

Calculating a Voronoi diagram for planes in 3D

给你一囗甜甜゛ 提交于 2019-12-22 10:53:52
问题 Is there a code/library that can calculate a Voronoi diagram for planes (parallelograms) in 3D? I checked Qhull and it seems it can only work with points, in its examples Voro++ works with different size of spheres but I couldn't find anything for polygons. In this image (sample planes in 3d) the parallelograms are 3D since they have a thickness, but in this case the thickness will be zero.! 回答1: Voronoi cells are not parallelograms. You are confused here by the image you posted. Voronoi cell

Regularly spaced orthogonal grid Delaunay triangulation (Computing the paraboloid coeficients)

六眼飞鱼酱① 提交于 2019-12-21 05:38:11
问题 I'm trying to construct a Delaunay triangulation for the very specific case where the input x and y coordinates are orthogonal and relatively equidistant. Given the data size is relatively large (1000x1200 triangulation points) and that the Qhull algorithm doesn't know about my extra orthogonal condition, the triangulation is relatively slow (25 seconds on my machine). As such, I'd like to manually construct a Delaunay triangulation with each of my known quads subdivided into two triangles. I

Volume of Voronoi cell (python)

时光总嘲笑我的痴心妄想 提交于 2019-12-21 04:47:04
问题 I'm using Scipy 0.13.0 in Python 2.7 to calculate a set of Voronoi cells in 3d. I need to get the volume of each cell for (de)weighting output of a proprietary simulation. Is there any simple way of doing this - surely it's a common problem or a common use of Voronoi cells but I can't find anything. The following code runs, and dumps everything that the scipy.spatial.Voronoi manual knows about. from scipy.spatial import Voronoi x=[0,1,0,1,0,1,0,1,0,1] y=[0,0,1,1,2,2,3,3.5,4,4.5] z=[0,0,0,0,0

Volume of convex hull with QHull from SciPy

前提是你 提交于 2019-12-17 18:53:37
问题 I'm trying to get the volume of the convex hull of a set of points using the SciPy wrapper for QHull. According to the documentation of QHull, I should be passing the "FA" option to get the total surface area and volume. Here is what I get.. What am I doing wrong? > pts [(494.0, 95.0, 0.0), (494.0, 95.0, 1.0) ... (494.0, 100.0, 4.0), (494.0, 100.0, 5.0)] > hull = spatial.ConvexHull(pts, qhull_options="FA") > dir(hull) ['__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__format__'