computational-geometry

robust algorithm for surface reconstruction from 3D point cloud?

喜欢而已 提交于 2019-11-26 19:18:15
I am trying to figure out what algorithms there are to do surface reconstruction from 3D range data. At a first glance, it seems that the Ball pivoting algorithm ( BPA ) and Poisson surface reconstruction are the more established methods? What are the established, more robust algorithm in the field other than BPA and Poisson surface reconstruction algorithm? Recommended research publications? Is there available source code? libeako I have been facing this dilemma for some months now, and made exhaustive research. Algorithms Mainly there are 2 categories of algorithms: computation geometry, and

Path generation for non-intersecting disc movement on a plane

南笙酒味 提交于 2019-11-26 16:55:00
问题 What I'm looking for I have 300 or fewer discs of equal radius on a plane. At time 0 each disc is at a position. At time 1 each disc is at a potentially different position. I'm looking to generate a 2D path for each disc for times between 0 and 1 such that the discs do not intersect and the paths are relatively efficient (short) and of low curvature if possible. (for example, straight lines are preferable to squiggly lines) Lower computation time is generally more important than exactness of

Fill arbitrary 2D shape with given set of rectangles

ⅰ亾dé卋堺 提交于 2019-11-26 15:41:23
问题 I have a set of rectangles and arbitrary shape in 2D space. The shape is not necessary a polygon (it may be a circle), and rectangles have different widths and heights. The task is to approximate the shape with rectangles as close as possible. I can't change rectangles dimensions, but rotation is permitted. It sounds very similar to packing problem and covering problem but covering area is not rectangular... I guess it's NP problem, and I'm pretty sure there should be some papers that show

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line

为君一笑 提交于 2019-11-26 15:30:38
Below is the solution I am trying to implement /** * Definition for a point. * class Point { * int x; * int y; * Point() { x = 0; y = 0; } * Point(int a, int b) { x = a; y = b; } * } */ public class Solution { public int maxPoints(Point[] points) { int max=0; if(points.length==1) return 1; for(int i=0;i<points.length;i++){ for(int j=0;j<points.length;j++){ if((points[i].x!=points[j].x)||(points[i].y!=points[j].y)){ int coll=get_collinear(points[i].x,points[i].y,points[j].x,points[j].y,points); if(coll>max) max=coll; } else{ **Case where I am suffering** } } } return max; } public int get

Find if a point is inside a convex hull for a set of points without computing the hull itself

╄→гoц情女王★ 提交于 2019-11-26 15:14:22
问题 What is the simplest way to test if a point P is inside a convex hull formed by a set of points X? I'd like an algorithm that works in a high-dimensional space (say, up to 40 dimensions) that doesn't explicitly compute the convex hull itself. Any ideas? 回答1: The problem can be solved by finding a feasible point of a Linear Program. If you're interested in the full details, as opposed to just plugging an LP into an existing solver, I'd recommend reading Chapter 11.4 in Boyd and Vandenberghe's

Calculating normals in a triangle mesh

倾然丶 夕夏残阳落幕 提交于 2019-11-26 14:10:00
I have drawn a triangle mesh with 10000 vertices(100x100) and it will be a grass ground. I used gldrawelements() for it. I have looked all day and still can't understand how to calculate the normals for this. Does each vertex have its own normals or does each triangle have its own normals? Can someone point me in the right direction on how to edit my code to incorporate normals? struct vertices { GLfloat x; GLfloat y; GLfloat z; }vertices[10000]; GLuint indices[60000]; /* 99..9999 98..9998 ........ 01..9901 00..9900 */ void CreateEnvironment() { int count=0; for (float x=0;x<10.0;x+=.1) { for

Location of highest density on a sphere

不问归期 提交于 2019-11-26 12:47:29
问题 I have a lot of points on the surface of the sphere. How can I calculate the area/spot of the sphere that has the largest point density? I need this to be done very fast. If this was a square for example I guess I could create a grid and then let the points vote which part of the grid is the best. I have tried with transforming the points to spherical coordinates and then do a grid, both this did not work well since points around north pole are close on the sphere but distant after the

Area of rectangle-rectangle intersection

你离开我真会死。 提交于 2019-11-26 12:27:39
问题 Below are 2 rectangles . Given the coordinates of the rectangle vertices - (x1, y1)...(x8, y8), how can the area of the overlapping region (white in the figure below) be caclulated? Note that: Coordinates of points might be any Rectangles may or may not overlap Assume area is 0 when rectangles don\'t overlap, or they overlap at point or line. If one rectangle is inside the other, then calculate area of smaller rectangle. 回答1: Since you stated that the rectangles may not be aligned, possible

Shortest distance between points algorithm

做~自己de王妃 提交于 2019-11-26 10:51:18
问题 Given a set of points on a plane, find the shortest line segment formed by any two of these points. How can I do that? The trivial way is obviously to calculate each distance, but I need another algorithm to compare. 回答1: http://en.wikipedia.org/wiki/Closest_pair_of_points The problem can be solved in O(n log n) time using the recursive divide and conquer approach, e.g., as follows: Sort points along the x-coordinate Split the set of points into two equal-sized subsets by a vertical line x =

Perpendicular on a line from a given point

余生长醉 提交于 2019-11-26 10:22:50
问题 How can I draw a perpendicular on a line segment from a given point? My line segment is defined as (x1, y1), (x2, y2), If I draw a perpendicular from a point (x3,y3) and it meets to line on point (x4,y4). I want to find out this (x4,y4). 回答1: I solved the equations for you: k = ((y2-y1) * (x3-x1) - (x2-x1) * (y3-y1)) / ((y2-y1)^2 + (x2-x1)^2) x4 = x3 - k * (y2-y1) y4 = y3 + k * (x2-x1) Where ^2 means squared 回答2: From wiki: In algebra, for any linear equation y=mx + b, the perpendiculars will