POV-Ray : Newsgroups : povray.advanced-users : Limited line-of-sight test? : Limited line-of-sight test? Server Time
15 May 2024 12:25:02 EDT (-0400)
  Limited line-of-sight test?  
From: Cousin Ricky
Date: 28 Jul 2015 22:41:32
Message: <55b83d5c@news.povray.org>
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, but the 
trace() function isn't set up to make that distinction.

I have a rough idea for a solution in mind, but it is likely to be 
costly in parse time.  Is there already a built-in function that I've 
missed, or a fast solution to this problem?


Post a reply to this message

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