POV-Ray : Newsgroups : povray.off-topic : Re: stochastic (monte-carlo) tracing : Re: stochastic (monte-carlo) tracing Server Time
7 Sep 2024 01:21:16 EDT (-0400)
  Re: stochastic (monte-carlo) tracing  
From: Ray Bellis
Date: 12 Sep 2008 14:18:18
Message: <48cab26a@news.povray.org>
> BTW, I implemented simple "rough" reflections earlier today.  That
> algorithm was trivial:
>
>  d = original_reflection_direction
>  s = surface_smoothness
>  if (s > 0) {
>    pt = random_vector();
>    d += s * pt;
>    normalize(d);
>  }
>  cast_new_ray(d);
>
> I haven't checked that it's mathematically accurate (it's possible
> that the distribution of the pertubed ray around the original
> direction isn't uniform) but it looks nice enough.

p.s. I've uploaded a sample image to:

http://ray.bellis.googlepages.com/mc-balls-01.jpg

A lot of the noise on that image is from the JPG compression.  This is from 
1.75 hours of rendering on a MacBookPro (Core2Duo)

Ray


Post a reply to this message

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