POV-Ray : Newsgroups : povray.general : Shooting rays : Re: Shooting rays Server Time
29 Jul 2024 04:26:31 EDT (-0400)
  Re: Shooting rays  
From: scott
Date: 11 Mar 2013 04:15:08
Message: <513d928c@news.povray.org>
> I have a container A (not at the origin) and, inside this container, an
> object B at a random location.

Are there any limitations on the shape of A and B, or could they be 
anything?

> Using trace() I want to determine what is
> the closest distance between B and the boundary of A in the X-Z plane,

Do you mean from some centre point of B, or from the surface of B? What 
I think you want is the shortest line connecting the surface of A and B 
that is in a plane parallel to the XZ plane? Is that right? That doesn't 
sound trivial to me.

> My main problem is shooting rays around from B as I have trouble
> rotating the ray direction vector around the local Y-axis. I experiment
> with vaxis_rotate() but do not get consistent results as it seems that
> the axis (always?) passes through the origin.

I'm not sure exactly what you're trying (haven't analysed your code) but 
you can always translate to the origin, rotate, then translate back 
again to rotate around a specific axis.


Post a reply to this message

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