Generate Polygon from points
Posted: Tue Jan 15, 2013 10:29 pm
Hi all,
This question is regarding creating a custom polygon from a set of semi-ordered points. Let me try and explain this clearly:
The Problem:
I have a set of points (xyz coords) that define the outline of a shape. Lets pretend the shape looks like a rain drop. The Z axis goes through the raindrop from bottom to top(straight through the center of the rain drop when the drop is falling)
Now, if you think about slicing the drop with the x-y plane for various z depths, you end up with a bunch of circles, each with a different radius, large towards the bottom of the drop and getting smaller towards the top. I have the points grouped into these circles by z-depth, and points are ordered so that they come one after another around the circle(they are not just randomly placed around the cirle, they are in order)
Knowing all this, I would like to connect all the points together with triangles to create a polygon.
If that doesnt make any sense:
In simplest terms, I have the hull of an object that I would like to make into a polygon. I dont know if the semi-ordering would be of any use.
Does anyone know how I might go about generating the polygon? I've looked at some kind of convex hull algorithm maybe, but im having trouble getting information about doing that in 3D. Eventually I would like to make these models and draw tem in irrlicht, but I dont know the order to connect all the points together.
If anyone has any tips or could point me in some direction, i would greatly appreciate it.
Thank you.
This question is regarding creating a custom polygon from a set of semi-ordered points. Let me try and explain this clearly:
The Problem:
I have a set of points (xyz coords) that define the outline of a shape. Lets pretend the shape looks like a rain drop. The Z axis goes through the raindrop from bottom to top(straight through the center of the rain drop when the drop is falling)
Now, if you think about slicing the drop with the x-y plane for various z depths, you end up with a bunch of circles, each with a different radius, large towards the bottom of the drop and getting smaller towards the top. I have the points grouped into these circles by z-depth, and points are ordered so that they come one after another around the circle(they are not just randomly placed around the cirle, they are in order)
Knowing all this, I would like to connect all the points together with triangles to create a polygon.
If that doesnt make any sense:
In simplest terms, I have the hull of an object that I would like to make into a polygon. I dont know if the semi-ordering would be of any use.
Does anyone know how I might go about generating the polygon? I've looked at some kind of convex hull algorithm maybe, but im having trouble getting information about doing that in 3D. Eventually I would like to make these models and draw tem in irrlicht, but I dont know the order to connect all the points together.
If anyone has any tips or could point me in some direction, i would greatly appreciate it.
Thank you.