POV-Ray : Newsgroups : povray.beta-test : HF* macros issues : Re: HF* macros issues Server Time
29 Jul 2024 16:29:05 EDT (-0400)
  Re: HF* macros issues  
From:
Date: 30 Apr 2002 08:08:16
Message: <gcuscuc9duc0il44bo0p3q4sllgupmtaan@4ax.com>
On Mon, 22 Apr 2002 20:55:31 +0200, "Rune" <run### [at] mobilixnetdk>
wrote:
> W?odzimierz ABX Skiba wrote:
> > Your changes seems better now except AFAIK you not
> > necessary normalize vector before calculating cross
> > product
>
> Sheesh, I knew that! How could I forget?
> Anyway, I have rewritten the HF macros completely for the next beta.
> They now work with mesh2 instead of mesh. Maybe you would like to have a
> look at them?

Yes. I looked at this and ... You made exactly the same mistake as above. :)

And additional note to mesh2 creation process. You can remove condition inside
loops in HFCreate_(). Just don't close and don't open #write directive before
and after condition. Look for changed case of first loop of HFCreate_():

   #if(WriteFile)
      #fopen _HFMACRO_OUTPUT_FILE FileName write
      #write(_HFMACRO_OUTPUT_FILE,"mesh2 {\nvertex_vectors {",xRes*zRes,",\n",
   #else
      mesh2 {vertex_vectors{xRes*zRes,
   #end
   
   #local J = 1;
   #while (J<=xRes)
      #local K = 1;
      #while (K<=zRes)
         PArr[J][K]
         #declare K = K+1;
      #end
      #declare J = J+1;
   #end
   
   #if(WriteFile)
      ,"}\n")
   #else
      }
   #end


ABX


Post a reply to this message

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