comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Tessellate Question--fewest convex polys
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Tessellate Question--fewest convex polys [message #29244 is a reply to message #29240] Fri, 08 February 2002 08:57 Go to previous messageGo to previous message
Noname[1] is currently offline  Noname[1]
Messages: 2
Registered: February 2002
Junior Member
I already tried MESH_DECIMATE and I'm not sure it does what I want. I tried
to use it to decimate a square. Since a square is already a convex polygon,
the function I need would do nothing to it, just return a connectivity array
of 5 elements: [4, 0, 1, 2, 3]. MESH_DECIMATE either returned exactly the
same thing as the IDLgrTESSELLATOR, a two triangle connectivity array
(something like [3,0,1,2,3,0,2,3]) or else with a different polygon_percent
it just returned one of these triangles, or half the square. This was the
only time I tried to use it, but based on the results on the simplest case I
concluded, probably incorrectly and prematurely, that it would not work. I
can't even test it now because it will take me over an hour to get to a
computer with IDL, but just so that I might have a response waiting when I
get to that computer: Was I doing something wrong? If MESH_DECIMATE really
does what I need, I apologize for this thread and don't bother to answer,
unless there's some trick to using it... I thought I checked it out.
Thanks.



"David Fanning" <david@dfanning.com> wrote in message
news:MPG.16cdae59743c72f19897f9@news.frii.com...
> Noname (parrhasius@altavista.com) writes:
>
>> 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.
>
> I think what you are looking for is MESH_DECIMATE.
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Land Mask data set available? (in lat and lon)
Next Topic: Re: Division of two images

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:31:38 PDT 2025

Total time taken to generate the page: 0.00199 seconds