POV-Ray : Newsgroups : povray.advanced-users : Limited line-of-sight test? : Re: Limited line-of-sight test? Server Time
14 May 2024 23:05:52 EDT (-0400)
  Re: Limited line-of-sight test?  
From: Le Forgeron
Date: 29 Jul 2015 03:16:31
Message: <55b87dcf$1@news.povray.org>
Le 29/07/2015 08:49, scott a écrit :
>> Is there some function or quick method of determining whether or not an
>> object blocks the line-of-sight between two points?  The trace()
>> function, on its own, is subject to false positives.  For example:
>>
>>    #declare Obstacle = torus { 3, 1 }
>>    #declare Pt1 = <-1, 0, 0>;
>>    #declare Pt2 = <1, 0, 0>;
>>    #declare Test = <0, 0, 0>;
>>    trace (Obstacle, Pt1, Pt2 - Pt1, Test)
>>
>> The torus does not block the line of sight between Pt1 and Pt2,
>
> I think you'll find it does :-)
>

1. it's the line of sight from Pt1 toward Pt2
2. trace report an intersection
3. if I'm correct, the intersection is after Pt2

internal clear area of Obstacle is -2 to 2 on X axis ( +/- 3 -/+ 1 )

You are both correct, it's only a matter of checking where is the result 
of trace in regards to the pt1/pt2 segment, or not.


Post a reply to this message

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