|
|
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
|
|