POV-Ray : Newsgroups : povray.general : mesh to mesh2 conversion : Re: mesh to mesh2 conversion Server Time
6 Aug 2024 08:10:56 EDT (-0400)
  Re: mesh to mesh2 conversion  
From: Ian Shumsky
Date: 23 Apr 2002 15:59:23
Message: <3cc5bd1b@news.povray.org>
Hi Warp,

Yeah, it is a crap piece of code, but it did the job I needed when I wrote
it. I had some small meshes (Gilles' grass mesh and some random generated
stone shapes) which needed converting and about 10 minutes of spare time,
hence the lack of memory management, doubles, linked lists, binary trees,
etc.

Any self-respecting mesh to mesh2 converter should be able to (efficiently)
handle a large mesh object as well as supporting all the new mesh2
functionality.

Now only if RL didn't get in the way I'd be able to get it sorted by the
morning...

Cheers,
Ian.

http://www.outerarm.demon.co.uk/graphics/graphics.html


Warp <war### [at] tagpovrayorg> wrote in message news:3cc5b904@news.povray.org...
> Ian Shumsky <ian### [at] outerarmdemoncouk> wrote:
> >  char x[64];
> >  char y[64];
> >  char z[64];
>
> > vertex vlist[10000];
>
>   Buffer overflow warning lights just exploded. ;)
>
>   (This also limits the number of vertices to 10000. Why? In practical
meshes
> there can be hundreds of thousands of vertex points.)
>
> > int vmatch (vertex temp_vertex)
> > {
> >  int i;
>
> >  for (i = 0; i < vindex; i++)
> >  {
> >   if ((strcmp (vlist[i].x, temp_vertex.x) == 0) &&
> >    (strcmp (vlist[i].y, temp_vertex.y) == 0) &&
> >    (strcmp (vlist[i].z, temp_vertex.z) == 0))
> >   {
> >    return i;
> >   }
> >  }
>
> >  return -1;
> > }
>
>   No offence, but that's one of the slowest way of doing it.
>
> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb
x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// -
Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.