🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Sample a random vector in a hemisphere a normal vector is pointing to

Started by
1 comment, last by _WeirdCat_ 7 years, 2 months ago

Hi,

i am currently doing ray-circle intersection and i want to reflect the ray off a circle with a random vector if they intersect. This is the picture I have in my mind:

pic.png

The orange point is the intersection point, the blue line is the normal from the center of the circle to the intersection point, the red dots are possible random points, how could i accomplish this?

Advertisement
I answered a similar question in this thread. Does that cover your case? If not, please give us some more details.

This topic is closed to new replies.

Advertisement