POV-Ray : Newsgroups : povray.general : Bounce vectors : Re: Bounce vectors Server Time
29 Jul 2024 12:29:51 EDT (-0400)
  Re: Bounce vectors  
From: Christian Froeschlin
Date: 13 Jul 2011 19:57:50
Message: <4e1e30fe@news.povray.org>
Some Yahoo wrote:

> ok, lets pretend I failed 3D calculus...

that's no problem you only need linear algebra ;)

> Sphere is <0,0,0>,100

You can use the trace function to find the intersection point
of the precollision path with the target surface. This will also
give you the normal vector (of course, in the case of a hollow
sphere this will just point to the sphere center). Mirroring the
in vector with the surface normal gives you the (inverted) out
vector. Probably the easiest way to do the mirroring is to
rotate 180 degree about the normal using vaxis_rotate.


Post a reply to this message

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