I need an efficient approach to finding the intersection of a cuboid and a tetrahedron.
I am new to CGAL but got some basic experience in using it. Currently, I am following a post and using the suggested intersection operation N1 * N2, where N1,N2 are Nef polyhedrons. But it is not efficient and in fact VERY slow.
Anyone can help with an even more efficient usage of CGAL or the similar library to do this.
If any possibility, a simple tutorial example would be mostly appreciated.
Thank you very much and I appreciate your any hint.
Rong
Related
I know that when your sweepline encounters three centers of your array, you have to check if there is something called "circle points".
I understand that circle points are the poles of the circle that goes through the other 3 points, but my questions is, which is the efficient way to do this, because what you really want is the center of the circle which is the vertex of three Voronoi poligons, so what came to my head is to find the three mediatrices and the intersection of the three will be the center, but it seems to me that if I do that the algorithm will be mor closely to a brute force algorithm, I hope you could help me with this, thanks in advance
EDIT: I think it's worth saying that I'm working on Julia, and that I've already done two brute force algorithms, one aproximate and one exact
There is a rather good and detailed description of this algorithm in this course book:
https://www.springer.com/gp/book/9783540779735
They explain how efficiency is obtained by adding pointers between the status tree and the parts of the diagram being constructed.
Maybe it can help. I have not implemented the algorithm myself.
I am working on a tool which modifies geometries. One task is to move points that their (Euclidian) distances among each other are bigger than a given distance by considering that the sum of the moved ways is a minimum. A non-iterative solution which does not measure distances in between is preferred.
I need a algorithm in 3d, but a 1d or 2d explanation as a starting point would be very welcome.
The later coding will be in Python. In case a solution already exists I would use it.
A link to a book or paper related to this problem would be also helpful.
Thanks Hans G
I'm actually trying to implement image matching using SIFT algorithm.
But I'm actually stuck, and I wonder if you can help me.
I have the first step ( the descriptors, with x and y, and all the 128 features vectors ) and I'm now trying to do the KD-tree in order to search the nearest neighbor of each descriptors. I understood the concept of kd-tree, but I don't understand on what I have to separate the descriptors. I have to make the KD-tree based on their (x,y)? If yes, how can it helps me, since I have to find the nearest neighbor using the descriptor? Maybe I have not understand what I had to understand?
Thanks in advance!
Best regards!
I have spent time looking for information on the best algorithm to create a nesting of irregular polygons in 2D using manual and automatic positioning. I need to use such an algorithm in the context of CAD/CAM software. Here are the real possibilities I've found so far:
Separating Axis Theorem: is a fairly quick and simple algorithm to implement, but the drawback I find with it is that it only works with convex polygons. To work with concave polygons, a convex decomposition would need to be done first. This implies an increase in the run-time and the implementation of a new algorithm that decomposes the concave polygon into convex polygons.
Nesting by a power function: calculating the partial derivatives in the X and Y axes, you could get the escape direction you should take a polygon so that there is a collision between the two polygons. This function of energy and I tested and the three major problems that I have encountered are: first obtaining local minima , second nesting when the collision occurs over a piece and finally the execution time is very high.
Using no-fit polygon: use the no-fit polygon to the nesting can be somewhat interesting. I have read several papers on the subject although there are very few online documentation on it. Not sure if it can really be a useful choice. I still have several doubts on the details of this approach.
Any idea which of these algorithms to choose? Or if you know any other options that can be used? I'm a little confused :-) .
Thank you very much.
I am trying to create a polygon in VB6 using the polygon function.
I have many points in random order that I would like to create the polygon with.
Unfortunately, the order is important when developing a polygon, as i get a jagged looking polygon, as opposed to a nice closed polygon.
I was wondering if anyone had any good ideas/tricks to develop an algorithm that can go through these points and put them in an appropriate order.
Thanks so much!
To keep things simple and the solution unique, you should start with a convex hull algorithm like this one ("Gift Wrapping"):
http://en.wikipedia.org/wiki/Gift_wrapping_algorithm
Should not be too hard to implement in VB. If you have problems with that, ask a new question.
I used the Graham Scan Algorithm to actually go ahead and solve this problem.
http://en.wikipedia.org/wiki/Graham_scan
If you follow the pseudocode, be careful.
The line
while ccw(points[M-1], points[M], points[i]) <= 0:
Should be
while ccw(points[M-1], points[M], points[i]) >= 0: