POV-Ray : Newsgroups : povray.general : intersection test : Re: intersection test Server Time: 4 Jul 2008 20:25:47 GMT
  Re: intersection test  
From: Alain
Date: 16 Apr 2008 16:03:11
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 1991-2004 POV-Team™