Tessellate Question--fewest convex polys [message #29251] |
Fri, 08 February 2002 07:31  |
Noname[1]
Messages: 2 Registered: February 2002
|
Junior Member |
|
|
Hello all,
What's the best way to tessellate a polygon so that the resulting
connectivity array contains the _fewest_ number of convex polygons instead
of every single triangle? I don't want to cut up shapes like squares and
octagons, only shapes with concavities or holes like lima beans and donuts.
IDLgrTESSELLATOR always tessellates polygons into triangles, as I understand
it; squares become 2 triangles, octagons become 6 triangles, etc...
Using UNIQ and maybe MESH_MERGE I can get what I want by playing around with
such a connectivity array of triangles, but as I am completely new to this I
wonder if IDL already has this functionality or if this is a common and
proven algorithm--or if I am just missing something obvious (most likely).
Incidentally, what is the name for this type of tessellation? I know I've
seen it implemented before in things like 3D video game level designers.
For now I'd be happy with something that just worked in 2D.
Thanks for any help.
|
|
|
Re: Tessellate Question--fewest convex polys [message #29298 is a reply to message #29251] |
Mon, 11 February 2002 10:47  |
Pavel A. Romashkin
Messages: 531 Registered: November 2000
|
Senior Member |
|
|
I didn't really dig into this but when the returned results were plotted
with IDLgrPolygon, the plotted area was not plotted correctly. Each
triangle is convex, but the way they are arranged (conn. array?) may not
be. Polygon expects a convex dataset so I hoped Tessellator will fix
that. It didn't; it might have been my error (in 2 lines of code), but I
chose not to track it down and just did things differently.
Pavel
Mark Hadfield wrote:
>
> Really? That is not my experience. The tessellator always produces
> triangles, which are convex by definition.
>
|
|
|