POV-Ray : Newsgroups : povray.general : intersection test : Re: intersection test Server Time
30 Jul 2024 22:26:04 EDT (-0400)
  Re: intersection test  
From: Alain
Date: 16 Apr 2008 12:03:11
Message: <4806233f@news.povray.org>
en ce 2008/04/16 06:29 :)   ->

> Since the random generator in POV is deterministic, this will fail
> in deterministic ways... it won't introduce jittered movment to an
> animation for example, but yeah, it can fail to detect collisions if
> the rez used is low. Something like 30000 is enough to detect hard
> cases, but it's quite slow for that... I was thinking about re-writing
> it to use trace, that might improve the accuracy a bit. 
> 
> 
You pick a random point on one of the faces of the bounding box and shoot toward 
the oposite face. Using the smalest face will probably help.
You exit on the first non-zero normal.
Advantage of using trace:
Advantage: you no longer test points but lines. One test will check millons of 
points.

-- 
Alain
-------------------------------------------------
Stay out of my head, its a bad neighborhood.


Post a reply to this message

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