File:Barred spiral galaxy 4 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: 1.87 MB, MIME type: image/png)

Captions

Captions

Barred spiral galaxy, artist view

Summary[edit]

Description
English: Barred spiral galaxy, artist view
Date
Source Own work
Author Merikanto

POV-Ray source code

/////////////////////////////////////////
//
// barred spiral galaxy  (short bar in center)
//
// POV-Ray 3.7 source code
//
// 14.7.2023 0000.0000
//

#include "functions.inc"
   
 global_settings { assumed_gamma 1 }

camera {
location <0,0,-10>*1.5
look_at <0,0,0> 
 
angle 35

}    
   

sky_sphere {

pigment {

bozo

scale 1/100
 
color_map 
{
[0 color rgb 1/3]
  [0.05 color rgb 1/3]
   [0.07 color rgb 0]
 [1 color rgb 0]

}

}
}

   
#declare spiral3= function
{
pigment {

spiral1 9
scale 3
}

}

  

#declare expf1=function {
max(1-min ( -1* exp( -sqrt(x*x+y*y+0*0)),0 ),1)
}

#declare hole1= function {
 max( min( 1*f_sphere(x*5.5,y*5.5,0,2),1),0)
}
 

#declare powhole1=function {

pow( max(min(f_sphere(x*10,y*10,(0),1),1),0)  ,6)

}

#declare normal1=function {

                

exp (-0.5*pow(((( sqrt(x*x+y*y) ))/0.5),2))

}

 

   // logarithmic spiral 1
#declare logspiral1=function {
 max(   min( (  ((sin((2*log(sqrt( (x*x+y*y) ))*pi*2)+((atan2(x,y))/(pi*1))*2*pi)/2)+0.5) ) ,1),0)  
}
  
 
   // logarithmic spiral 2
#declare logspiral2=function {
 max(   min( (  ((sin((10*log(sqrt( (x*x+y*y) ))*pi*2)+((atan2(x,y))/(pi*1))*10*pi)/2)+0.5) ) ,1),0)  
}
   
   

#declare spiralgranite1= function {

  
logspiral1(f_granite(x,y,z),logspiral1(x,y,z),z)

* pow ( logspiral1(x,y,z) ,5)
}
       
  
#declare spiralgranite2= function {

  
logspiral1(f_granite(x,y,z),logspiral1(x+f_wrinkles(x*10,y*10,z*10)*0.3,y+f_wrinkles(x*10,y*10,z*10)*0.3,z),z)

* pow ( logspiral1(x+f_wrinkles(x*10,y*10,z*10)*0.3,y+f_wrinkles(x*10,y*10,z*10)*0.3,z) ,5)
}
  
 #declare spiralgranite3= function {

  
logspiral2(f_granite(x,y,z),logspiral2(x+f_wrinkles(x*10,y*10,z*10)*0.3,y+f_wrinkles(x*10,y*10,z*10)*0.3,z),z)

* pow ( logspiral2(x+f_wrinkles(x*10,y*10,z*10)*0.3,y+f_wrinkles(x*10,y*10,z*10)*0.3,z) ,5)
}
  

 #declare spiralgranite00= function {

  
logspiral1(f_granite(x,y,z),logspiral1(x,y,z),z)

* pow ( logspiral1(x,y,z) ,2)
}
   
 

 #declare spiralgranite01= function {

  
logspiral1(f_granite(x,y,z),logspiral1(x+f_granite(x,y,z),y+f_granite(x,y,z),z),z)

* pow ( logspiral1(x+f_granite(x,y,z),y+f_granite(x,y,z),z) ,2)
}
  

#declare spiralagate1= function {

  
logspiral1(f_agate(x,y,z),logspiral1(x,y,z),z)

* pow ( logspiral1(x,y,z) ,5)
}

  
#declare spiralwrinkles1= function {

  
logspiral1(f_wrinkles(x,y,z),logspiral1(x,y,z),z)

* pow ( logspiral1(x,y,z) ,5)
}

 
#declare starfield1=  function {
pow(f_bozo(x*1000,y*1000,z*1000) ,1.5)

}

#declare fieldfunk1= function {
 
(
(    

(
 spiralgranite2(x,y,z)

* pow ( f_wrinkles((x+6)*3,(y+7)*3,z) ,3)
*normal1(x/3,y/3,z/3) 
)/1 
//+spiralgranite01(x,y,z)/2
//*normal1(x/3,y/3,z/3) 
)

*starfield1(x,y,z)
)

//+normal1((x)*3,y*3,z*3)*0.6  
 

}

   

#declare fieldfunk2= function {
 
(
(    

(
 spiralgranite3(x,y,z)

* pow ( f_wrinkles((x+6)*3,(y+7)*3,z) ,3)
*normal1(x/3,y/3,z/3) 
)/1 
//+spiralgranite01(x,y,z)/2
//*normal1(x/3,y/3,z/3) 
)

*starfield1(x,y,z)  
* starfield1(x,y,z)
)

//+normal1((x)*3,y*3,z*3)*0.6  
 

}

   

#declare cloudfunk1= function {

//(
pow ( spiralgranite3(x,y,z),3) 
* pow ( f_wrinkles((x+6)*3,(y+7)*3,z) ,3)*normal1(x/3,y/3,z/3)  /2

 +

                                                                                    
pow (spiralgranite2(x,y,z), 3)   

* pow ( f_wrinkles((x+6)*3,(y+7)*3,z) ,3)*normal1(x/3,y/3,z/3) /2

}

#declare fieldpig1= pigment {

function { fieldfunk1(x,y,z)}

color_map {
[0 color rgbt <1,1,1,1>]
 [1 color rgbt <1/2,1/2,2,0>]
}

}                 

#declare fieldpig2= pigment {

function { fieldfunk2(x,y,z)}

color_map {
[0 color rgbt <1,1,1,1>]
 [1 color rgbt <1/2,1/2,2,0>]
}

}                 

 #declare normalpig1= pigment {

function {  pow ( normal1(x,y,z),30) }
      poly_wave 3
color_map {
[0 color rgbt <1,1,1,1>]
 [1 color rgbt <1,0.8,0.6,0.7>]
}

} 

 #declare normalpig2= pigment {

function {  pow ( normal1(x,y,z),8)*f_granite(x*3,y*3,z*3)*starfield1(x,y,z) }

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

} 

  #declare normalpig3= pigment {

function {  pow ( normal1(x,y,z),5)

*f_granite(x*300,y*300,z*300)*starfield1(x,y,z) 

}

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

} 

  #declare bright1= pigment {

function {  cloudfunk1(x,y,z)}
    //  sine_wave

poly_wave 2
color_map {

[0 color rgbt <1,1,1,1>]
  [1 color rgbt <10,1,1,0>]
}

}                 

   #declare dark1= pigment {

function { cloudfunk1(x,y,z)}

color_map {

[0 color rgbt <0,0,0,0>] 
  [0.00001 color rgbt <0,0,0,0>] 
  [0.01 color rgbt <1,1,1,1>]
  [1 color rgbt <1,1,1,1>]
}

}                 

#declare field1=texture {

pigment { fieldpig1} 
finish {ambient <0.2, 0.2,1>}

}

#declare field2=texture {

pigment { fieldpig2} 
finish {ambient <0.2, 0.2,1>}

}
   
 
#declare nortti1=texture {

pigment { normalpig1} 
finish {ambient 1}

}
   
 #declare nortti2=texture {

pigment { normalpig2} 
finish {ambient 1}

}
 

 #declare nortti3=texture {

pigment { normalpig3} 
finish {ambient 1}

}
     
 
 #declare brightcloud1=texture {

pigment { bright1} 
finish {ambient 3}

}
 
 #declare darkcloud1=texture {

pigment { dark1} 
finish {ambient 0}

}
 

#declare galaxy1=plane {
 z,0
  
  
 texture {

    field1  

    finish {ambient <1/2,1/2,1>*8}
    }

   

texture {

    field2   

    finish {ambient <1/2,1/2,1>*8}
    }

 
/* 
    texture {

   dark1 

    finish {ambient 0}
    }
    
  */ 

   
 texture {

   bright1 

    finish {ambient 12}
    }
   

    

   

texture {

    nortti2
   scale 2 
   scale <1,0.5,1> 
          rotate z*60
    finish {ambient <1,1,1/2>*30}
    }

 
texture {

    nortti3
   scale 5 
//   scale <1,0.5,1> 
  //        rotate z*60
    finish {ambient <1,1,1/2>*5}
    }

 texture {

    nortti1
   scale 30 

   finish {ambient <1,1,1>*2.5}
    }
  
  

  
}

object { galaxy1
// rotate <40,30,20>
}   

//object {galaxy1}

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
current17:13, 20 October 2023Thumbnail for version as of 17:13, 20 October 20231,600 × 1,200 (1.87 MB)Obscure2020 (talk | contribs)Optimized with OxiPNG and ZopfliPNG.
10:01, 14 July 2023Thumbnail for version as of 10:01, 14 July 20231,600 × 1,200 (2.04 MB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.