|
From: Per W. <pw...@ia...> - 2004-07-01 10:57:26
|
In this case you store the triangles in a long list. However, you don't
mention if there are any geometric properties of the loaded trianges. Are
they completely random (in x, in y, in z, in size, in normal directions
etc), or is there some important geometric properties to make use of
when processing them?
What do you expect to get out of your work? A two-dimensional "blanket" of
z-values or are you trying to create the 3-dimensional (convex or
non-conves) of the triangles?
If the triangles are completely random and with not too large size
differences, an easy solution is to just perform ray-tracing - or actually
ray casting - without any perspective transform for the rays, i.e. all
rays parallel. A simple BSP tree - or maybe an octree - would allow quick
intersection tests by reducing number of triangles to test.
Scanline conversion might also be used to process the triangles. However
both scanline conversion and ray-tracing will generate a blanket of fixed
spacing - of course possible to postprocess later.
It is also possible to use space subdivision - such as BSP trees to
directly emit polygonals representing the blanket. If the original "soup"
of triangles have random z coordinates (or maybe "r" coordinates if this
is a problem in polar space) this will require a number of vertical
(radial) polygons to handle steps in the z (r) dimension.
/Per W
On Thu, 1 Jul 2004 mi...@al... wrote:
> Hi Per,
> I am 'that' Michele that makes some strange questions, unsubscribed for
> a while...
> happy to meet again your attention.
>
> The polygons are triangles stored in a structure like this:
>
>
>
> struct element{
> float vertex[3][3];
> float normal[3][3];
> element *newElement;
> }
>
> in a 'record'.
>
> element *one,*start=NULL;
>
> //If a new triangle comes
> one=new element;
>
> one->vertex[0][0]=...
> ...
> one->element=start;
> start=one;
>
> There aren't holes in the geometry (for now), but I would like to smooth it.
> thanks.
>
>
>
>
> Da: pw...@ia...
> Data: Jul 1, 2004 11:43:20 AM
> A: mi...@al...
> Cc: dev...@li...
> Ogg: Re: [Dev-C++] polygon soup
>
> Might you give us a bit more information about the polygons - are they a
> ordered in a two-dimensional matrix? May they overlap in z order? Are
> there holes in the geometry?
>
>
>
>
|