File:Explosion in moon artist view 3 1.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Explosion_in_moon_artist_view_3_1.png (800 × 600 pixels, file size: 777 KB, MIME type: image/png)

Captions

Captions

Explosion in moon artist view

Summary

[edit]
Description
English: Explosion in moon artist view
Date
Source Own work
Author Merikanto

POV-Ray codes

Heightfield

// cratered heightmap generating

// pov-ray script

  1. include "functions.inc"
  2. include "colors.inc"

// command line

// povray kratera3.pov -W800 -H600 +fn16 // REMEMBER : +fp16, 16 bit gray scale

global_settings { assumed_gamma 2.2 hf_gray_16 }

camera {

  location <0, 0, -20>
  look_at <0,0,0>

} //camera

light_source {<0, 20, -100> color White * 1.2}

  1. declare Randomizer = seed (2);
  1. declare CraterZOffset = 0;
  1. declare f_craters_1 =

function{

 pigment{
   crackle form <1.2, 0, 0> 
   turbulence 0.1 omega 0.6
   scale 0.15
   color_map{
     [0.00 color rgb 1.00] 
     [0.25 color rgb 0.75]
     [0.33 color rgb 0.25]
     [0.40 color rgb 0] 
     [1.00 color rgb 0] 
   }
 }

}

  1. declare f_moon_1 = function {
            (abs(1-sin(f_spherical(x,0,z))*0.5)*1.0-f_wrinkles(x*2,y*0,z*2)*0.2)
            
    
  //           -f_craters_1(1+x/10,y/1,z/10).gray*0.1
    //        -f_craters_1(2+x/3,y/3,z/3).gray*0.05

}

  1. macro NewCrater (Diameter)
  #declare CraterZOffset = CraterZOffset - .001;
  #declare Crater = disc {
     0, z, 1
     texture {
        pigment {
           onion
           turbulence .08 + rand (Randomizer) * .04
           color_map {
              [0 rgbt <0, 0, 0, .2>] //Center
              [.1 rgbt <0, 0, 0, .3>]
              [.42 rgbt <1, 1, 1, .4>]
              [.7 rgbt <1, 1, 1, .9>]
              [.8 rgbt <.5, .5, .5, 1>]
              [1 rgbt 1]
           } //color_map
        } //pigment
        scale 1.1
        rotate (rand (Randomizer) * 360) * z
     } //texture
     scale Diameter
     translate CraterZOffset * z
     no_shadow
  } //disc
  1. end //#macro NewCrater
  1. local Terrain = object {
  plane {
     z, 0
     texture {
        pigment {
           bumps //Start out with gentle hills
           color_map {
              [0 Black]
              [1 White * 1.2]
           } //color_map
        } //pigment
        scale 5
     } //texture
     texture {
        pigment {
           granite //Roughen up the terrain
           color_map {
              [0 rgbt <0, 0, 0, .9>]
              [1 rgbt <1, 1, 1, .7>]
           } //color_map
        } //pigment
        scale 6
     } //texture
  } //plane

} //object

  1. local Terrain2 = object {
  plane {
     z, 0

     texture {
        pigment {
         function {
        0.05*f_granite(x*1000000,y*1000000,z*1000000)
      + 0.05*f_noise3d(x*300000,y*300000,z*300000)
       
     +  0.3* f_craters_1(x*3,y*3,z*3).gray
        
        
     + 0.4* f_noise3d(x*3,y*3,z*3)


         }
       // bumps
           color_map {
              [0 rgbt <1,1,1,0>]
              [1 rgbt <0,0,0,1>]
           } //color_map
        } //pigment
      //  scale 5
     } //texture
  } //plane

} //object

//object {Terrain}

object {Terrain2 scale 10}

NewCrater (4)

object {Crater scale 0.25 translate <3,1,4>}

NewCrater (4) object {Crater scale 1 translate <0, 0, 0>}

NewCrater (3) object {Crater scale 1/3 translate <0, 3, -4>}

NewCrater (2.2) object {Crater scale 1 translate <-3, -1, -4>}

/*

NewCrater (4.5) object {Crater scale 0.7 translate <7, -5, 0>}

NewCrater (3.5) object {Crater scale 1.2 translate <-6, -1, 0>}

  • /

Image

// tlp - ctarer glow

// pov ray 3.7 source code

  1. include "colors.inc"
  1. include "functions.inc"
  2. include "rand.inc"
  1. include "colors.inc"
  2. include "stones.inc"

global_settings {

 max_trace_level 5

}

  1. declare seed1=seed(123);
  2. declare seed2=seed(1234);
  3. declare seed3=seed(12345);
  4. declare seed4=seed(123456);
  5. declare seed5=seed(4123);
  6. declare seed6=seed(41234);
  7. declare seed7=seed(412345);
  8. declare seed8=seed(4123456);
  1. declare Color=rgb <1,1/2,0.0>*1;
 camera{
   location <0, 6, -10>*1.25
   look_at 0
   angle 30
 }
 light_source{ <1000,300,-1000>*1000*1000 White*2 }
  1. declare surfobj1= height_field {
   png "kratera5.png"
   smooth
   pigment { color rgb <1,1,1> }

finish {ambient 0 phong 0.05 specular 0.05 diffuse 1.0 } normal { wrinkles scale 1/100 bump_size -0.1 }

   translate <-.5, -.5, -.5>
   scale <20, 1., 20>
 }
  1. declare bright1= object {

sphere {0,1}

pigment { color rgbt 1 }
// finish { ambient 0 diffuse 0 }
hollow
no_shadow

interior {
media {
	 emission color rgb<1.0,0.75,0.1>*1
     intervals 9
     samples 1, 20
     density{ 
             //   function { exp ( f_spherical(x,y,z)  }
            function { f_spherical(x,y,z) }
              poly_wave 3
              color_map {
              [0.0 color rgb <0.0,0.0,0.0>]
              [0.25 color rgb <0.5,0.25,0.0>]
              [0.5 color rgb <1,0.5,0.0>*0.75*2 ]
              [0.75 color rgb <1.0,1.0,0.0>*5]
              [1.0 color rgb <1.0,1.0,1>*10]
                        } // end color_map
   
         } // end of density
}
}


}


  1. declare torus1=object {

//torus {1,0.5} isosurface {

function {
//f_torus(x,y,z,1,0.5)+f_granite(x*3,y*3,z*3)*0.1
f_torus (x,y,z, 1, 0.5)+f_granite(x,y,z)*1
}


 accuracy 0.01
 max_gradient 50
 
 // threshold 0.5
 // max_trace 7
 
 
 
 
contained_by {sphere {0,100}}

}

hollow no_shadow

pigment { color rgbt 1}

interior {
 media {
 
 
 absorption 2
 scattering { 1,1/10*1 }

// emission 0.5*<1,1,0>

  density {
 function {  f_torus (x,y,z, 1, 0.4)-f_granite(x,y,z)*0.2 }
  density_map {
  [0 color rgb 0]
  [1 color rgb 1]
  }
  
  }
  

 }
}

}

  1. declare explo1=

object { sphere{ 0,1}


pigment{rgbt 1} hollow

interior{ media{

absorption 0.01

emission 0.5 scattering{1,60}

//density { function {f_spherical(x,y,z) }} density {function{

// f_granite(x*4,y*4,z*4)*0.5*pow( f_spherical(x,y,z), 4)

// pow( f_spherical(x,y,z), 4)


//f_granite( ((sin(atan2(x,y)/3)+1)/2),((sin(atan2(z,y)/3)+1)/2),((sin(atan2(x,z)/3)+1)/2))

pow(f_granite( ((sin(atan2(x,y)/3)+1)/2),((sin(atan2(z,y)/3)+1)/2),((sin(atan2(x,z)/3)+1)/2)) ,3)

  • pow(f_spherical(x,y,z),4)*1


} turbulence 0.1 poly_wave 1.5 color_map { [0 color rgb 0] [1 color rgb <1,0.5,0>] } scale 0.5 }

 scale 1.5

}

// media 2

  media { 
   //absorption 0.1
   
   scattering { 1 1 }
     density { 
     
    // spherical 
     function {
 //  pow(f_spherical(x,y,z),6)*pow(f_granite(x*10,y*10,z*10),1)
     
     pow(f_spherical(x,y,z),5)
  • f_wrinkles(x*3,y*3,z*3)
  • f_granite(x*3,y*3,z*3)

// *pow(f_wrinkles( ((sin(atan2(x,y)/3)+1)/2),((sin(atan2(z,y)/3)+1)/2),((sin(atan2(x,z) ///////3)+1)/2)) //,1)*0.3


     }
     
     }
   }

} // interior

// scale C*0


}

  1. declare stone3= object

{ isosurface { function { f_sphere(x, y, z, 1.2) - f_noise3d(x+2, y-1, z+2)+f_granite(x+4,y+3,z+3)*0.1 }

accuracy 0.01 max_gradient 15

contained_by {sphere {0,5}} }

//texture {T_Stone2}

         texture{ pigment{ color rgb<0.65,0.65,0.65>*0.72 }
                normal { bumps 0.75 scale 0.02 }
                finish { phong 0.1 }
              } 

}

  1. declare stones1= union {

# for (rr, 0, 200)

object { #declare fii2=rand(seed1)*360; #declare theta2=rand(seed2)*180-90; #declare rr2=exp(rand(seed3))*1; //ball1 stone3 scale 0.15 scale rand(seed3) scale x*rand(seed4)+0.5 rotate y*rand(seed5)*360 rotate x*rand(seed6)*360 rotate x*rand(seed7)*360 translate x*rr2 rotate z*rand(seed8)*90 rotate <theta2,fii2,0>

}

#declare rr=rr+1;

#end

}

//object {ground1} //object {ground2}

//object {stones1}

object {bright1 scale 5}

object {torus1 scale 2 scale y*4 translate y*0}

// object {explo1 rotate y*30 scale 5 scale y*2 translate y*0 }

object {surfobj1 scale 2 rotate y*90 scale y/4}

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:36, 11 June 2024Thumbnail for version as of 12:36, 11 June 2024800 × 600 (777 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata