File:Spiral galaxy 7 r 1.png
Original file (1,600 × 1,200 pixels, file size: 850 KB, MIME type: image/png)
Captions
Summary
editDescriptionSpiral galaxy 7 r 1.png |
English: Rendering spiral galaxy with POV-Ray |
Date | |
Source | Own work |
Author | Merikanto |
POV-Ray 3.7
/////////////////////////////////////////
//
// spiral galaxy
//
// POV-Ray 3.7 source code
//
// 3.7.2023 0000.0003
//
- include "functions.inc"
camera {
location <0,0,-2>*1*0.9
look_at <0,0,0>
angle 35
}
- 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 f_normal1=function {
exp (-0.5*pow(((( sqrt(x*x+y*y) ))/0.5),2))
}
// logarithmic spiral 2
- declare logspiral2=function {
max( min( ( ((sin((4*log(sqrt( (x*x+y*y) ))*pi*2)+((atan2(x,y))/(pi*1))*2*pi)/2)+0.5) ) ,1),0)
}
// logarithmic spiral 1
- declare logspiral3=function {
// ((sin(logspiral0(x,y,z)*1*pi/2)/2)+0.5)
min ( max (
((( sin ( (2*log(sqrt( (x*x+y*y) ))*pi*2)+0.5*((atan2(x,y)/(1))/(pi/8)) *pi/2 ) ) +1)/2)
,0) ,1)
}
- declare spirals1= function
{
max ( min( (logspiral2(x,y,z) *f_normal1(x,y,z)) ,1) ,0)
}
- declare spiralnormal1 = function {
(f_normal1(x*1.5,y*1.5,z*1.5)*logspiral2(x,y,z)/2 )
}
#declare spiralnormalhole1 = function {
(f_normal1(x*1.5,y*1.5,z*1.5)*logspiral2(x,y,z)/2 ) *hole1(x*3,y*3,z*3)
}
- declare galax_trunc1= function {
spiralnormalhole1(x,y,z)/3
+pow(f_normal1(x*1.5,y*1.5,z*1.5)/2,2)/3
+max ( f_normal1(x*5,y*5,z*5)/3, spiralnormalhole1(x,y,z)/3 )
}
- declare norma1= function {
f_normal1(x,y,z)*0.01
+ f_normal1(x*3,y*3,z*3)*0.12
}
#declare galbi1=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
+ 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(x*30,y*30,z*30) *8
*f_wrinkles(x*100,y*100, z*100)*4
*f_wrinkles(x*300,y*300, z*300)*2
*f_wrinkles(x*1000,y*1000, z*1000)*1 )) /4
}
#declare cloud1=function {
// base spiral
// (f_normal1(x*1.5,y*1.5,z*1.5)*
(pow(logspiral2(x,y,z),10)/2 ) *hole1(x*3,y*3,z*3)
*pow ( f_wrinkles(x*30,y*30,z*30) ,1) *3
*pow (f_granite(x*3,y*3,z*3),5)
* 1
//(f_granite(x*30,y*30,z*30)/2
// +f_granite(x*300,y*300,z*300)/2 *f_granite(x*100,y*100,z*100))
}
#declare emi1=function {
// base spiral
pow ( (f_normal1(x*1.5,y*1.5,z*1.5)*pow(logspiral2(x,y,z),10)/2 ) *hole1(x*3,y*3,z*3) ,1/2)
*f_wrinkles(x*12,y*12,z*12) * pow( f_wrinkles(x*40,y*40,z*40) ,2)* f_granite(x,y,z)
}
#declare emi2=function {
// base spiral
pow ( (f_normal1(x*1.2,y*1.2,z*1.2)*pow(logspiral2(x,y,z),10)/2 ) *hole1(x*3,y*3,z*3) ,1/2)
*f_wrinkles(x*12,y*12,z*12) * pow( f_wrinkles(x*40,y*40,z*40) ,2)* f_granite(x,y,z)
}
- declare galbitex1= texture {
pigment {
function { galbi1(x,y,z) }
// turbulence 0.01
poly_wave 1
color_map {
[0 rgbt <1,1,1,1>]
[1 rgbt <1/8,1/8,1,0>*1]
}
}
finish {ambient 1}
}
- declare cloudtex1= texture {
pigment {
function { cloud1(x,y,z) }
// turbulence 0.01
poly_wave 1
color_map {
[0 rgbt <1,1,1,1>]
// [0.5 rgbt <1,0,0,0>*1]
[1 rgbt <0,0,0,0>*1]
}
}
finish {ambient 0.0 filter 10}
}
- declare emitex1= texture {
pigment {
function { emi2(x,y,z) }
turbulence 0.03
poly_wave 1.5
color_map {
[0 rgbt <1,1,1,1>]
// [0.1 rgbt <1/4,1/4,1/4,5/7>]
[1 rgbt <30,0,0,0>*1]
}
}
finish {ambient 3}
}
- declare nortex1= texture {
pigment {
function { norma1(x,y,z) }
poly_wave 1
color_map {
[0 rgbt <1,1,1,1>]
[1 rgbt <1,0,0,0>*1]
}
}
finish {ambient 8}
}
- declare gal1=object {
disc {0, <0,0,-1>, 1}
// test tex
// texture { pigment {rgb 1} finish { ambient 1}}
texture {galbitex1 scale 1/3}
//texture {emitex1 scale 1/3}
texture {emitex1 scale 1/3 rotate z*15}
texture {nortex1 scale 1/3}
texture {cloudtex1 scale 1/3 }
}
union {
object {gal1
//rotate <10,70,100>
rotate z*45
rotate x*30
}
}
Licensing
edit- 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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:05, 3 July 2023 | 1,600 × 1,200 (850 KB) | Merikanto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
PNG file comment |
|
---|---|
File change date and time | 14:00, 3 July 2023 |
Software used |