Surface reconstruction from 2 planar contours [closed] - algorithm

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
There is a class of algorithms for triangulation between two planar contours. These algorithms try to make a "good triangulation" to fill a space between these contours:
One of them (Optimal surface reconstruction from planar contours) is based on the dynamic programming technique and uses a cost function for determining which triangulation is acceptable according to the minimum cost.
A minimal triangle area as a cost function makes a good result in most of cases (Triangulation of Branching Contours using Area Minimization), but, unfortunately, not in all of them.
For example when you have two rectangle contours that are shifted from each other.
As you can see, according to the minimal area criteria, all points from the contour \alpha will be connected to the point A of the contour \beta, that is not true (a correct triangulation must be a "tube" through both curves, instead of two tetrahedrons).
So my questions are:
1) Does any algorithm that deals with two contours better than the dynamic programming based one exist?
2) If not, which criteria for the cost function can provide a better result?

Related

Is there a generalization of Voronoi Diagrams to curves in the plane? [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 months ago.
Improve this question
I've studied Voronoi Diagrams and Fortune's Algorithm before. What I'm curious about is if there's a generalization of Voronoi diagrams where instead of the input being a set of points, it is instead a set of non-intersecting curves in the plane, where we want to partition the plane into regions based off the Euclidean distance to the nearest curve.
Is this problem well defined and is there any known (hopefully efficient) algorithm to compute this generalization?
I've tried searching for an answer to this, but most resources seem to focus on curved metric spaces or curved regions rather than the input set itself being composed of non-points.
Edit:
If this isn't well defined for non-intersecting curves, will it work for line segments?
Yes, the Voronoi diagram is defined for arbitrary point sets and other distances than Euclidean. A quick web search gives you as many examples as you want. Intersecting curves are also possible.
The construction of the diagram for a set of line segments is well documented. The cells are bounded by line segments and parabolic arcs. If I am right, Fortune's algorithm generalizes to this case.
For general curves, the problem gets harder. In all cases, you need to derive the equation of bisector lines, and intersect them correctly to delimit the proper arcs at triple points.
A digitized version (on a raster grid) is easier and will work with any kind of shape. It is similar to the computation of a distance map, and can be performed in time linear in the number of pixels.

Algorithmic question: Best angle to view trees from fixed camera [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I was asked this question in an interview, have no clue how to solve it.
"Given a fixed camera in a forest (with predefined trees), give the best angle in which the camera pictures the maximum of trees"
How would you approach it or at least what questions would you ask to get more requirements?
If trees don't obscure over trees then:
Sort all trees by angle around the camera position.
Use sliding window approach to find direction to look at.
If trees can obscure other trees then the second step is a bit trickier.
the idea is this:
convert the list of tree coordinates to a list of angles.
sort the list of angles
use a sliding window to find the starting and ending indices that maximize the number of trees.
note: because the best angle to position the camera might actually be very near the 360 degree, you need to take into account trees on the other side of the 360/0 line. The easiest way to handle that is to add duplicate trees to the list (in step 2) with a 360 shift. for example, a tree in degree 10 would be added twice, at degree 10 and 360+10. you don't actually need to add ALL the trees twice - you only really need to duplicate trees in the range 360+camera_angle, but its easy to just duplicate all the trees and it doesn't hurt.

How to find the largest circle that lies within boundaries of Polygon with genetic algorithm? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to implement code that finds the largest circle that lies within boundaries of polygon with genetic algorithm.
Does anyone ha any idea?
There probably is a known algorithm in computational geometry for doing this exactly. If you want to do it using a genetic algorithm and are satisifed with a good circle rather than an optimal circle, then that is certainly possible (although an evolutionary algorithm seems a bit more natural). Circles can be represented by triples of the form (x,y,r). Mutation operators can bump the coordinates in various ways (e.g. a normally distributed increment). Cross over would be something like e.g. (a,b,c) x (d,e,f) => (a,e,f), (d,b,c). You need an objective function. Conceptually it is area -- but it is hard to make sure that the constraints are always satisfied. What you could do is use as an objective function the area minus a penalty for each violated constraint. The penalty can be adjusted to eventually kill-off all circles which violate the constraint but shouldn't be so large that it prevents all parts of the solution space from being explored. Such parameters often need to be tweaked on a trial-and-error basis.

Factors to find weight painting formula for Auto-Rigging [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to re-implement Auto-rigging for human skeletons. (similar to Blender and Mixamo's)
For each vertex in the human skin, I've to find the joints that affect this vertex. (I could do this.)
Now I've to find how much each joint should affect this vertex. (assigning weights for each vertex)
The human skin can be represented by an array of traingles each containing 3 vertices and the joints can be represented by array of vertices.
Note that each vertex can be affected by n number of joints(n>=1) which means no vertex should remain un-weighted.
I can manage to construct a connected graph of the skin. I don't know how to assign weights for each vertex from this graph. Help/Suggestions?
This may explain your case. The algorithm is too big. For me it explains the things well. Have a look
http://people.csail.mit.edu/ibaran/papers/2007-SIGGRAPH-Pinocchio.pdf

inverse of voronoi diagram [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I work in GIS. I have a set of polygons. I would like to make an algorithm which first check if the polygon set is a valid Voronoi diagram. If yes then returns the set of points which can generate the same voronoi diagram.
Can anybody help me how to go for it
Thanks
A short summary of this SO answer, which uses the term Thiessen polygons instead of Voronoi diagram:
This problem has been solved by Biedl et al, Recognizing Straight Skeletons and Voronoi Diagrams and Reconstructing Their Input, ISVD 2013.
The problem is simpler for some special cases, but not so trivial for general input. Note that for some input there might be infinitely many solutions, i.e., point sets with the same Voronoi diagram:
The paper by Biedl et al. presents an algorithm that (i) checks whether a polygonal tessellation is a Voronoi diagram and (ii) determines all possible point sets whose Voronoi diagram is equal to the tessellation.
The basic idea is the following: Consider a rooted spanning tree of the dual of the Voronoi diagram and keep propagating local restrictions at Voronoi nodes to a root Voronoi region. The intersection of this restrictions gives all possible solutions.
See more details in the other SO answer.

Resources