File:Colliding planets 4 r 1 1 1 1.png

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

Original file(1,200 × 900 pixels, file size: 681 KB, MIME type: image/png)

Captions

Captions

Colliding planets

Summary

[edit]
Description
English: Colliding planets
Date
Source Own work
Author Merikanto

POV-Ray 3.7 source code

/////////////////////////////// // // colliding planets // pov-ray source code // // 21.5.2024 v 0000.0000 // //////////////////////////////// global_settings {

 max_trace_level 5

}

  1. include "colors.inc"
  2. include "functions.inc"
  3. include "rand.inc"
  1. include "colors.inc"
  2. include "stones.inc"
  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);
  9. declare seed9=seed(6123);
  10. declare seed10=seed(61234);
  11. declare seed11=seed(612345);
  12. declare seed12=seed(6123456);

camera { location <0, 100, -100>*1 look_at <0,0, 0> angle 35 }

background { color rgb 0 }

light_source { <20, 20, -30>*1000*1000*1000 color White }

light_source { <0, 0, 0> color White }

  1. declare ball1= sphere {0,1

//pigment {color rgb 1} }

  1. declare bright1= object {

sphere {0,1}

pigment { color rgbf 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 { exp ( f_spherical(x,y,z)  *f_granite(x*10,y*10,z*10) ) *2 }
              poly_wave 1
              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 stones1= union {
  1. for (fii, 0, 360)

# for (theta, -90,90)

# for (rr, 10, 20)

object { #declare fii2=rand(seed1)*360; #declare theta2=rand(seed2)*180-90; #declare rr2=exp(rand(seed3))*20+5; ball1 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-45 rotate <theta2,fii2,0>

}

#declare rr=rr+1;

#end

#declare theta=theta+10;

#end

  1. declare fii=fii+10;
  1. end

}

// rayleigh based atm
  1. declare atm_thickness1 = 0.1;
  2. declare atm_color1 = rgb <pow(460/650, 4), pow(460/555, 4), 1>;
  3. declare atm_amount1=0.1;


  1. declare atm_density1 = density

{

    function
    {

// 1*exp(-6.7*(sqrt(x*x+(y)*(y)+z*z)- 1 - 0.00001)/atm_thickness1)

   //   1*exp(-6.7*(sqrt(x*x+(y)*(y)+z*z)-1- 0.00001)/atm_thickness1)
 
   1*exp(-8*(sqrt(x*x+(y)*(y)+z*z)- 1 - 0.00001)/atm_thickness1) 
 

} }

  1. declare atm_media1 = media

{

    method 3
    intervals 3
    samples 3
    scattering
    { 4

color atm_amount1*atm_color1/atm_thickness1 // extinction 1

    }
    density {atm_density1}

}

  1. declare atmos1 = difference

{

    sphere {0, 1.00001 + atm_thickness1}
 //   sphere {0, 1.00001}
    hollow
    pigment {rgbt 1}
    interior {media{atm_media1}}

}

  1. declare planet1= union {

sphere {0,1

pigment { wrinkles

scale 0.5

color_map { [0 color rgbt <0,0,0.15>] [0.5 color rgbt <0,0,0.15>] [0.5 color rgbt <0.7,0.4,0.15>] [1 color rgbt <0.7,0.4,0.15>] }

scale 5 warp { turbulence 0.2 } scale 1/5 turbulence 0.5 } normal {granite scale 0.03 bump_size -0.3} finish {ambient 0 } }

sphere { 0,1.001

pigment {

wrinkles //scale 0.1

scale 3

warp { turbulence 0.3 } scale 1/3 turbulence 1

turbulence 0.5

color_map { [0 color rgbt 1] [0.5 color rgbt 1] [1 color rgbt <1,1,1,0.9>] }

}

}

sphere { 0,1.002

pigment {

granite scale 3 warp {turbulence 0.5} scale 1/3

color_map { [0 color rgbt 1]

[1 color rgbt <1,1,1,0>] }

}

}

 object {atmos1}

}

  1. declare planet2=

union { sphere {0,1 texture {T_Stone2} normal {granite scale 0.1 bump_size -1} finish {ambient 0 } }

object {atmos1}

}

  1. declare kombo1= union {

object {stones1 pigment {color rgb 0.25 } normal {granite scale 0.1 bump_size -1} finish {ambient 0} scale 0.5 }

object {planet1 translate y*-1.01 scale 20 }

object {planet2 translate y*1.01 scale 10

}

object {bright1 scale 20 translate x*0}

object { torus1 rotate z*0 scale 20 translate x*0 }

}

object { kombo1 rotate z*-90 rotate y*60

}

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
current13:44, 22 May 2024Thumbnail for version as of 13:44, 22 May 20241,200 × 900 (681 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata