File:Terraplan8.png

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

Original file(1,600 × 1,200 pixels, file size: 1.1 MB, MIME type: image/png)

Captions

Captions

Terra like, habitable planet

Summary[edit]

Description
English: Habitable planet.
Date
Source Own work
Author Merikanto

POV-Ray 3.8 beta source code


POV-Ray 3.8 script to render image
// povray isosurface planet test

// 19.9.2022 v 0000.0001



#include "functions.inc"
#include "textures.inc"
#include "metals.inc"
#include "colors.inc" 
    
    



// isosurface not function with atmosphere  
#declare Earth_Radius = 10;  

// very slow render with isosourace
#declare WITH_ISOSURFACE=1;

#declare CLOUDS_ON=1;
 
 // very slow render with atmosphere
                           
#declare ATMOSPHERE_ON=1;                           
 
#declare Cloud_Height = 0.007;

#declare Atmosphere_Top = 1/100;  

    
 
    
    
default { finish { ambient 0.000002 diffuse 0.4 } }  
  
camera {
    location <1*100,2*100,0>*0.7*0.7
    look_at <0,0,0>
    angle 18
}  
    
    
light_source {
<1,1,0>*100000000
color rgb <1,1,1>*2
}        

 
 
 
 
 #declare norma1=function {
  
  pigment {
 wrinkles    
 octaves 16  
 turbulence 0.1
 
 }
 
 }
 
 
  #declare norma2=function {
  
  pigment {
 //  wrinkles
           
           
 granite    
  turbulence 0.1
  octaves 16
 // agate
   sine_wave
 }
 
 }
 
   #declare norma3=function {
  
  pigment {
 
 //granite 
   agate    
    octaves 16 
     turbulence 0.1
   sine_wave
 }
 
 }
 
 #declare funka_norma1=
       function {
   

      
        - norma1(x/2,y/2,z/2).gray/2
           - norma1(x,y,z).gray/4
            - norma1(x*2,y*2,z*2).gray/8
                 - norma1(x*4,y*4,z*4).gray/16
                 
            - norma1(x*8,y*8,z*8).gray/32
            - norma1(x*16,y*16,z*16).gray/64
      
                   - norma1(x*32,y*32,z*32).gray/128
            - norma1(x*64,y*64,z*64).gray/256
                     - norma1(x*128,y*128,z*128).gray/512
            - norma1(x*256,y*256,z*256).gray/1024
                               - norma1(x*256,y*256,z*256).gray/1024
            - norma1(x*512,y*512,z*512).gray/2048             
              - norma1(x*1024,y*1024,z*1024).gray/4096    
                  - norma1(x*2048,y*2048,z*2048).gray/8192    
                  - norma1(x*4096,y*4096,z*4096).gray/(16384)  
               - norma1(x*8192,y*8192,z*8192).gray/(32768)
        }
 
 
 
   
  #declare funka_norma2=
       function {
   

      
        - norma2(x/2,y/2,z/2).gray/2
           - norma2(x,y,z).gray/4
            - norma2(x*2,y*2,z*2).gray/8
                 - norma2(x*4,y*4,z*4).gray/16
                 
            - norma2(x*8,y*8,z*8).gray/32
            - norma2(x*16,y*16,z*16).gray/64
      
                   - norma2(x*32,y*32,z*32).gray/128
            - norma2(x*64,y*64,z*64).gray/256
                     - norma2(x*128,y*128,z*128).gray/512
            - norma2(x*256,y*256,z*256).gray/1024
                               - norma2(x*256,y*256,z*256).gray/1024
            - norma2(x*512,y*512,z*512).gray/2048             
              - norma2(x*1024,y*1024,z*1024).gray/4096    
                  - norma2(x*2048,y*2048,z*2048).gray/8192    
                - norma2(x*4096,y*4096,z*4096).gray/(16384)  
               - norma2(x*8192,y*8192,z*8192).gray/(32768)
                
        }
   
   
   #declare funka_norma3=
       function {
   

      
        - norma3(x/2,y/2,z/2).gray/2
           - norma3(x,y,z).gray/4
            - norma3(x*2,y*2,z*2).gray/8
                 - norma3(x*4,y*4,z*4).gray/16
                 
            - norma3(x*8,y*8,z*8).gray/32
            - norma3(x*16,y*16,z*16).gray/64
      
                   - norma3(x*32,y*32,z*32).gray/128
            - norma3(x*64,y*64,z*64).gray/256
                     - norma3(x*128,y*128,z*128).gray/512
            - norma3(x*256,y*256,z*256).gray/1024
                               - norma3(x*256,y*256,z*256).gray/1024
            - norma3(x*512,y*512,z*512).gray/2048             
              - norma3(x*1024,y*1024,z*1024).gray/4096    
                  - norma3(x*2048,y*2048,z*2048).gray/8192    
                  - norma3(x*2048,y*2048,z*2048).gray/8192    
                - norma3(x*4096,y*4096,z*4096).gray/(16384)  
               - norma3(x*8192,y*8192,z*8192).gray/(32768)
        } 
  
   
    
   #declare funka1= function {
            exp(funka_norma1(x/100,y/100,z/100)  *exp(-funka_norma2(x/100,y/100,z/100) )  )
    }
    
    
 
    #declare funka2= function {
           funka_norma2(x/100,y/100,z/100)
    }
    
 
  
  
   
    #declare funka4= function {
         -1* max( funka2(x,y,z)*2+0.5, 0)*1.0
    }
    
  
  
  
  // planet
      
   object {  
   
   #if(WITH_ISOSURFACE)
   
        isosurface {
                function {
                f_sphere(x,y,z,Earth_Radius)+funka4(x,y,z)*0.1 
                }
    
        contained_by 
            {
                sphere { 0,Earth_Radius+0.01 }
            }
    
        }
    
   
    #else
    
   
        sphere {  0, Earth_Radius }
      
    
    #end 
     
     
          texture { 
      pigment {
        
        function {
        funka4(x,y,z)
                  }  
                  
       //      turbulence 0.5     
                  
        color_map { 
            [-1 color rgb <1,1,1> ] 
         
        [0 color rgb <0,0,1> ] 
          [0.6 color rgb <0,0,1> ]  
       //    [0.61 rgb <0.17, 0.28, 0.10>]
       //  [0.7 rgb <0.17, 0.28, 0.10>]
       [0.7 color rgb <0.96, 0.77, 0.52>]
       // [1.0 color rgb <0.72, 0.59, 0.44>] 
          [1.0 rgb <0.17, 0.28, 0.10>] 
            [10 color rgb <1,1,1> ] 
         
          
        }
      // color rgb <1,1,1>   
      scale 1
      }      
      
    
       #if(WITH_ISOSURFACE)      
      
       #else
        
       normal 
       {
         function {
               
                -1*funka4(x,y,z)
                          
   
                }
        
       
            bump_size 5
            scale 1 
          
       
       }
           
       #end
          
   
        
      }
  
  
 // rotate y*180    
  
}   






 
#declare cloud_area_1=
     pigment {
       
       
           
     granite 
     turbulence  1
     scale 1
       
       pigment_map {
   
       [0.0 color rgbt Clear ] 
        
       [0.3 color rgbt Clear ] 
             
       [0.4  granite scale 0.05
                   turbulence 2
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.7 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ] 
   
       
       [0.5  granite scale 0.1
                   turbulence 5
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.4 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ]   
          
       

       [1.0 color rgb White ] 
          
       
       
       }   
           
           
  
  } // pig

  
    
 #declare cloud_area_2=
     pigment {
       
       
           
     //granite 
       bozo
     turbulence  1
     scale 200
       
       pigment_map {
   
       [0.0 color rgbt Clear ] 
        
       [0.3 color rgbt Clear ] 
             
       [0.4  granite scale 0.05
                   turbulence 2
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.7 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ] 
   
       
       [0.5  granite scale 0.1
                   turbulence 5
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.4 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ]   
          
       

       [1.0 color rgb White ] 
          
       
       
       }   
           
           
  
  } // pig
 
 
  
#declare cloud_area_1=
     pigment {
       
       
           
     granite 
     turbulence  1
     scale 1
       
       pigment_map {
   
       [0.0 color rgbt Clear ] 
        
       [0.3 color rgbt Clear ] 
             
       [0.4  granite scale 0.05
                   turbulence 2
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.7 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ] 
   
       
       [0.5  granite scale 0.1
                   turbulence 5
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.4 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ]   
          
       

       [1.0 color rgb White ] 
          
       
       
       }   
           
           
  
  } // pig

  
    
 #declare cloud_area_2=
     pigment {
       
       
           
     //granite 
       bozo
     turbulence  1
     scale 200
       
       pigment_map {
   
       [0.0 color rgbt Clear ] 
        
       [0.3 color rgbt Clear ] 
             
       [0.4  granite scale 0.05
                   turbulence 2
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.7 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ] 
   
       
       [0.5  granite scale 0.1
                   turbulence 5
                color_map {
                    [0 rgbf <1,1,1,1>]    
                    [0.4 rgbf <1,1,1,1>]
                    [1 rgbf <1,1,1,0>]
                } 
       
       ]   
          
       

       [1.0 color rgb White ] 
          
       
       
       }   
           
           
  
  } // pig    
  
  
  
  
 #if (CLOUDS_ON) 
  
  object {
    sphere {
            0,(1+Cloud_Height) 
            }
         
  texture { 
          
          gradient y  
          turbulence 0.5
          octaves 60
         
         texture_map { 
            [0.0 pigment {cloud_area_2} finish {brilliance 0.4 diffuse 0.6} scale 0.5 ]
            [0.5 pigment {cloud_area_1}  finish {brilliance 0.4 diffuse 0.6} scale 0.5 ]         
            [1.0 pigment {cloud_area_2} finish {brilliance 0.4 diffuse 0.6} scale 0.5 ]
         
         }
                      
         scale 2             
         translate x*1
       //  scale 2   
      
 
    }
     
     
   scale  Earth_Radius
  }      
  

#end

  
#if (ATMOSPHERE_ON) 




    
 
 
// reflector. maybe nok
          
#declare  atmos_reflection_lab =sphere {0,1
	pigment { rgbt <0, 0, .1, 0.99995> }
	finish {
		ambient 0.0
		diffuse 0.0
		phong 0.2
		phong_size 10
	}
	interior { ior 1.1 }
	hollow yes  // tai no
	scale 1.0001
} 





  
#declare atmosphere2= object {

sphere {
 0,(1+Atmosphere_Top)
} 
 
 
// pigment {
/// color rgbt <1,1,1,1>
// }     

     texture
     {   
     
       pigment
       {      
      rgbt <0,0,0,1>
       } 
       
       finish {  
       ambient 0 reflection 0 specular 0
      ior 1.0
     // diffuse 0.25
       }
     }



 hollow    
 
 interior{ 
 
 media{
 
 // emission <0.5,0.5,1>*3
 // scattering{ 1,<0.5,0.5,1>/10}     
  //  scattering { 1, <0.3, 0.3, 1>/10 }
    
  scattering {4, rgb <.4,.5,1>*5*(1/5)  extinction .00005} 
   
   
  samples 20  // increase = more precise
  intervals 1


           density
         {
           spherical
           density_map
           {
             [0     rgb <0.25, 0.5, 1>]
             [0.005 rgb <0.25, 0.5, 1>]
             [0.011 rgb <0.9, 1, 1>]
             [1    rgb <0.9, 1, 1>]
           }
         }
       
       
  
    } 
    } 
  
}     

  
  
  
object {
  atmosphere2 
  scale Earth_Radius  
  
  
}
 
 
#end

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

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

Date/TimeThumbnailDimensionsUserComment
current09:14, 19 September 2022Thumbnail for version as of 09:14, 19 September 20221,600 × 1,200 (1.1 MB)Merikanto (talk | contribs)Update of code: trying atmosphere
06:17, 19 September 2022Thumbnail for version as of 06:17, 19 September 20221,600 × 1,200 (1.22 MB)Merikanto (talk | contribs)update
19:00, 18 September 2022Thumbnail for version as of 19:00, 18 September 20221,600 × 1,200 (1.35 MB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata