POV-Ray : Newsgroups : povray.advanced-users : Limited line-of-sight test? : Re: Limited line-of-sight test? Server Time
15 May 2024 18:51:47 EDT (-0400)
  Re: Limited line-of-sight test?  
From: Cousin Ricky
Date: 31 Jul 2015 11:09:55
Message: <55bb8fc3$1@news.povray.org>
On 07/29/2015 02:46 AM, MichaelJF wrote:
> I never learned of such a built-in function, but I think the following test will
> not increase the parse time dramatically. [snip]
>
>     [snip]
>
> #declare ObstacleHit=false;
> #if (vlength(Test)>0) // trace successful
>     #if (vlength(TestDirection)>vlength(Hit-Pt1) )
>        #declare ObstacleHit=true;
>     #end
> #end

Thank you.  I was afraid to try anything involving vlength() because of 
the implicit square root calculation, but your idea turns out to be 
faster than the other ideas I tried.

It seems that the complexity of the SDL makes more of a difference than 
the complexity of the underlying calculation, at least in this case. 
This now has me wondering what an LR(k) parser would do for POV-Ray 
parse times.


Post a reply to this message

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