POV-Ray : Newsgroups : povray.binaries.images : PoV modeling : Re: PoV modeling Server Time
16 Aug 2024 14:25:53 EDT (-0400)
  Re: PoV modeling  
From: Shay
Date: 4 Mar 2002 17:26:12
Message: <3c83f484$1@news.povray.org>
I see now what you are doing. This will be very useful for animation where
the goal is to use as few triangles as possible.

 I have an idea for how to adapt my macro for what you are doing. I think
that the best way to do this would be to store the normals in a
3-dimentional array (Normal_Array[Columns][Rows][8]). Then, write two
macros, one for each case of division. Each of the two macros will figure
the normal of each triangle as it is made and then file that normal with
each of the vertices of the triangle.

The normal of each vertex could then later be found with something like
this:

#declare Triangle_Normal_Sum = 0;
 #declare  Counter = 0;
 #while (Counter < 8)
  #ifdef ( Normal_Array[Column][Row][Counter] )
   #declare Triangle_Normal_Sum = Triangle_Normal_Sum +
Normal_Array[Column][Row][Counter];
  #end             // #ifdef ( Normal_Array[Column][Row][Counter] )
  #declare Counter = Counter + 1;
 #end             // #while (Counter < 8)


#declare Vertex_Normal = vnormalize {Triangle_Normal_Sum}

I think I will try to test this tonight. Let me know if I understood
corectly what you are trying to do.

 -Shay


Hugo <hua### [at] post3teledk> wrote in message news:3c83ef1f@news.povray.org...


Post a reply to this message

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