File:Gas nebula 2 rend 1.png

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

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

Captions

Captions

Gas nebula and bright star

Summary

[edit]
Description
English: Bright star, gas nebula
Date
Source Own work
Author Merikanto

POV-Ray 3.7 source code

// // two lens effects and gas nebula // pov-ray 3.7 src // 23.1.2023 0000.0000 //

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

background{ color 0}

camera {

       location <0,0, -6>
       look_at <0, 0, 0>
       angle 60

}

/* light_source {

       <100,-100,100>*10000
       color rgb<1,1,1>*2.0

}

  • /

sky_sphere {

pigment {

bozo

 scale 1/300

color_map { [0 color rgb 1]

[0.1 color rgb 0]

[1 color rgb 0]

} }

}

  1. declare sparkpig1 = pigment {
   //function {
   //x*y*z
   ///  (1-sqrt(x*x+y*y))
   //  pow(  (1-sqrt(x*x+y*y)), 3)  
   //    exp(1*  (1-sqrt(x*x+y*y)) )  
   //   1-sqrt(x*x+y*y*y*y) // rod    
   // 1-sqrt(x/y+y/x) // 
   //  (1-sqrt(x/y+y/x))* // 
   //  (1-sqrt(x*x+y*y))
   //  ( 1-sqrt(x/y+y/x ) )
   //}
  
          

//frequency 5 spherical

scale y/50

poly_wave 2

//sine_wave

color_map {

[0 rgb <1,1,1> transmit 1]  
[1 rgb <1,1,1> transmit 0]  

}

}

  1. declare sparktex1= pigment { sparkpig1 }


  1. macro spark1()

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

//texture { texas2}


#for (n,1,100)

 #declare fii1= RRand(0, 180, 0);
  #declare rr1= RRand(0, 1, 0);
  #declare rr2= RRand(0, 1, 0);  
   #declare rr3=Rand_Normal(0.5, 0.5, 0);
texture { sparktex1 scale y*rr3 scale x*rr1 rotate z*fii1 scale rr2 
  
    finish {ambient 2}

}

#end

}

  1. end

// primary glow

  1. declare sparkpig2= pigment {

function {

// 0.1*( + f_bozo( atan2(x,y)*8 ,0,0 )*0.005/(x*x+y*y)+ f_bozo( atan2(x,y)*32 ,0,0 )*0.01/(x*x+y*y)+ f_bozo( atan2(x,y)*720 ,0,0 )*0.01/(x*x+y*y) )

// 0.1*f_bozo( atan2(x,y)*36 ,0,0 )*0.01/(x*x+y*y)

//0.1*f_wrinkles( atan2(x,y)*36 ,0,0 )*0.01/(x*x+y*y)

// 0.2*f_granite( atan2(x,y)*3 ,0,0 )*0.02/(x*x+y*y)+

//  0.01*f_agate( atan2(x,y)*3 ,0,0 )*0.02/(x*x+y*y) 
  
//  0.2*f_granite( atan2(x,y)*3 ,0,0 )*0.001/pow( (x*x+y*y),3) 
//  0.2*f_granite( atan2(x,y)*3 ,0,0 )*1/( exp( (x*x+y*y))*0.005 ) 
    0.09*f_granite( atan2(x,y)*3 ,0,0 )*0.3/pow( (x*x+y*y),1) 

}

/* color_map {

   [0 color <0,0,0>  transmit 0.5 ]
   [0.5 color 0.3 transmit 0.5 ]
   [1 color <1,1,1> transmit 0.5 ]
  
 }
 */
color_map {

// [-1000 color <0,0,0> transmit 1 ]

   [0 color <0,0,0>  transmit 1 ]
   [0.5 color <0.2,0.2,0.3> transmit 0.5 ]
   [1 color <1/2,1/2,1> transmit 0 ]
    [1000 color <1/2,1/2,1> transmit 0 ]  
 }
        
poly_wave 1

}


  1. declare ballpig1 = pigment {

spherical

poly_wave 4

//sine_wave

color_map {

[0 rgb <1/2,1/2,1> transmit 1]  
[0.4 rgb <1/2,1/2,1>/2 transmit 0.5] 
[1 rgb <1/2,1/2,1>*5 transmit 0]  

}

}


  1. declare sparktex2= pigment { sparkpig2}


  1. declare balltex1= pigment { ballpig1 }


  1. declare ball1=object {

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

 texture {balltex1} 
 
finish {ambient 8}
}


  1. declare spark2=object {

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

 texture {sparktex2} 
 
finish {ambient 3}
}



  1. declare nebula1=object {
   disc {0, <0,0,-1>,0.999 }
   texture {
   pigment {
 
   onion    
   frequency 1
   // scallop_wave 
   turbulence 0.1
   pigment_map 
   {   
   [-1 color rgb <0,0,0> transmit 1]
   [0   
   wrinkles scale 0.1
   color_map {[0 color rgb <0,0,0> transmit 1] [1 color rgb <1,0.2,0.2> transmit 0] }
   //color rgb <1,0,0> transmit 0  
   ]
   


   [1 color rgb <0,0,0> transmit 1]    
   }
   scallop_wave scale 2
   //warp {turbulence 0.2}
   //  warp {turbulence .1 octaves 16 omega .2 lambda 2}
   }
   finish { ambient 1}
   }
   }
 


//object {spark1() translate x*-1 }

object {nebula1 scale <5,5,1> translate z*2 }

object { ball1 scale 1.8 translate z*-0.001}

object { ball1  scale 1 translate z*-0.003}

object { spark2 scale 2 translate z*-0.002}


object {spark1() scale 1.1 translate x*0 }

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
current08:00, 23 January 2023Thumbnail for version as of 08:00, 23 January 20231,600 × 1,200 (533 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata