POV-Ray : Newsgroups : povray.advanced-users : collision detection : Re: collision detection Server Time
30 Jul 2024 00:26:36 EDT (-0400)
  Re: collision detection  
From: Chris Huff
Date: 23 Feb 2001 09:25:28
Message: <chrishuff-27B695.09243523022001@news.povray.org>
In article <3a965931$1@news.povray.org>, "Tom Melly" 
<tom### [at] tomandlucouk> wrote:

> Hmm, okay. How about this - if I render the following object:
> 
> #declare X=0.99;//1.1
> 
> intersection{
>   sphere{0, 1 translate x*-X}
>   sphere{0, 1 translate x*X}
>   pigment{Red}
> }
> 
> I will see at the end of render "CSG Intersection succeeded = 0 " (if 
> X>=1) or a positive value (if X<1).
> 
> Now, for collision detection, we are not interested in textures or
> resolution. Would it not be fairly easy (?!?) to write a patch that would
> render two objects as an intersection and return the CSG intersection
> succeeded value?
> 
> The "render" would not have to produce any image output and all textures,
> media, photons, radiosity, etc. could be ignored to speed up the process.

I'm not sure what you mean...are you talking about the render 
statistics, and a setting that makes it simulate rendering without 
actually generating an image or computing textures? That statistic is 
just the number of rays from the camera that hit an intersection, not 
whether there was something left from the intersection or not. Using it 
for collision detection wouldn't work very well, the results would 
depend on whether the objects are visible, how far away they are, how 
large they are, what resolution you are rendering at, etc...it would be 
much more efficient to just code a function that scans the bounding box 
of the object with rays and/or insideness tests.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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