 |
|
 |
Hello,
Is there a way to construct polygons from all the edges ? And how ?
Regards
|
|
|
|
 |
|
 |
Hello,
I think there is a mistake anywhere, when I draw 2 points the program don't give me 2 area. On each applet I could test (ie : http://www.cs.cornell.edu/Info/People/chew/Delaunay.html) when we draw a least 2 points we can see a line.
I don't understand the difference between the appel and your code
Regards
|
|
|
|
 |
|
 |
2 points is a special case I really didn't spend time on, so it's quite possible it does not handle it. Everything from 3 points up should work fine, though.
|
|
|
|
 |
|
 |
In fact the real problem is that some points are not separated by a line especially near the border of the area. I think it's the "rays" problem expose in some other thread.
Have you got a solution for that ?
Regards
|
|
|
|
 |
|
 |
That is always an issue with your double precision - try normalizing the space of your data points to +/-1 and adjusting the epsilon value.
|
|
|
|
 |
|
 |
I am really sorry to disturb you but where do this adjustments ?
|
|
|
|
 |
|
 |
The provided code is absolutely shitted.
Why if I change epsilon value it will stop working correctly???????????
What epsilon value should be used??? Why 1e-10???? Why not 1e-20????
Did you try it for big numbers, for example: 220034495, 883612293??????
It's really piece of S H I T and I've wasted so huge amount of time on this crap...
|
|
|
|
 |
|
 |
Civil Engineers typically add boundaries, cut holes, and have lines that are not allowed to be crossed by triangles (called breaklines).
Would this code take a lot of changing to introduce these abilities?
|
|
|
|
 |
|
 |
Isn't this beyond the scope of the voronoi algorithm?
In a situation like this, unless I misunderstand, perhaps you want to post-process the voronoi output with some other polygon clipping code; I recommend clipper.
I realise the original message was posted months ago, so this response may not serve much purpose.
|
|
|
|
 |
|
 |
Nice, clean impementation
|
|
|
|
 |
|
 |
You are really stupid clown!!!!!!
Where do you see CLEAN implementation??????
|
|
|
|
 |
|
 |
I found it easy to understand, it solved my problem, so I voted it up.
If that doesn't suit you, I really couldn't care less.
P.S. You might find that a more conciliatory tone and writing correct English will improve your experience here.
|
|
|
|
 |
|
 |
Let me note: the world around would be much better if you had executed yourself.
|
|
|
|
 |
|
 |
This forum is for discussing programming problems.
If, as it appears, you're just trolling, there are plenty of other forums where people will be delighted to have a flame war with you.
Be so good as to go elsewhere.
|
|
|
|
 |
|
 |
i want to use this algorithm, input some point data and get the coordnates of the voronoi polygons of those point data. i tried to understand how this is implemented but it is hard for me. i can input the point data but i can't find from which method i can get the coordinates of the polygons. can you help by telling how i can get the polygon coordinates (from which method?)
dk
|
|
|
|
 |
|
 |
Hi,
I'm looking for a fast way to determine the location of a specified point (x,y) within your VoronoiGraph in C#.
Your VoronoiGraph only returns a list of edges and vertices of the graph. Are they in any specific order?
It would be great if there was an easy way to create a structure for a single Voronoi cell and a list of its neighbor cells.
Is there a fast way to determine in which cell my specified point is? (In literature a logarithmic runtime is said)
Thanks for your help in advance!
|
|
|
|
 |
|
 |
In the special case of 3 data points, all FixedPoints are equal to the unique Vertize, isn't wrong??
i made a test with: (0,0);(10,0);(0,10).
and for each edge the fixedPoint is equal to (5,5).
I hope your answer BenDi... Excellent tool!!
cheers
|
|
|
|
 |
|
 |
That's the proper result: for any three sites -- except when they are perfectly aligned (in any direction), there will be only one vertex, shared by the three edges.
|
|
|
|
 |
|
 |
somebody have a free C# code, to generate the Polygon for each data point using a boundary polygon that could be the convex hull(or extended convex hull) of the data points.
thks.
|
|
|
|
 |
|
 |
Ben,
For following another set of points, algorithum misses the vertex by almost 250 mt.
NODE_ID EASTING NORTHING
6 10494.00016 10092.53629
7 10290.7531 10684.97519
8 9947.773702 11043.95948
9 9776.284008 11059.26798
10 10991.95541 10217.30055
11 10057.01902 10092.5363
It gives 8 edges and 3 vertex, but due to wrong location of vertex 3, egde no 6,7 and 8 have not come out properly. Actual location of vertex 3 should be 9819.40,10578.40. I strongly feel that it should have 4 vertexes.
Could you please look into it.
Thanks,
Sunil Terkar
|
|
|
|
 |
|
 |
Hi,
sorry to hear about that, the only problem I can image is double rounding...
I think what you need is a version of the algorithm based on the decimal class, not on double - should be done by replacing all occurences of 'double' with 'decimal' - please try it.
cheers,
Ben
|
|
|
|
 |
|
 |
Ben
Ok, will give try for this & get back to you. I have one more observation wrt last message, even program doesn't sorts correctly all site nodes on y coordiantes...does it could be the another reason for not producing correct vertex..
Regards,
Sunil Terkar
|
|
|
|
 |
|
 |
Ben,
Tried decimal type also, still its reporting 3 vertex at wrong coordinates. Even this circle at this vertex is not an empty circle.
Please look into this problem.
Thanks,
Sunil Terkar
|
|
|
|
 |
|
 |
I tried the numbers above, and with BenDi's version, I got 5 vertices:
y:10277.582825767151, x:10313.499324681763
y:10489.718951040446, x:9870.995694254938
y:10497.621153995677, x:10719.098572868817
y:10504.131065614873, x:9950.369665759434
y:13717.0357506786, x:12076.964532715061
(not 3 as you report, and neither 4 as you anticipate.)
|
|
|
|
 |
|
 |
Ben,
I have passed on following points to this algorithum,seems its generating atleast one less vertex and one less edge. I have compared voronoi diagram generated by these points wih standard GIS software like MapInfo, is it the thing that you need to address ?
1 399380.8371 -5526801.89
2 400882.095 -5525038.395
3 402256.1277 -5524122.657
4 399247.2089 -5525471.661
5 401383.9145 -5523790.174
Regards,
Sunil Terkar
|
|
|
|
 |