File:Barred spiral galaxy 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: 1,009 KB, MIME type: image/png)

Captions

Captions

Barred spiral galaxy POV-Ray rendering

Summary

[edit]
Description
English: Barred spiral galaxy POV-Ray rendering
Date
Source Own work
Author Merikanto

POV-Ray 3.7 code

///////////////////////////////////////// // // barred spiral galaxy // // POV-Ray 3.7 source code // // 30.6.2023 0000.0000 //

  1. include "functions.inc"

camera { location <0,0,-2>*2 look_at <0,0,0>

angle 35

}


  1. declare expf1=function { max(1-min ( -1* exp( -sqrt(x*x+y*y+0*0)),0 ),1)}
  1. declare hole1= function {max( min( 1*f_sphere(x*5.5,y*5.5,0,2),1),0)}


  1. declare powhole1=function { pow( max(min(f_sphere(x*10,y*10,(0),1),1),0) ,6)}
  1. declare normal1=function {exp (-0.5*pow(((( sqrt(x*x+y*y) ))/0.5),2))}
  // logarithmic spiral 1
  1. declare sinlogspiral1=function {

min ( max ( ((( sin ( (5*log(sqrt( (x*x+y*y) ))*pi*2)+0.5*((atan2(x,y)/(1))/(pi/8)) *pi/2 ) ) +1)/2) ,0) ,1)

}


  1. declare spiralnormal1 = function {
 (normal1(x*1.5,y*1.5,z*1.5)*sinlogspiral1(x,y,z)/2 )

}

#declare spiralnormalhole1 = function {
 (normal1(x*1,y*1,z*1)*sinlogspiral1(x,y,z)/2 ) *hole1(x*3,y*3,z*3)

}

#declare spiralhole1 = function {
 (sinlogspiral1(x,y,z)/2 ) *hole1(x*1,y*1,z*1)

}


  1. declare bar1= function {

// normal1(x*2,y*2,z*2)

// (max( min(1-f_sphere(x,y,z,1),0),1))


//max(min( (1-sqrt(x*x+y*y)),1),0)

max(min( (1-sqrt(x*x+y*y)),1),0) 

}

  1. declare galax_trunc1= function {
spiralnormalhole1(x,y,z)/3
+pow(normal1(x*1.5,y*1.5,z*1.5)/2,2)/3
+max ( normal1(x*5,y*5,z*5)/3, spiralnormalhole1(x,y,z)/3 )

}

 #declare galax1=function {

(

 galax_trunc1(x,y,z)* f_granite (  galax_trunc1(x,y,z),1-f_granite(x*3,y*3,z*3),f_wrinkles(x*30,y*30,z*30))/2  )                       
*(f_wrinkles(galax_trunc1(x,y,z),y*10,z*10)/2+f_wrinkles(x*100*galax_trunc1(x,y,z),y*100,z*100)/2)*1
*f_granite(x*10*galax_trunc1(x,y,z),y*10*f_granite(x,y,z), z*10*f_wrinkles(x*10,y*10,z*10)) 
*f_granite(x*100,y*100, z*100)*4
+normal1(x*3,y*3,z*3)*0.69

+ (exp(normal1(x/0.5,y/0.5,z/0.5))-0.01)*0.03

/*

 f_granite (galax_trunc1(f_granite(x,y,z),y,z), f_granite(galax_trunc1(x,y,z),y,z), f_agate(galax_trunc1(x,y,z),y,z) )
  • galax_trunc1(x,y,z)
  • /

}


 #declare bargalaxtrunc1=function {

(

//galax_trunc1(x,y,z)*1

//spiralhole1(x,y,z) // bar1((x-y)*3,y*2-x*6,z) // bar1(x*5,(y-x)*7,0)

 bar1(x*3*1.1,y*7*1.1,0)   

+spiralhole1(x*1.4,y*1.4,z*1.4)*normal1(x,y,z)

)

}


  1. declare galax2=function {
 bargalaxtrunc1(x,y,z)

}


#declare galpix1= function {
 

//f_granite(x,y,z)

( ( ( f_wrinkles( galax2(x,y,z),f_granite(x,y,z),f_granite(x,y,z) ) )



  • galax2(x,y,z) ) /2

+

spiralhole1(f_granite(x*10,y*10,z*10),y,z)

  • galax2(x,y,z) /2

)

*

(f_granite(x,y,z)/5

 +f_granite(x*2,y*2,z*2)*0.8
)
 *

(f_granite(x*10,y*10,z*10)/4

 +f_granite(x*100,y*100,z*100)*0.75
)

  • f_granite(x*100,y*100,z*100)*10

/*

  • spiralhole1(f_granite(x,y,z),y,z)


( f_granite(x*10,y*10, z*10)/3

+f_wrinkles(x*1000,y*1000, z*1000)/3 )
*f_wrinkles(x*10,y*10,z*10)
  • f_wrinkles(x*30,y*30,z*30)
*f_wrinkles(x*100,y*100,z*100)   
  • f_granite(x*100,y*100,z*100)

)

  • /

+ normal1(x,y,z)*0.3


}

  1. declare galtex1= texture {
  pigment {
   
       function { galpix1(x,y,z) }
      color_map {
       [0 rgbt <1,1,1,1>]
       [1 rgbt <1/2,1/2,1,0>*2]
       }
   }
 
finish {ambient 1}

}

  1. declare gal1=object {

plane {z,0}

texture {galtex1 scale 1/2}

// texture {galtex1 rotate z*5 scale 1/2}

}


union {

   object {gal1

rotate z*30 }


}

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:59, 30 June 2023Thumbnail for version as of 08:59, 30 June 20231,600 × 1,200 (1,009 KB)Merikanto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata