File:Terraplan1.png

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

Captions

Captions

Add a one-line explanation of what this file represents

Summary edit

Description
English: Fictional terrestrial planet in space. There is no vegetation on continents. There is maybe life in oceans.
Date
Source Own work
Author Merikanto
Permission
(Reusing this file)
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.

The POV-Ray 3.8 code to generate image of terrestrial planet.


// pov-ray planet: rigded multifractal, isosurfece attempt, atmosphere

// 26.9.2022 v 0000.0001
   include "colors.inc"
   include "consts.inc"
   include "functions.inc"



  1. declare isosurface_planet=0;
  2. declare atmosphere_on=1;




global_settings {

   #if (version < 3.7) assumed_gamma 1 #end
   max_trace_level 20

}




default { finish { ambient 0.000002 diffuse 0.000001 reflection 0.0 } }


camera {

   location <0,0,5>
   look_at <0,0,0> 
   angle 35

}


light_source {

 //  <1,1,1>*149600*1000   
   
   <0,0,1>*149600*1000   
   color rgb 1*4

}



  1. declare Earth_Radius=1;


  1. declare Media_Intensity=0.15*100;

//#declare Media_Emission=0.065*10;

  1. declare Media_Eccentricity=0.56;
  2. declare Atmosphere_Top=0.025;

//#declare Cloud_Brightness=0.42; //#declare Light_Intensity=4.1;

  1. declare atm_samples= 20;






declare fn_Pigm=function {

  pigment {

// dents

// marble

    granite  
    scale 4

// agate // crackle

//    turbulence 0.1

/*

function {

// f_ridge(x/1000,y/1000,z/1000,0, 13, 0.0, 3, 1, 1)

//   f_hetero_mf(x,y,z, 0.9, 1.7,13, 0.5, 0.9, 3 ) 
     
     f_hetero_mf(x,y,z, 0.9, 1.7,13, 0.5, 0.9, 3 )
   //   f_ridged_mf(x/1000, y/1000, z/1000, 0.5, 4, 13, 3, 5, 1) *
     //    f_ridged_mf(x/10000, y/10000, z/10000, 0.5, 4, 13, 3, 5, 2) 
    }
 */
    color_map {
      [0 color rgb 0]
      [1 color rgb 1]
    }
  }
}
            
            
            
   declare planet1 = object {
    
    #if (isosurface_planet)
    
    
  isosurface {
      
      function {
          f_sphere(x, y, z, 1) -
          fn_Pigm(x, y, z).gray*0.0001
          }
      
      }    
     
     #else
     
      
     sphere {0,1} 
     
     #end
      
      
  pigment {
  //    color rgb <0,0.35,0>      
        
              function {
       //   f_sphere(x, y, z, 1) -
          fn_Pigm(x, y, z).gray
          }      
        
                pigment_map 
       {  
             
             [0.0 color rgb <0.0,0.0,0.20>   ]  
              
         
           [0.4 color rgb <0.0,0.0,0.3>   ]      
        
          [.41 color rgb <0.0,0.6,0.2>/6   ]
               [1.0 colour rgb <216, 137, 105>/256 ]
       }
          
     /*
                        pigment_map 
       {  
                [0.0 color rgb <0.72, 0.59, 0.44>]
                [0.2 color rgb <0.28, 0.36, 0.11 >] 
            //    [0.4 color rgb <0.0,0.4,0.15> ]
               [0.5 color rgb <0.0,0.6,0.2>/5   ]
              [0.51 color rgb <0.0,0.0,0.20>   ] 
             [1.0 color rgb <0.0,0.0,0.20>   ]  
       
          
          
          
       }
     
      */
      }
  
   
  finish {  
  diffuse 0.9

// ambient 1

//  emission 1
  } 
  
  scale  1
    

}



#declare Clouds3x = pigment {
  //marble
  dents
  turbulence 6  
  octaves 32
  lambda 4
 // omega 0.75  
 scale 10   
  
  color_map {
         [0.0 color White*1.5 filter 0]
    [0.05 color White filter 1 ]
     [0.95 color White filter 1 ]
    [1.0 color White*1.4 filter 0]
    
  }
} 


#declare CloudArea = texture {
  pigment {
    gradient y  
   //   onion

// sine_wave

   turbulence 3  
   octaves 15   
   scale 1    
   
   //lambda 2
  // omega 2
   
   scale 5
    //scale 0.2
     
  //  scale <10,10,10>
    
    pigment_map {  
       
       [0.00 Clouds3x scale 0.1]
      
   //         [0.00 Clouds3 scale 1]
     [0.2 Clouds3x]
      [0.50 Clouds3x scale 0.01]
      [0.8 Clouds3x scale 1]
      [1.00 Clouds3x scale 0.5]
    
      


    }
  }


 finish { 
 ambient 0.000002
  
 diffuse 0.9
// phong 0.1

// specular 0.05 // reflection 0.1

 }


} 
 


   declare cloudslayer1 = sphere
 {
  0, 1.001

  texture {
     CloudArea
  }

 }    
 
   
   
   
   
   
 #declare Density1= 	density{ 

spherical ramp_wave


#declare mm = 0.0; #declare nn = 1.0;

#declare deltamm=0.01;

           #declare pp= 1.0;
           
           #declare rr=1.00; 
           
  
            color_map {
           #while(mm <= 1.0)
       


           #declare  rr=nn/2  ; 
           
            
           #declare ex2=exp(-(nn-0.2)*10)*7;
            
           #declare rr=ex2;
           
             
           #declare cc=<rr,rr,rr*1.8>;   
   
   
           #declare qq=mm*Atmosphere_Top;
             
           [qq rgb cc]
           #declare mm=mm+deltamm;  
           #declare nn=nn-deltamm;
     
    
   
           #end        
           
           }


} // en



// Atmosphere 2: density function   


  1. declare Density2=density { function
    {


    exp(-6.7*(sqrt(x*x+y*y+z*z) -1.00001)/0.05 )/1000 
    
    }   
    }
 
 
 
  1. declare Mat_Atm =
 material {
   texture {
     pigment {
       color rgbt <1.0, 1.0, 1.0, 1.0>
     }
   }
   interior {
     media {
       method 3
         
          scattering { 5 color rgb  <0.2, 0.4, 1>*Media_Intensity*20 eccentricity Media_Eccentricity }
 
          emission  <0.2, 0.4, 1>
          
       //    scattering { 5 color rgb  <0.2, 0.4, 1>*Media_Intensity*30 eccentricity Media_Eccentricity }
 
     //     emission  <0.2, 0.4, 1>/50000
          
       // samples 20,20
         samples atm_samples  // increase = more precise
 //intervals 1
       
       density { 
         Density1
       
     //    Density2
       }
     }
   }
 }
          
          
          
  1. declare atmos1=difference {
 sphere {
   <0,0,0>, 1
 }
 sphere { 
   <0,0,0>, 1
   scale (Earth_Radius+0.001)/(Earth_Radius+Atmosphere_Top)
 }
 material { Mat_Atm }
 scale Earth_Radius+Atmosphere_Top
 hollow on

}


  1. declare atmos2=difference {
 sphere {
   <0,0,0>, 1.00
 }
 sphere { 
   <0,0,0>, 1.00
   scale (Earth_Radius+0.001)/(Earth_Radius+Atmosphere_Top)
 }
 material { Mat_Atm }
 scale Earth_Radius+Atmosphere_Top
 hollow on

}





//sun


union {

   object {planet1 rotate x*45
   scale 1.00
    }
   
   object {cloudslayer1 scale 1.01 }
     
    #if (atmosphere_on) 
    object {atmos2}    
    #end
   rotate y*-90 

}






Old code 2

// pov-ray planet: rigded multifractal, isosurfece attempt, atmosphere

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


global_settings {

    #if (version < 3.7) assumed_gamma 1 #end
    max_trace_level 20

}


default { finish { ambient 0.000002 diffuse 0.000001 reflection 0.0 } }      
     
     

// Units

  1. declare m = 0.1; // A value of 1 makes the sun's distance ouside POV's numerical domain.
  2. declare km = 1000*m;
  3. declare mm = 0.001*m;

// ------------- // -- | Parameters | ------ // ------------- // Earth parameters

  1. declare TP_EARTH_RADIUS = 6378.137*km;

// Sun parameters

  1. declare TP_SUN_HEADING = 90;
  2. declare TP_SUN_ELEVATION = 30;
  1. declare TP_BRIGHTNESS = 1;
  2. declare TP_SUN_COLOR = White;
  3. declare TP_SUN_APPARENT_APERTURE = 0.5; // Commonly admitted value

// Atmosphere parameters

  1. declare TP_ATMO_BOTTOM = -1*m;
  1. declare TP_RAYLEIGH_FACTOR = 1;
  2. declare TP_RAYLEIGH_DENSITY_MAX = 1;
  3. declare TP_RAYLEIGH_AMOUNT = 1;
  1. declare TP_ATMO_INTERVALS = 3; // Necessary for good integration
  2. declare TP_ATMO_SAMPLES = 3;
  3. declare TP_ATMO_METHOD = 3; // Adaptive

// Default camera parameters

  1. declare TP_DEFCAM_HEIGHT = 2*m; // Let's be tall
  2. declare TP_DEFCAM_HEADING = 0;
  3. declare TP_DEFCAM_ELEVATION = 5; // Let's look up a little
  4. declare TP_DEFCAM_ANGLE = 40;


  1. declare fn_Pigm=function {
   pigment {

// dents

// marble
     granite  
     scale 4
//   agate  
// crackle
 //    turbulence 0.1
/*
 function {

// f_ridge(x/1000,y/1000,z/1000,0, 13, 0.0, 3, 1, 1)

 //   f_hetero_mf(x,y,z, 0.9, 1.7,13, 0.5, 0.9, 3 ) 
      
      f_hetero_mf(x,y,z, 0.9, 1.7,13, 0.5, 0.9, 3 )
    //   f_ridged_mf(x/1000, y/1000, z/1000, 0.5, 4, 13, 3, 5, 1) *
      //    f_ridged_mf(x/10000, y/10000, z/10000, 0.5, 4, 13, 3, 5, 2) 
     }
  */
     color_map {
       [0 color rgb 0]
       [1 color rgb 1]
     }
   }
 }
             
             
             
  1. declare _tp_earth = object {
   isosurface {
       
       function {
           f_sphere(x, y, z, 1) -
           fn_Pigm(x, y, z).gray*0.0001
           }
       
       }    
   
   pigment {
   //    color rgb <0,0.35,0>      
         
               function {
        //   f_sphere(x, y, z, 1) -
           fn_Pigm(x, y, z).gray
           }      
         
                 pigment_map 
        {  
              
              [0.0 color rgb <0.0,0.0,0.20>   ]  
               
          
            [0.4 color rgb <0.0,0.0,0.3>   ]      
         
           [.41 color rgb <0.0,0.6,0.2>/6   ]
                [1.0 colour rgb <216, 137, 105>/256 ]
        }
           
      /*
                         pigment_map 
        {  
                 [0.0 color rgb <0.72, 0.59, 0.44>]
                 [0.2 color rgb <0.28, 0.36, 0.11 >] 
             //    [0.4 color rgb <0.0,0.4,0.15> ]
                [0.5 color rgb <0.0,0.6,0.2>/5   ]
               [0.51 color rgb <0.0,0.0,0.20>   ] 
              [1.0 color rgb <0.0,0.0,0.20>   ]  
        
           
           
           
        }
      
       */
       }
   
    
   finish {  
   diffuse 0.9
//   ambient 1
 //  emission 1
   } 
   
   scale  TP_EARTH_RADIUS
     

}



// Sun

  1. declare TP_SUN_DISTANCE = 10*TP_EARTH_RADIUS; // Far enough. Actual distance in the scene is not very critical, as the light ays are parallel
  2. declare TP_SUN_RADIUS =

TP_SUN_DISTANCE*tan(radians(TP_SUN_APPARENT_APERTURE/2));

  1. declare _tp_basic_sun = light_source

{

  <0, 0, 0>
  color rgb TP_SUN_COLOR*TP_BRIGHTNESS
  looks_like {sphere{0, TP_SUN_RADIUS pigment{Yellow} finish {diffuse 0  

ambient 1}}}

  translate TP_SUN_DISTANCE*z
  parallel point_at -z
  rotate -TP_SUN_ELEVATION*x
  rotate TP_SUN_HEADING*y

}

// Atmosphere: density

  1. declare TP_BASE_RAYLEIGH_POWER = 6.7; // Constant
  2. declare _tp_rayleigh_power = TP_BASE_RAYLEIGH_POWER*TP_RAYLEIGH_FACTOR;

//#declare TP_ATMO_THICKNESS = 50*km;

  1. declare TP_ATMO_THICKNESS = 150*km;


  1. declare _tp_rayleigh_density = density

{

    function
    {
       

//TP_RAYLEIGH_DENSITY_MAX*exp(-_tp_rayleigh_power*(sqrt(x*x+(y+TP_EARTH_RADIUS)*(y+TP_EARTH_RADIUS)+z*z)

//- TP_EARTH_RADIUS - TP_ATMO_BOTTOM)/TP_ATMO_THICKNESS)

TP_RAYLEIGH_DENSITY_MAX*exp(-_tp_rayleigh_power*(sqrt(x*x+(y)*(y)+z*z)

- TP_EARTH_RADIUS - TP_ATMO_BOTTOM)/TP_ATMO_THICKNESS)

    }

}

// Atmosphere: scattering color

  1. declare TP_LAMBDA_RED = 650; // nanometres
  2. declare TP_LAMBDA_GREEN = 555; // nanometres
  3. declare TP_LAMBDA_BLUE = 460; // nanometres
  4. declare TP_RAYLEIGH_SCATTERING_COLOR = rgb

<pow(TP_LAMBDA_BLUE/TP_LAMBDA_RED, 4), pow(TP_LAMBDA_BLUE/TP_LAMBDA_GREEN, 4), 1>;

// Atmosphere: media

  1. declare _tp_rayleigh_media = media

{

    method TP_ATMO_METHOD
    intervals TP_ATMO_INTERVALS
    samples TP_ATMO_SAMPLES
    scattering
    {

RAYLEIGH_SCATTERING color TP_RAYLEIGH_AMOUNT*TP_RAYLEIGH_SCATTERING_COLOR/TP_ATMO_THICKNESS extinction 1 // The only physically accurate value

    }
    density {_tp_rayleigh_density}

}

// Atmosphere: shell

  1. declare _tp_rayleigh_atmosphere = difference

{

    sphere {0, TP_EARTH_RADIUS + TP_ATMO_BOTTOM + TP_ATMO_THICKNESS  

//translate -TP_EARTH_RADIUS*y }

    sphere {0, TP_EARTH_RADIUS + TP_ATMO_BOTTOM 
    

// translate //-TP_EARTH_RADIUS*y


}

    hollow
    pigment {rgbt 1}
    interior {media{_tp_rayleigh_media}}

}

// Default camera

  1. declare _tp_default_camera = camera

{

    location 0
    angle TP_DEFCAM_ANGLE
    right     x*image_width/image_height
    look_at   z
    rotate -TP_DEFCAM_ELEVATION*x
    rotate TP_DEFCAM_HEADING*y
    translate TP_DEFCAM_HEIGHT*y // Could use trace() to make sure we are  above the surface. But no terrain yet ...

}



 #declare Clouds3x = pigment {
   //marble
   dents
   turbulence 6  
   octaves 32
   lambda 4
  // omega 0.75  
  scale 10   
   
   color_map {
          [0.0 color White*1.5 filter 0]
     [0.05 color White filter 1 ]
      [0.95 color White filter 1 ]
     [1.0 color White*1.4 filter 0]
     
   }
 } 
 


 #declare CloudArea = texture {
   pigment {
     gradient y  
    //   onion
//     sine_wave
  
    turbulence 3  
    octaves 15   
    scale 1    
    
    //lambda 2
   // omega 2
    
    scale 5
     //scale 0.2
      
   //  scale <10,10,10>
     
     pigment_map {  
        
        [0.00 Clouds3x scale 0.1]
       
    //         [0.00 Clouds3 scale 1]
      [0.2 Clouds3x]
       [0.50 Clouds3x scale 0.01]
       [0.8 Clouds3x scale 1]
       [1.00 Clouds3x scale 0.5]
     
       


     }
   }
 
 
  finish { 
  ambient 0.000002
   
  diffuse 0.9
  phong 0.1
  specular 0.05
 reflection 0.1
  
  }
 
 
 } 
  


  1. declare CloudsLayer1 = sphere
  {
   0, 1.001
 
   texture {
      CloudArea
   }
 
  }    
  


//sun


object {_tp_basic_sun}


// planet union {

object {_tp_earth rotate x*45 }

object {_tp_rayleigh_atmosphere}


object {CloudsLayer1 scale 1.00001*TP_EARTH_RADIUS }


rotate y*-90 }



//camera {_tp_default_camera}


camera {

location <1,1,0>*1200000 look_at <0,0,0> // look_at <0,-TP_EARTH_RADIUS,0>

}



The old code POV-Ray 3.7 code of terrestrial planet, quite simple approach.



// POV-Ray 3.7 souce code of terrestrial planet, quite simple approach.

global_settings {

   assumed_gamma 1.0

}


default { finish { ambient 0.000002 diffuse 0.7 } }


camera { location <0,0,-17000> }

light_source { 150000000*<-1, 1, -1> rgb 1 }

sphere

  {
  0, 7000
  pigment
     {
    // bozo                  // kasvit 100,100,120
    granite      
            colour_map
        {  
        /*
           [.5   colour rgb <30, 45, 160>/(255*3)   ]     
             [.55   colour rgb <230, 200, 180>/(255)   ] 
                   [.8   colour rgb <150, 120, 130>/(255)   ] 
       
        */
        
                   [0.33   colour rgb <30, 45, 160>/(255*3)   ]     


                   [.45   colour rgb <150, 120, 130>/(255)   ]   
                    [.6   colour rgb <230, 200, 180>/(255)   ] 
                    [.95   colour rgb <230, 200, 180>/(255)/5   ] 
        }

    
    /*
     colour_map
        {
  
             [.3   colour rgb <230, 200, 180>/(255)   ] 
                   [.7   colour rgb <150, 120, 130>/(255)   ] 
       
        }
      */
    /*
     colour_map
        {
        [.5   colour rgb <30, 45, 160>/(255*3)   ]     
        [.5 colour rgb <200,170,190>/(256*4)  ] 
              [1.00 colour rgb <200,170,190>/(256*8)  ] 
        }
      */
     turbulence 0.1
     scale 15000  // 20000 huva
    // translate 100*x
     }

}


sphere

  {
  0, 7004
  
  texture {
  
  
  
  pigment
     { 
   //  onion
  //   ripples
   //  waves
      bozo
   //   agate
    //  granite 
        
   //  marble  
    
      colour_map {
            [.45   colour rgbf 1   ] 
            [.7   colour rgb 1   ] 
             }      
     turbulence 20.0  
     omega 0.6 
      lambda 5
     octaves 14
     scale <12, 2, 12>*30000000
     rotate <30, 0, -45>
     } 
     
     
     
     
 finish { ambient 0.000002 diffuse 0.999 }
     }
  }  
  
  
  
  
  
   
   
   /*
  1. declare CLOUDS1 = pigment {
   //  onion
     //ripples
       waves
     // bozo
     // agate
    //  granite 
        
    // marble  
      colour_map {
            [.3   colour rgbf 1   ] 
            [.7   colour rgb 1   ] 
             }      
     turbulence 20.0  
     omega 0.6 
      lambda 5
     octaves 14
     scale <12, 2, 12>*30000
     rotate <30, 0, -45>
     }  
  
 
 
#declare CLOUDS2 = pigment { 
   planar
   //  onion
     //ripples
     //  waves
     // bozo
     // agate
    //  granite 
        
    // marble  
      colour_map {
            [.3   colour rgbf 0   ] 
            [.7   colour rgb 0   ] 
             }      
     turbulence 0.0  
     omega 0.0 
      lambda 0
     octaves 1
 //    scale <12, 2, 12>*30000
     rotate <30, 0, -45>
     }  
   
  
  
sphere
  {
  0, 7004
  

  
  
  
  texture {   
  
  
   gradient y       
  // translate y*0.5
   texture_map {
       [ 0.0   pigment {CLOUDS1} ]    
       [ 0.5   pigment {CLOUDS1} ]
       [ 1.0   pigment {CLOUDS1} ]
  
       }
     
     
        scale 2
     
 //  finish { ambient 0.000002 diffuse 0.999 }
     
     
     }
 
 
 
  }  
    
  
  
   */
  
  
  
  
  
  
  
  
  
  
  
  
  
  








Original code

The Persistence of Vision POV-Ray 3.62 raytracer source code of this image of simple planet.


global_settings {
  #if (version < 3.7)
    assumed_gamma 1.0
  #end
}

  
default { finish { ambient 0.000002 diffuse 0.7 } }
  
  
camera { location <0,0,-17000> }

light_source { 150000000*<-1, 1, -1> rgb 1 }

sphere
   {
   0, 7000

   pigment
      {
     // bozo                  // kasvit 100,100,120
     granite      
             colour_map
         {
            [.3   colour rgb <30, 45, 160>/(255*3)   ]     

              [.5   colour rgb <230, 200, 180>/(255)   ] 
                    [.7   colour rgb <150, 120, 130>/(255)   ] 
        
         }
 
     
     /*
      colour_map
         {
   
              [.3   colour rgb <230, 200, 180>/(255)   ] 
                    [.7   colour rgb <150, 120, 130>/(255)   ] 
        
         }
       */
     /*
      colour_map
         {
         [.5   colour rgb <30, 45, 160>/(255*3)   ]     
         [.5 colour rgb <200,170,190>/(256*4)  ] 
               [1.00 colour rgb <200,170,190>/(256*8)  ] 
         }
       */
      turbulence .1
      scale 15000  // 20000 huva
     // translate 100*x
      }

}

sphere
   {
   0, 7004
   
   texture {
   pigment
      {
      // bozo
      // agate
       granite   
     // marble  
       colour_map {
             [.3   colour rgbf 1   ] 
             [.7   colour rgb 1   ] 
              }      
      turbulence 1.0
      scale <12, 3, 12>*1200
      rotate <30, 0, -45>
      }
  finish { ambient 0.000002 diffuse 0.999 }
      }
   }

Licensing edit

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

File history

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

Date/TimeThumbnailDimensionsUserComment
current12:19, 26 September 2022Thumbnail for version as of 12:19, 26 September 20221,600 × 1,200 (1.4 MB)Merikanto (talk | contribs)Update
18:05, 15 September 2022Thumbnail for version as of 18:05, 15 September 20223,600 × 2,700 (4.58 MB)Merikanto (talk | contribs)New style of image
07:46, 5 April 2022Thumbnail for version as of 07:46, 5 April 20222,400 × 1,800 (1.39 MB)Merikanto (talk | contribs)Update
09:26, 24 August 2010Thumbnail for version as of 09:26, 24 August 2010800 × 600 (290 KB)Merikanto~commonswiki (talk | contribs){{Information |Description={{en|1=Fictional terrestrial planet in space. There is no vegetation on continents. }} |Source={{own}} |Author=Merikanto |Date=23.8.2010 |Permission= |other_versions= }} The Persistence of Vision POV-Ray 3.62

The following page uses this file:

File usage on other wikis

The following other wikis use this file:

Metadata