POV-Ray : Newsgroups : povray.general : Vector calculation/rotation problem : Vector calculation/rotation problem Server Time
31 Jul 2024 00:31:25 EDT (-0400)
  Vector calculation/rotation problem  
From: Severi Salminen
Date: 16 Feb 2008 09:04:58
Message: <47b6ed8a@news.povray.org>
I'm trying to create a random uniformly distributed vector through a
hemisphere positioned at the intersection point between ray and an
object. I can already create a random vector but how do I quickly/easily
rotate it based on the desired hemisphere orientation?

I use left-handed coordinatesystem: x is right, y is up, and z is forward.

Let's have a vector V which is random vector inside a hemisphere which
has a pole at 0,1,0 (just like the northern hemisphere of Earth). I want
to orient the vector inside a hemishere which has a pole pointing at
vector N. How do I do this? I'd prefer something that can be done
without expensive trigonometric functions - if possible.

PS. If this is the wrong forum, please advice.


Post a reply to this message

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