POV-Ray : Newsgroups : povray.binaries.images : Ping Pong : Ping Pong Server Time
4 Nov 2024 20:15:38 EST (-0500)
  Ping Pong  
From: Nekar Xenos
Date: 20 Mar 2008 03:45:39
Message: <47e22433$1@news.povray.org>
Hear's my suggestion for this ping-pong round.

-- 
-Nekar Xenos-

////////////
/*
  Planet isosurface from Jaime Vives Piqueres's moon.

*/


global_settings{
 assumed_gamma 1.0
 max_trace_level 20
}
#default{texture{finish{ambient 0}}}
#include "functions.inc"


#declare Modelling=off;
#declare ShowPlanet=on;
#declare ShowWater=on;
#declare ShowClouds=on;
#declare ShowRings=on;


// *** PLANET ***

// planet texture
#declare t_planet=
pigment{
          onion    warp { turbulence 0.1 /*lambda 33 */ }
          color_map{
                   [.7 rgb <.3,.2,.05>] // sand
                   [.8 rgb <0,.1,0>]    // green
                   [.99 rgb <.1,.05,.01>]//<.1,.2,.01>]      // green
                   }
                 scale 1/(<1.01,.995,1.01>)
                 }



#declare t_planet=
texture{
 pigment{
          onion    scale <1.01,.995,1.01>
          turbulence .05
          lambda 2.5
          omega 1.2
          pigment_map{
                   [0 rgb 1]
                   [.05  t_planet ]
                   [.95  t_planet ] // sand
                   [1 rgb 1]//<.1,.2,.01>]
                   }
         }

#if(!Modelling)
        normal{granite .001 scale .00001}
#end
finish{specular .1 }
}

#declare Scalar=<4,1,4>;
#declare Rotar=<-15,0,0>;

// Cloud texture
#declare t_clouds=
texture{
         pigment{
                  wrinkles  scale <100,50,100>*22
                  turbulence <1,2,1>
                  lambda 2.5
                  omega 1.3
                  warp { turbulence <10,0,10>*.1
                        //lambda 3
                        omega 1.2
                        }
                  color_map{
                           [0 rgb 1 transmit 1]
                           [.3 rgb 1 transmit .9]
                           [1 rgb 1 transmit 0]
                           }
                  rotate y*15
                  scale<0.021,0.02,0.021>/Scalar
                  rotate -Rotar
                 }
        }

// Cloud texture
#declare t_clouds=
texture{ wrinkles  rotate Rotar
                  scale Scalar
                  //lambda 2.5
                  omega 1.3
                  texture_map{
                           [0 t_clouds ]
                           [.3 pigment {rgb 1 transmit 1}]
                           [.5 t_clouds]
                           [.7 pigment {rgb 1 transmit 1}]
                           [1 t_clouds ]
                           }
                 }
       // }


// Planet
#declare Planet=
union{
        isosurface{  // Copied from Jaime's LightSys Space Demo scene
                 function{(x*x+y*y+z*z-1)+f_granite(x*2,y*2,z*2)*f_agate(x,y,z)*.05}
                 max_gradient 3.8
                 contained_by{sphere{0,1}}
                 texture{t_planet scale .02}
                 scale y*1.002
                 }


       #if(ShowWater)
               sphere{0,1 // water
                      pigment{gradient y scale 2 translate y
                              turbulence .1
                               lambda 7
                             colour_map{
                                      [0 rgbt<1,1,1,0> ]
                                      [.15 rgb <0,.05,.2> transmit 
.3*(!Modelling)]
                                      [.9 rgb <0,.05,.2> transmit 
.3*(!Modelling)]
                                      [1 rgbt<1,1,1,0> ]
                                      }
                              }
                      finish{specular .2  metallic brilliance 2}
                      #if(!Modelling)
                         interior{fade_distance .003 fade_color rgb 
<0,0,.1>}
                      #end
                      scale .996
                      }
       #end
      #if(!Modelling)
              sphere{0,1 // Atmosphere
                      pigment{colour rgbt 1}
                      interior{
                               media {
                                          // (---general values---)
                                          intervals 10           // number 
of intervals used for sampling [10]
                                          samples 1,1            // minimum 
and maximum number of samples taken per interval [1,1]
                                          confidence 0.9         // 
statistic parameter higher->better quality [0.9]
                                          variance 1.0/128       // 
statistic parameter lower->better quality [1.0/128]
                                          ratio 0.9              // 
distribution between lit and unlit areas [0.9]
                                          // (---media types---)
                                          //absorption rgb<.1,.05,0>*.001 
// absorbing media, block light of specified color
                                          scattering {2, rgb 10 }
                                          //method 3               // 
adaptive sampling
                                          density {onion
                                                   color_map{
                                                           [.89 rgb .5] 
// earth
                                                           [.93 rgb 
<0,.5,.6>*.5]//
                                                           [.98 rgb 
<0,0,.1>]//
                                                           [1 rgb 0 ]//
                                                           }
                                                  }
                                        }
                               }
                      rotate y*90
                      scale 1.05
                      hollow
                      double_illuminate
                      }
       #end
       #if(ShowClouds)
               union{
                      sphere{0,1.01 texture{t_clouds }}
                      rotate y*45
                      hollow //double_illuminate
                      }
        #end
       }

// placement
union{  #if(ShowRings)
        disc {<0, 0, 0>  y, 1.0, .7        // -O- RINGs -O-
                        pigment{spherical
                                cubic_wave
                                colour_map{
                                           [0 rgbft <0,0,0, 1,1>]
                                           [.01 rgbft <.4,.3,.2, 0,.1>]
                                           [.015 rgbft <.3,.3,.3, .1,.7>]
                                           [.03 rgbft <.35,.3,.25, 0,.1>]
                                           [.04 rgbft <.1,.21,.3, .1,.9>]
                                           [.07 rgbft <.3,.21,.1, .2,.5>]
                                           //
                                           [.12 rgbft <.25,.2,.15, 0,.1>]
                                           [.12 rgbft <.25,.2,.15, 0,.1>]
                                           [.18 rgbft <.2,.2,.25, .1,.7>]
                                           [.20 rgbft <.3,.2,.1, 0,.1>]
                                           [.22 rgbft <0,0,0, 1,1>]
                                           }
                                }
                        normal{granite .001 scale .00001}
                        finish{diffuse 1}
                        scale 2
                        hollow
                        double_illuminate
                        rotate <40,0,30>
                        }
         #end
        object{Planet }
        scale .3
        translate <0,0,0>
        }

light_source{
         0,
         4
         fade_power 2
         translate <2,.1,.5>
         }

camera{
 location <0,.5,0>
 up y
 look_at .5*x //<0,-.3,1> //<0,-.4,1>

}


Post a reply to this message


Attachments:
Download 'Planet.png' (239 KB)

Preview of image 'Planet.png'
Planet.png


 

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