I have a set of lines with points on them. I need to turn that into a set of polygons, the smallest empty polygons I can make out of them.
I'm going to try to have it find the polygon around the origin, then take each segment and find the smallest polygon that includes that segment on the otherside...
wtf coders
Name:
Anonymous2008-05-13 2:59
in 2 dimensions or three? What significance do the lines have besides containing the points?
Name:
Anonymous2008-05-13 3:14
2 dimensions. better post at 7chan/pr/ but i'll copy the text:
I am trying to write a program that takes a net, that is integer combinations of two (2d) basis vectors that aren't necessarily ortho, and break them up into zones based on how many points on the net the origin is closer to.
That is, if the origin is closer to all of them, it is the first zone, if it is closer to all but one it is the 2nd, etc. Picture very related.
'm writing this in python. I've tried this in a depressing number of different ways. The most promising was to turn the vertices into a graph, which I think I have implemented, and go from there.
The program would look for the smallest polygon, then look for polygons outside each edge of the polygon and keep going from there.
Any advice on this though? I've been looking at this for so long that I feel numb.. I already know I suck at programming but come on. It shouldn't be very hard even for an idiot like me.
I might add that efficiency matters in this... Also, floating point arithmetic seems like it will begin to fuck up past the 5th or 6th zone.
>>3
You don't explain things very clearly, but what I'm guessing you mean is that you want an algorithm that defines a polygon completely enclosing a given set of points. Is that right?
Name:
Anonymous2008-05-13 8:59
The branch of computer science that involves such things is ``computational geometry''. There's plenty of reading material on university websites about the techniques you'll need. Here's some to start you off:
The value of tmp and all was packed standing room only Finally the clearest explanation and example of how they work If I want to cum all over the fucking floor.