For the volume, simply see wikipedia, under "Orientable polyhedra". You want the formula with volume = 1/3 * sum...

If I am right, you can enumerate all relevant configurations by noting that if the left side of a rectangle is more to the left than the left side of the other, then its two left vertices are on the convex hull. With the same reasoning in the four cardinal...

python,3d,scipy,delaunay,convex-hull

Some things: You give points[hull.vertices] as an argument to Delaunay, so the integers in tri.simplices are indices into points[hull.vertices], not into points, so that you end up plotting the wrong points Tetrahedra have 6 ridges, but you are only plotting 4 If you need just the triangulation of the convex...

javascript,algorithm,image-processing,convex-hull,concave-hull

Alpha shapes is defined by finding the delaunay triangulation of a set of points and then delete edges that exceed alpha. You need the delaunay triangulation but not the circles. It's also works with lines. To calculate the shape with JS you can use TopoJSON or try this answer:Calculate bounding...

algorithm,time-complexity,convex-hull

Well you do have linear complexity because: For (i=1 ... n) grants an n factor to the complexity so until now O(n) In the nested while loop you have the condition (L size >= 2 && it will also check if you do make a counter-clockwise turn(that should be done...

matlab,plot,data-visualization,scatter-plot,convex-hull

In the end, I came up with the following: Use scatterhist to create the scatter plot with marginal histograms. hold on Use convhull to get the convex hull for each group of points. Use fill to draw the convex hull. ...

python,computational-geometry,convex-hull,convex-polygon

In this answer, I will assume you have already used PCA to near-losslessly compress the data to 4-dimensional data, where the reduced data lies in a 4-dimensional polytope with conceptually few faces. I will describe an approach to solve for the faces of this polytope, which will in turn give...

There is no way to do it out-of-the box. You need to test for each edge whether the four points are coplanar.

All you really need to do is create a Point2D object (using the coords in your .txt file) at each iteration of the loop, then add that object to your array list of Point2D objects: For example: ArrayList<Points2D> p = new ArrayList<>(); Scanner numFile = new Scanner(new File("myValues.txt")); String pointOnLine...

performance,algorithm,computational-geometry,point,convex-hull

Looks like you can. Sort vertices in a[] by polar angle relative to one of vertices (call it A). O(N log N), like convex hull computation. Read point, determine its polar angle. O(1) Find two neighbor vertices, one of them should have polar angle less than point from step 2,...

c++,algorithm,computational-geometry,convex-hull

If I understand the problem correctly, you can use the following scheme. First, make the copies of your original arrays (call them visible_set_for_sorting and horizon_set_for_sorting). Then sort them. Then form the intersection in the following way: std::set<int> intersection; std::set_intersection( visible_set_for_sorting.begin(), visible_set_for_sorting.end(), horizon_set_for_sorting.begin(), horizon_set_for_sorting.end(), std::inserter(intersection, intersection.begin())); Now you can iterate any...

algorithm,computational-geometry,convex-hull

Here's an O(log h)-time algorithm that, given a convex hull with h vertices in sorted order and a query point, tests whether the query point lies on the hull. From the hull, compute a point in the interior by averaging three of its vertices. Call this point the origin. Partition...

java,algorithm,convex-hull,grahams-scan

Here is the right way to build the convex hull after sorting the points: onHull = new List() for p <- sorted list of points(including the first one) while onHull.size() >= 2 && isRight(onHull[onHull.size() - 2], onHull[onHull.size() - 1], p) onHull.popBack() onHull.pushBack(p) return onHull ...