POV-Ray : Newsgroups : povray.binaries.images : Probably I'm just in fact too stupid... : Re: Probably I'm just in fact too stupid... Server Time
5 Nov 2024 01:24:39 EST (-0500)
  Re: Probably I'm just in fact too stupid...  
From: stbenge
Date: 26 Nov 2009 01:59:51
Message: <4b0e2767@news.povray.org>

> ...to make use of more advanced raytracing techniques such as media - 
> and may have to content myself for the rest of my life with beginner's 
> scenes!
> 
> I'm still not able to produce planetary rings through which light is 
> scattered also to the unlit side... here is the code (no, it's just a 
> test scene, not a real Saturn!), and below two scenes showing the lit 
> and unlit side of the rings!



...Here is some 3.6-compatible code you might find useful:

// begin code
global_settings{assumed_gamma 1.0}

#default{finish{ambient 0}}

camera{
  location<0,-1000,-10000>
  look_at 0
  angle .05
  sky<-.5,1,0>
}

light_source{<1,.05,0>*100000,<2.5,2.2,2>}

sphere{0,2
  pigment{
   bumps scale<100,.5,100> turbulence .5
   color_map{[0 rgb 1][.5 rgb<.5,.4,.3>][1 rgb .5]}
  }
  hollow
}

#declare ring_radius = 5.5;
cylinder{
  -y*.001,y*.001,ring_radius
  pigment{rgbt 1}
  interior{
   media{
    scattering{5,200*<1,.9,.8>}
    absorption 200/<1,.9,.8>
    density{
     cylindrical
     scale ring_radius
     color_map{
      // this will give us color for the rings
      #declare f_pigment=
      function{
       pigment{
        planar turbulence<1,1,1> lambda 6
        color_map{[.3 rgb 0][1 rgb 1]}
       }
      }
      #declare V=0;
      #while(V<=.4)
       // take color from f_pigment for rings
       [V rgb f_pigment(0,V,0)]
       #declare V=V+.4/20;
      #end
      // leave a smooth transition for inner ring
      [.5 rgb 0]
     }
    }
   }
  }
  hollow
}
// end code

It won't work correctly in version 3.7; media appears to be somewhat 
buggy...

Anyway, I hope this was helpful!

Sam


Post a reply to this message

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