POV-Ray : Newsgroups : povray.programming : oddity in media.cpp : Re: oddity in media.cpp Server Time
30 Jun 2024 13:00:34 EDT (-0400)
  Re: oddity in media.cpp  
From: Wolfgang Wieser
Date: 17 Oct 2004 05:24:13
Message: <41723a3c@news.povray.org>
Nathan Kopp wrote:

> Looking at it all these years later, the only think I know for sure is that
> this is ugly code in high need of refactoring and better commenting!
> 
Actually, I had a look at the media code some time back when experimenting 
with media-based clouds and got the same impression. After having patched it 
so that half of these "dozens of function arguments" were stuffed into one data 
structure, I begun to understand what it was doing...

> Maybe it would be worthwhile to create some POV scenes that would test this.
> You can try different algorithms to see which produces the correct result.
> If/when you manage to find the correct algorithm, please post your
> recommendations here so that we can incorporate the fix into the official
> version of POV.  Thanks!
> 
...beause I wanted to implement a different integration algorithm. 

What is the mathematical reason to use MCI (Monte-Carlo integration) for 
sampling along the ray? For smooth density functions, some normal 
adaptive numerical integration algorithm (e.g. adaptive simpson rule) should 
give results comparable to MCI with much less evaluation points, shouldn't it?

Wolfgang Wieser


Post a reply to this message

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