POV-Ray : Newsgroups : povray.general : mesh to mesh2 conversion : Re: mesh to mesh2 conversion Server Time
19 Nov 2024 05:31:08 EST (-0500)
  Re: mesh to mesh2 conversion  
From: Warp
Date: 23 Apr 2002 15:41:57
Message: <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.