POV-Ray : Newsgroups : povray.programming : silly question probably Server Time
5 Jul 2024 15:15:24 EDT (-0400)
  silly question probably (Message 1 to 1 of 1)  
From: Scott Shannon
Subject: silly question probably
Date: 12 Jan 2003 01:12:46
Message: <3e21075e$1@news.povray.org>
I have just recently been looking at the pov source code to get some
ideas for my own raytracer. Anyway, looking through the sor.cpp
source I see the following if at the start of the intersect_sor function...

 if (((D[Y] >= 0.0) && (P[Y] >  Sor->Height2)) ||
      ((D[Y] <= 0.0) && (P[Y] <  Sor->Height1)) ||
      ((D[X] >= 0.0) && (P[X] >  Sor->Radius2)) ||
      ((D[X] <= 0.0) && (P[X] < -Sor->Radius2)))
  {
    return(false);
  }

I'm probably missing something, but why isn't there equivalent
lines for the Z coord as for the X? I have put the Z tests into
a test sor.cpp and ran it with the sor1.pov scene example
file, with a camera pos of (60,60,-10), antialias on, 1000x800
res and bounding volumes off. This takes about 1min 28 secs
on my 'puter, but with the Z statements added it takes 1min 26 secs.
Ok, so not much of a speed up, but still, it's a speed up. Why was
the Z tests in this if statement left out when it seems (seems to
me anyway!) that they should be in there?
Anyway, just curious :)

S


Post a reply to this message

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