File:Globular cluster pov 1 r 1.png

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

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

Captions

Captions

Globular cluster, space art

Summary[edit]

Description
English: Globular cluster, space art
Date
Source Own work
Author Merikanto

POV-Ray 3.7 source code

///////////////////////////////// // // globular cluster // pov-ray 3.7 source code // 10.7.2023 v 0000.0001 // /////////////////////////////


  1. include "colors.inc"
  2. include "textures.inc"
  3. include "metals.inc"
  4. include "stones.inc"
  5. include "glass.inc"
  6. include "woods.inc"
  7. include "shapes.inc"
  1. include "functions.inc"
  2. include "rand.inc"


  // global_settings { assumed_gamma 1 }
 #declare Rad_Quality = 0;

global_settings {

 assumed_gamma 1.0
    adc_bailout 1/10 

//default {ambient 0 }

  1. switch (Rad_Quality)
#case (1)
 radiosity {             // --- Settings 1 (fast) ---
   pretrace_start 0.08
   pretrace_end   0.02
   count 50
   error_bound 0.5
   recursion_limit 1
 }
#break
#case (2)
 radiosity {             // --- Settings 2 (medium quality) ---
   pretrace_start 0.08
   pretrace_end   0.01
   count 120
   error_bound 0.25
   recursion_limit 1
 }
#break
#case (3)
 radiosity {             // --- Settings 3 (high quality) ---
   pretrace_start 0.08
   pretrace_end   0.005
   count 400
   error_bound 0.1
   recursion_limit 1
 }
#break
#case (4)
 radiosity {             // --- Settings 4 (medium quality, recursion_limit 2) ---
   pretrace_start 0.08
   pretrace_end   0.005
   count 350
   error_bound 0.15
   recursion_limit 2
 }
#break
#end

}


/*

global_settings
{ photons
  { count 20000
    media 100 
   //    autostop 0
   //    jitter .4
  }
}
  • /


camera { location <0,0,-100>*1.5

look_at <0,0,0> angle 5 }



//light_source {<100,100,-20>*1000 White*1.0}



  1. declare starfield3=sky_sphere {

/* pigment {

   bozo
   color_map {
       [0.0 White*3]
       [0.2 Black]
       [1.0 Black] 
       } 
   
   scale .006
    scale 1/10
   }
    */

pigment {

     bozo
   color_map {
       [0.0 White*3]
       [0.2 rgbt 1]
       [1.0 rgbt 1] 
       } 
   
   scale .006
    scale 3/100

}


pigment {

     bozo
   color_map {
       [0.0 White*2]
       [0.2 rgbt 1]
       [1.0 rgbt 1] 
       } 
   
   scale .006
    scale 1/100

}

pigment {

     bozo
   color_map {
       [0.0 White*2]
       [0.2 rgbt 1]
       [1.0 rgbt 1] 
       } 
   
   scale .006
    scale 3/1000

}


pigment {

     bozo
   color_map {
       [0.0 White*1]
       [0.2 rgbt 1]
       [1.0 rgbt 1] 
       } 
   
   scale .006
    scale 1/1000

}


pigment {

     bozo
   color_map {
       [0.0 White*1]
       [0.2 rgbt 1]
       [1.0 rgbt 1] 
       } 
   
   scale .006
    scale 3/10000

}

pigment {

     bozo
   color_map {
       [0.0 White*1/2]
       [0.2 rgbt 1]
       [1.0 rgbt 1] 
       } 
   
   scale .006
    scale 1/10000

}


}



sky_sphere { starfield3} 







  1. declare stara1= object {

sphere {0, 0.05} pigment {color <1,0,0>} finish {ambient 1}

}


  1. macro starcluster (Numstars1, scoeff1, crk1, cgk1, cbk1)


  1. declare Stream=RdmA;
  2. declare RandSeed = seed(123);
  1. declare Minr1=0.6;
  2. declare Maxr1=1.2;
  1. declare xx1=0;
  2. declare yy1=0;

//#declare rcoeff1=0.02;

#declare rcoeff1=0.01;


union {

  1. for (Count,0,NumStars1)
#declare fii1=RRand(0,360,1);
#declare fii2=RRand(0,180,2); 
   #declare brightness1=Rand_Gauss(2, 1, 0) ;
   #declare rr1=Rand_Gauss(0.5, 0.4, 0) *rcoeff1; 
   // #declare cr1=Rand_Gauss(0.5, 1, 0) ;
   //   #declare cg1=Rand_Gauss(0.5, 1, 0) ;
         #declare cb1=Rand_Gauss(0.5, 1, 0)*cbk1 ;
           #declare cr1=crk1 ;
      #declare cg1=cgk1; 
     


// #declare rr1=RRand(Minr1, Maxr1, 0)*1;

  // #declare ss2=Rand_Gauss(0, 0.2, 0);
       #declare ss2=exp(Rand_Gauss(0, 0.2, 0))-1 ;
   // 
   #declare ss2=pow( Rand_Gauss(0, 0.2, 0) ,0.95 ) ;

// #declare ss1=RRand(0, 1, 0);

  //#declare ss2=exp(exp(ss1)-1)-1  ;
  //  #declare ss2=pow(ss1,4);
 #declare xx1=ss2*scoeff1*cos(fii1);
 #declare yy1=ss2*scoeff1*sin(fii1);
 #declare zz1=ss2*scoeff1*sin(fii2);
object {

//stara1

sphere {0, rr1}
 
   pigment { 
 
   spherical 
   //radial
   rotate x*90    
   
 //  sine_wave
   color_map {
      [0 color rgb <0,0,0> transmit 1  ]  
     
    //   [0.999 color rgbt <0,0,0>  transmit 1  ] 

// [1 color rgb <1,1/2,0> transmit 0 ]

       [1 color rgb <cr1, cg1, cb1> transmit 0 ]  
   }  
 
      }
 


//pigment {color <0.5,0.5,1>*brightness1}

finish {ambient 2}

translate <xx1,yy1,zz1> }


  1. end


}

  1. end


// globular cluster

// blue stragglers

  1. declare NumStars1=200;
  2. declare dimension1=2;


#declare crk1=0.5 ;
#declare cgk1=0.5; 
#declare cbk1=2 ;

starcluster (NumStars1, dimension1, crk1, cgk1, cbk1)


// other stars


  1. declare NumStars1=10000;
  2. declare dimension1=7;


#declare crk1=2 ;
#declare cgk1=1; 
#declare cbk1=1 ;

starcluster (NumStars1, dimension1, crk1, cgk1, cbk1)

/*

    box
{ -1,1 

scale 20

pigment { rgbt 1 } hollow

  interior
  { media
    { scattering { 3, 1/10 }
    }
  }
}


  • /


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
current14:37, 10 July 2023Thumbnail for version as of 14:37, 10 July 20231,600 × 1,200 (389 KB)Merikanto (talk | contribs)Update of code
07:23, 10 July 2023Thumbnail for version as of 07:23, 10 July 20231,600 × 1,200 (418 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata