POV-Ray : Newsgroups : povray.documentation.inbuilt : 3.6.2.2 MEDIA -- SAMPLES has incorrect default value? Server Time: 19 Oct 2019 10:13:33 GMT
  3.6.2.2 MEDIA -- SAMPLES has incorrect default value? (Message 1 to 1 of 1)  
From: Kenneth
Subject: 3.6.2.2 MEDIA -- SAMPLES has incorrect default value?
Date: 26 Oct 2005 07:45:00
Message: <web.435f32c55ceb263713dab1cf0@news.povray.org>
I've been doing a lot of experimentation with media lately, and have come
across what appears to be another mistake in the listed default values,
this one for SAMPLES Min, Max.   Perhaps this has already been addressed.

The default is given as Min 1, Max 1.... but  it seems to be 10,10 instead.

The only way I knew how to really test this assumption was visually, so I
came up with a code example that shows it. Or at least I think it does. I
put a very thin "slice" of absorbing media into a translucent sphere, and
played around with the SAMPLES values to see what would happen.

Here's the code.  The camera is looking at the sphere from slightly above,
to show the interior effects. Un-comment SAMPLES to see what happens. The
only way to visually  "match" the default values is by putting in SAMPLES
10,10.

--------------------
global_settings {assumed_gamma 1.8 max_trace_level 10}

camera {
perspective
  location  <5, 10, -20>
  right     x*image_width/image_height  // aspect
  look_at   <0, 0, 0>
  angle 4
}

//---------------------------------------

light_source {
  0*x
  color rgb .5
  translate <-20, 40, -20>
  shadowless
}

light_source {
  0*x
  color rgb 1
  translate <20, 10, -5>
  shadowless
}

// --------------------------------------------------------------

sky_sphere {
   pigment {color rgb <.5,.7,1>*.5}
                   }

//-----------------------------------

#declare test_sphere =
object{
     sphere{0,.5 hollow
        texture{
                pigment{color rgbt .9}
                   }
        interior{
                media{
                        absorption 8
                        intervals 1
                      //  samples 1,1
                                density {
                                        gradient y
                                        density_map {
                                                [0.0 rgb 0]
                                                [.49 rgb 0]
                                                [.49 rgb 1]
                                                [.51 rgb 1]
                                                [.51 rgb 0]
                                                [1.0 rgb 0]
                                                             }
                                        translate -.5*y
                                             }
                         }
                 }
           }
         }

object {test_sphere}


Post a reply to this message

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