POV-Ray : Newsgroups : povray.binaries.images : Am I just too stupid for programming?!? : Re: Am I just too stupid for programming?!? Server Time
31 Jul 2024 20:16:45 EDT (-0400)
  Re: Am I just too stupid for programming?!?  
From: Warp
Date: 20 Apr 2009 05:52:54
Message: <49ec45f6$1@news.povray.org>

>   face_indices
>   {
>     638398 // added (399-1)*2 = 796

  The nice thing about povray SDL is that you can write math. No need to
precalculate anything. Thus you can write:

  face_indices
  {
    399*800

>         #if (b=799 & a=398)
>           <319999, 319200, 318400> // last triangle
>         #else
>           <(a+1)*800+b, (a+1)*800+b+1, a*800+b+1>,
>         #end

  There's no need to do that. Instead of all that, just use:

          <(a+1)*800+b, (a+1)*800+b+1, a*800+b+1>

  (Note no comma at the end.)

  The SDL is flexible about commas. Use that fact to your advantage.


Post a reply to this message

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