File:Gas nebula 1 rend 1.png

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

Original file(2,400 × 1,800 pixels, file size: 1.49 MB, MIME type: image/png)

Captions

Captions

Gas nebula

Summary[edit]

Description
English: Gas nebula. Some emission band dark nebulas, some stars.
Date
Source Own work
Author Merikanto

POV-Ray 3.7 source code


// bright star, simple starfield and sky is gas nebula // pov-ray 3.7 code // // 22.1.2022 0000.0001 //


  1. include "functions.inc"
  2. include "shapes.inc"
  3. include "rand.inc"


camera {

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

}


  1. declare prays1=
   pigment { 
 
function {
 ((sin(x*150)+1)/2)*
 (1-z)

}

//spiral1 4
   //spherical 
//  radial  

//wrinkles

//granite scale z*3

//  rotate x*90    
  

// frequency 20

 //   granite 
    

poly_wave 3

  // sine_wave
   //  scallop_wave
   color_map {
      [0 color rgb <1,1,1>  transmit 1  ]  
     
       [0.4 color rgbt <0,0,0>  transmit 1  ] 
       [1 color rgb <1,1,1> transmit 0 ]   
   }  
 
      warp {
    spherical  
   }
   rotate x*90
   }    



#declare prays2=  
   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,1> transmit 0 ]   
   }  
 



   }    









  1. declare testex1= texture {
   pigment {
       average
       pigment_map { 
       [1 prays1  ]
 //      [1 prays2 ]
       }
   }

}



  1. declare testex2= texture {
   pigment {
       average
       pigment_map { 
       [1 prays2  ]
 //      [1 prays2 ]
       }
   }

}



  1. declare testex3= texture {
   pigment {
       average
       pigment_map { 
       [1 prays1  ]
       [1 prays2 ]
       }
   }

}



  1. macro raymakro1(nume)
   pigment { 
 
   function {
   ((sin(x*nume)+1)/2)*
   (1-z)
   }
 
//spiral1 4
   //spherical 
//  radial  

//wrinkles

//granite scale z*3

//  rotate x*90    
  

// frequency 20

 //   granite 
    

poly_wave 3

  // sine_wave
   //  scallop_wave
   color_map {
      [0 color rgb <1,1,1>  transmit 1  ]  
     
       [0.4 color rgbt <0,0,0>  transmit 1  ] 
       [1 color rgb <1,1/2,0> transmit 0 ]   
   }  
 
      warp {
    spherical  
   }
   rotate x*90
   }    
#end



 #macro spheree1()  
   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 ]   
   }  
 
      }
 
   #end


  1. declare testex4= texture {
  // pigment {
    //   average

// pigment_map {

      raymakro1(100)   
     //  [1 prays1 scale 1/2 rotate z*10 ] 
       //  [1 prays1 scale 3/4 rotate z*30 ]
 //      }
 //  }

}



  1. declare stara1=object {

disc {0,<0,0,-1>,1}

// texture { raymakro1(40) }

     texture { raymakro1(250) scale 1 }
        texture { raymakro1(350) scale 0.8 }
        texture { raymakro1(450) scale 0.7 }
//    texture {testex1}

   texture {spheree1() scale 0.3 finish {emission 3}}
 finish {emission 2}




}






 #macro Pentagon() 
  1. declare radius1=1;
  2. declare deltafii1=2*pi/5;


  1. declare x1= radius1*sin(deltafii1) ;
  2. declare y1= radius1*cos(deltafii1) ;
  3. declare z1=0;
  1. declare x2= radius1*sin(deltafii1*2) ;
  2. declare y2= radius1*cos(deltafii1*2) ;
  3. declare z2=0;
 #declare  x3= radius1*sin(deltafii1*3) ;
  1. declare y3= radius1*cos(deltafii1*3) ;
  2. declare z3=0;
  1. declare x4= radius1*sin(deltafii1*4) ;
  2. declare y4= radius1*cos(deltafii1*4) ;
  3. declare z4=0;
#declare  x5= radius1*sin(deltafii1*5) ;
  1. declare y5= radius1*cos(deltafii1*5) ;
  2. declare z5=0;
               polygon { 5,
               <x1, y1, z1>,
               <x2, y2, z2>,
               <x3, y3, z3>,          
               <x4, y4, z4>,       
               <x5, y5, z5>     
                 }
   
  1. end
#macro Hexagon() 
  1. declare radius1=1;
  2. declare deltafii1=2*pi/6;


  1. declare x1= radius1*sin(deltafii1) ;
  2. declare y1= radius1*cos(deltafii1) ;
  3. declare z1=0;
  1. declare x2= radius1*sin(deltafii1*2) ;
  2. declare y2= radius1*cos(deltafii1*2) ;
  3. declare z2=0;
 #declare  x3= radius1*sin(deltafii1*3) ;
  1. declare y3= radius1*cos(deltafii1*3) ;
  2. declare z3=0;
  1. declare x4= radius1*sin(deltafii1*4) ;
  2. declare y4= radius1*cos(deltafii1*4) ;
  3. declare z4=0;
#declare  x5= radius1*sin(deltafii1*5) ;
  1. declare y5= radius1*cos(deltafii1*5) ;
  2. declare z5=0;
 #declare  x6= radius1*sin(deltafii1*6) ;
  1. declare y6= radius1*cos(deltafii1*6) ;
  2. declare z6=0;
               polygon { 6,
               <x1, y1, z1>,
               <x2, y2, z2>,
               <x3, y3, z3>,          
               <x4, y4, z4>,       
               <x5, y5, z5>,     
                 <x6, y6, z6> 
                 }
   
  1. end


 #macro Octagon() 
  1. declare radius1=1;
  2. declare deltafii1=2*pi/8;


  1. declare x1= radius1*sin(deltafii1) ;
  2. declare y1= radius1*cos(deltafii1) ;
  3. declare z1=0;
  1. declare x2= radius1*sin(deltafii1*2) ;
  2. declare y2= radius1*cos(deltafii1*2) ;
  3. declare z2=0;
 #declare  x3= radius1*sin(deltafii1*3) ;
  1. declare y3= radius1*cos(deltafii1*3) ;
  2. declare z3=0;
  1. declare x4= radius1*sin(deltafii1*4) ;
  2. declare y4= radius1*cos(deltafii1*4) ;
  3. declare z4=0;
#declare  x5= radius1*sin(deltafii1*5) ;
  1. declare y5= radius1*cos(deltafii1*5) ;
  2. declare z5=0;
 #declare  x6= radius1*sin(deltafii1*6) ;
  1. declare y6= radius1*cos(deltafii1*6) ;
  2. declare z6=0;
 #declare  x7= radius1*sin(deltafii1*7) ;
  1. declare y7= radius1*cos(deltafii1*7) ;
  2. declare z7=0;
 #declare  x8= radius1*sin(deltafii1*8) ;
  1. declare y8= radius1*cos(deltafii1*8) ;
  2. declare z8=0;


               polygon { 8,
               <x1, y1, z1>,
               <x2, y2, z2>,
               <x3, y3, z3>,          
               <x4, y4, z4>,       
               <x5, y5, z5>,     
                 <x6, y6, z6> 
               <x7, y7, z7>,     
                 <x8, y8, z8>
                 }
   
  1. end



  1. macro gooni1(r1,g1,b1,trans1, emis1)

object {


 //  Pentagon() 
   
//  Hexagon() 
  Octagon()
rotate z*30
       texture { 
 pigment { rgbt <r1,g1,b1,trans1>}
   finish {ambient emis1}
    }
      

}


#end







#declare ring2=object {

disc {0,<0,0,-1>,1}


texture {

   pigment { 
   spherical  

poly_wave 1/2 // sine_wave

     color_map {
   [0/10 color rgbt <1,1,1,1>] 
   [4.5/10 color rgbt <1,1,1,1>]
   [5/10 color rgbt <1,1,1,0>]
         [5.5/10 color rgbt <1,1,1,1>]
    [10/10 color rgbt <1,1,1,1>]  
   }
 //   scale y/100
  //   rotate z*0
   }  
   
 finish {emission 1/100}
}


}



  1. declare stream1=1;
  2. declare stream2=2;
  1. declare vali1=0.3;
  2. declare vali2=0.3;
  1. declare degrad=pi/180.0;
  1. declare fii=60*degrad;
  1. declare xs1=0;
  2. declare ys1=0;
  1. declare rmin=0.05;
  1. declare rmax=0.2;
  1. for (n,1,10)


  1. declare a=RRand(vali1,vali2 , 0);
  2. declare b=RRand(rmin,rmax , 1);
#declare c=RRand(0,1 , 1);
#declare d=RRand(0,1 , 1);
  1. declare xs1=xs1+sin(fii)*a;
  2. declare ys1=ys1+cos(fii)*a;


  1. declare rs1=b*xs1;


  1. declare r1=1;
  2. declare g1=1;
#declare b1=1;
  1. declare trans1=0.5;
  2. declare emis1=1;
  3. declare trans1=0.5+d/2;
 object {

//gon1

 gooni1(r1,g1,b1,trans1, emis1)
  scale 10

//ring2 scale rs1 translate z*-0.0001*n translate x*xs1*10

translate y*ys1*10

}


  1. end




  1. declare spike1= texture {
   pigment { 
  spherical  
//  onion
frequency 1

//once //once // rotate y*90

  poly_wave 1.5

//scallop_wave

  color_map {


 [0 color rgbt <1/2,1/2,1>/2 transmit 1 ]
    [0.6 color rgbt <1,1,1>*1.5  transmit 0.9 ]
      [1 color rgbt <1,1,1>*8  transmit 0.01  ] 
}  


    scale y/30 
    scale x*1
  
   }  
   
 finish {emission 0.2}
}



  1. declare stara2=object {

disc {0,<0,0,-1>,1}


  texture {spike1}
    texture {spike1 rotate z*90}
      texture {spike1 scale 0.5 rotate z*45}
         texture {spike1 scale 0.5 rotate z*-45}

texture {

 pigment {     

spherical //onion //once

poly_wave 5
        color_map {
   [0 color rgbt <1/2,1/2,1.5,1>]
   [1 color rgbt <1/2,1/2,1,0>]
   }
   scale 1
  //  scale x/10
    
   }


 finish {emission 2.5}


   }
 
   

/*

texture {
 pigment {     
 spherical  
   scale 1

// poly_wave 0.5

        color_map {        
   [0 color rgbt <0.001,0.001,0.001,0>]     
 //    [0.1 color rgbt <1,1,1,0>]
        [0.5 color rgbt <0,0,0,1>]
   [1 color rgbt <0,0,0,1>]



   }


   }




 finish {emission 2}
     scale 1
   }
  • /


}


object {stara2

scale 30 }


  1. declare sky1= sky_sphere {


 pigment {
    bozo
      scale 1/1000
         color_map 
    {
    [0 rgb 1]
    [0.2 rgb 0] 
    [1 rgb 0] 
    
    }
      scale 1
    }
   
  

  pigment {
granite

scale 5 // wrinkles

 turbulence 0.5
        scale 1/10
            color_map 
    {
    [0 rgbt <0,0,2,1>]
    [1 rgbt <2.0,0.5,0.5,0.5>] 
    
    }

}


  pigment {
wrinkles

scale 1/10

 turbulence 0.5
            color_map 
    {
    [0 rgbt <0,0,2,1>]
    [1 rgbt <2.0,0.5,0.5,0.5>] 
    
    }

}

  pigment {

// agate // granite // bozo

 leopard

scale 0.1

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

}


  pigment {

// agate

 granite  

//scale 0.1

 turbulence 0.5
            color_map 
    {
    [0 rgbt <0.1,0.1,0.1,0.1>]
[0.3 rgbt 0.5] 
    [1 rgbt 1] 
    
    }

}

 /*
    pigment {

// agate

 granite  
//  radial

//scale 0.1

// turbulence 0.5

            color_map 
    {
    [0 rgbt <0,0,0,1>]
    [1 rgbt <0,0,1,0>] 
  
    }

}

  • /

// scale 5 }


sky_sphere {sky1 //finish {ambient 1} }



/*


  object {stara1

scale 10*4 }

 */


  1. declare star1=object {
 disc {0, <0,0,-1>, 1}
  hollow
  pigment {
  
 

// spherical // ramp_wave

 function {
    (1-sqrt(x*x+y*y+z*z))

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

// pow(-(x*x+y*y+z*z))    

}

poly_wave 3
  color_map {
   [0 rgbt <1,1,1,1>]
   [1 rgbt <1,1,1,0>*1]
   }
   }
 finish {
 refraction 1

reflection 0

ambient 3
}

}


 #declare Stream1=1;
#declare Stream2=2;
  1. for (n,1,400)


object { star1 scale 1/10

  1. declare a1=RRand(0,1,Stream2);
  1. declare x1=RRand(-1, 1, Stream1);
  2. declare y1=RRand(-1, 1, Stream1);
#declare z1=RRand(0, 1, Stream1);

scale a1 *2

translate x*x1*30 translate y*y1*30 translate z*z1*30

}

  1. end









Old gas nebula only code!


// // gas nebula // pov-ray povray 3.7 source code // 6.1.2022 0000.0000 //

#include "colors.inc"
#include "functions.inc"
#include "rand.inc"

camera{

   location  <0,0,-10>*1.5 
   look_at 0
  angle 32
   }             

//light_source{ <20,1000,-100>*1000*1000 rgb <1,1,1>*10 }


  1. declare sky1= sky_sphere {


 pigment {
    bozo
      scale 1/1000
         color_map 
    {
    [0 rgb 1]
    [0.2 rgb 0] 
    [1 rgb 0] 
    
    }
      scale 1
    }
   
  

  pigment {
granite

scale 5 // wrinkles

 turbulence 0.5
        scale 1/10
            color_map 
    {
    [0 rgbt <0,0,2,1>]
    [1 rgbt <2.0,0.5,0.5,0.5>] 
    
    }

}


  pigment {
wrinkles

scale 1/10

 turbulence 0.5
            color_map 
    {
    [0 rgbt <0,0,2,1>]
    [1 rgbt <2.0,0.5,0.5,0.5>] 
    
    }

}

  pigment {

// agate // granite // bozo

 leopard

scale 0.1

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

}


  pigment {

// agate

 granite  

//scale 0.1

 turbulence 0.5
            color_map 
    {
    [0 rgbt <0.1,0.1,0.1,0.1>]
[0.3 rgbt 0.5] 
    [1 rgbt 1] 
    
    }

}

 /*
    pigment {

// agate

 granite  
//  radial

//scale 0.1

// turbulence 0.5

            color_map 
    {
    [0 rgbt <0,0,0,1>]
    [1 rgbt <0,0,1,0>] 
  
    }

}

  • /

// scale 5 }


sky_sphere {sky1}

  1. declare star1=object {
 disc {0, <0,0,-1>, 1}
  hollow
  pigment {
  
 

// spherical // ramp_wave

 function {
    (1-sqrt(x*x+y*y+z*z))

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

// pow(-(x*x+y*y+z*z))    

}

  color_map {
   [0 rgbt <1,1,1,1>]
   [1 rgbt <1,1,1,0>*3]
   }
   }
 finish {
 refraction 1

reflection 0

ambient 1
}

}



  1. declare Stream1=1;
#declare Stream2=2;
  1. for (n,1,100)


object { star1 scale 1/20

  1. declare a1=RRand(0,1,Stream2);
  1. declare x1=RRand(-1, 1, Stream1);
  2. declare y1=RRand(-1, 1, Stream1);
#declare z1=RRand(0, 1, Stream1);

scale a1 *0.4

translate x*x1*5 translate y*y1*5 translate z*z1*5

}

  1. 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
current15:05, 22 January 2023Thumbnail for version as of 15:05, 22 January 20232,400 × 1,800 (1.49 MB)Merikanto (talk | contribs)Update
14:48, 22 January 2023Thumbnail for version as of 14:48, 22 January 20231,600 × 1,200 (664 KB)Merikanto (talk | contribs)Update
15:39, 6 January 2023Thumbnail for version as of 15:39, 6 January 20231,600 × 1,200 (945 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata