File:Barred spiral galaxy media 1 r 1.png
Summary
Description |
English: Barred spiral galaxy with POV-Ray media |
Date | |
Source | Own work |
Author | Merikanto |
POV-Ray 3.7 source code
//
// barred spiral galaxy with media
// pov-ray 3.5
//
// 2.7.2023 0000.0000
//
- include "colors.inc"
- include "textures.inc"
- include "functions.inc"
global_settings {
assumed_gamma 1
max_trace_level 50
}
camera
{
location <0, 0, -2>* 0.65
look_at <0, 0, 0>
}
sky_sphere {
pigment {
bozo
scale 1/10000
color_map {
[0 color rgbt <1,1,1,0>*10]
[0.2 color rgbt <0,0,0,1>]
[1 color rgbt <0,0,0,1>]
}
}
pigment {
bozo
scale 1/3000
color_map {
[0 color rgbt <1,1,1,0>*10]
[0.2 color rgbt <0,0,0,1>]
[1 color rgbt <0,0,0,1>]
}
}
pigment {
bozo
scale 1/1000
color_map {
[0 color rgbt <1,1,1,0>*10]
[0.1 color rgbt <0,0,0,1>]
[1 color rgbt <0,0,0,1>]
}
}
pigment {
bozo
scale 1/300
color_map {
[0 color rgbt <1,1,1,0>*10]
[0.05 color rgbt <0,0,0,1>]
[1 color rgbt <0,0,0,1>]
}
}
//pigment { color rgb 1}
}
- declare logspiral00= function {((log(6*sqrt((x*x+y*y)/16))+atan2(x,y)/(pi) ) *2) }
- declare sinlogspiral1=function {min ( max (((( sin ( (4*log(sqrt( (x*x+y*y+z*z)*2 ))*pi*2)+0.5*((atan2(x,y)/(1))/(pi/8)) *pi/2 ) ) +1)/2),0) ,1)}
#declare powhole1=function { pow( max(min(f_sphere(x*3,y*3,(0),1),1),0) ,6)}
#declare normal1=function {exp (-0.5*pow(((( sqrt(x*x+y*y) ))/0.75),2))}
- 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)
}
- declare gaxtrunc0= function {
(
f_spherical (x,y,z)*2
- normal1(x,y,z)
* sinlogspiral1(x*4,y*4, z*0.1)
*powhole1(x*3,y*3,z*3)
)
}
- declare gaxtrunc1= function {
(
(
( f_spherical (x,y,z)*2
- normal1(x/2,y/2,z/2)
* sinlogspiral1(x*4,y*4, z*0.1)
*powhole1(x*3,y*3,z*3)
)/2
+bar1((x-y)*10,y*6,z*6)
) /1
)
}
- declare gaxmedia1= media {
emission 2000 *<0.5,0.5,1>
density {
function {
(
(
f_waves(x*20,y*20,z*20)
- f_ripples(x*6,y*6,z*6)
- gaxtrunc1(x,y,z)*0.5
+
gaxtrunc1(x,y,z)*normal1(x,y,z)
- f_wrinkles(x*100,y*100,z*100)*0.5
+ f_waves(x*20,y*20,z*20)
- f_ripples(x*6,y*6,z*6)
- normal1(x*3,y*3,z*3)*0.3
)
- f_wrinkles(x*3,y*3,z*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_wrinkles(x*300,y*300,z*300)
*f_wrinkles(x*1000,y*1000,z*1000)
- 30
) *0.3
+ normal1(x*2,y*2,z*2) *0.22
}
turbulence 0.05
color_map
{
[0 color rgbt <0,0,0,1>]
[0.999 color rgbt <0.5,0.5,0.5,0.5>]
[1 color rgbt <1,1,1,0.0>*1]
}
//scale 0.8
poly_wave 3
// scallop_wave
//scale 0.6
}
}
#declare gaxsurf1=object{
isosurface {
function {
f_sphere(x, y*4, z, 1)
} // funk
contained_by { box { -2, 2 } }
accuracy 0.001
// threshold 1
max_gradient 40
} // iso
}
- declare gax1=object{
// sphere {0,1 }
object {gaxsurf1
rotate x*90
}
pigment {rgbt 1}
hollow
interior
{
media { gaxmedia1 }
// turbulence 1
}
}
union {
object { gax1}
scale z/15
finish {
emission 1000
}
//rotate <10,20,30>
rotate <30,40,50>
rotate z*45
}
Licensing
- 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.