File:Spiral galaxy 3 r1.png
Original file (1,600 × 1,200 pixels, file size: 1.24 MB, MIME type: image/png)
Captions
Summary
editDescriptionSpiral galaxy 3 r1.png |
English: Renderinf of spiral galaxy, with POV-Ray functions. |
Date | |
Source | Own work |
Author | Merikanto |
POV-Ray 3.7 souyrce code
/////////////////////////////////////////
//
// spiral galaxy
//
// POV-Ray 3.7 source code
//
// 30.6.2023 0000.0003
//
- include "functions.inc"
camera {
location <0,1,-2>*0.5
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 0
- declare logspiral0=function {
(1*log(sqrt(x*x+y*y))*pi*2)+10*(atan2(x,y)/(pi/2))
// ( sin ( (1*log(sqrt(x*x+y*y))*pi*2)+1*(atan2(x,y)/(pi/2)) *pi/2 ) )
}
// logarithmic spiral 1
- declare logspiral1=function {
((sin(logspiral0(x,y,z)*2*pi)/2)+0.5)
}
// logarithmic spiral 2
- declare logspiral2=function {
max( min( ( ((sin((3*log(sqrt( (x*x+y*y) ))*pi*3)+((atan2(x,y))/(pi*2))*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 ( (4*log(sqrt( (x*x+y*y) ))*pi*2)+0.5*((atan2(x,y)/(1))/(pi/8)) *pi/2 ) ) +1)/2)
,0) ,1)
}
// logarithmic spiral 1
- declare logspiral4=function {
// ((sin(logspiral0(x,y,z)*1*pi/2)/2)+0.5)
min ( max (
((( sin ( (4*log(sqrt( (x*x+y*y) ))*pi*2)+0.5*((atan2(x,y))/(pi/16)) *pi/2 ) ) +1)/2)
,0) ,1)
}
// logarithmic spiral 1
- declare logspiral5=function {
// ((sin(logspiral0(x,y,z)*1*pi/2)/2)+0.5)
min ( max (
((( sin ( (5*log(sqrt( (x*x+y*y) ))*pi*2)+0.5*((atan2(x,y))/(pi/16)) *pi/2 ) ) +1)/2)
,0) ,1)
}
- declare spirals1= function
{
max ( min( (logspiral4(x,y,z) *f_normal1(x,y,z)) ,1) ,0)
}
#declare spirals2= function
{
max ( min( (logspiral3(x,y,z) *f_normal1(x,y,z)) ,1) ,0)
}
- declare spiralnormal1 = function {
(f_normal1(x*1.5,y*1.5,z*1.5)*logspiral4(x,y,z)/2 )
}
#declare spiralnormalhole1 = function {
(f_normal1(x*1.5,y*1.5,z*1.5)*logspiral4(x,y,z)/2 ) *hole1(x*3,y*3,z*3)
}
#declare spiralnormalhole2 = function {
(f_normal1(y*1.5,x*1.5,z*1.5)*logspiral5(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 galax_trunc2= function {
spiralnormalhole2(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 galax1=function {
(
//2*galax_trunc2(x,y,z)* f_granite ( galax_trunc2(x,y,z),1-f_granite(x*3,y*3,z*3),f_wrinkles(x*30,y*30,z*30))/2
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*10,y*10,z*10)/2+f_wrinkles(x*100,y*100,z*100)/2)*1
*f_granite(x*10,y*10, z*10)
*f_granite(x*100,y*100, z*100)*3
+f_normal1(x*3,y*3,z*3)*0.6
//+ (exp(f_normal1(x/0.5,y/0.5,z/0.5))-0.01)*0.02
+ f_normal1(x,y,z)*0.02
}
#declare pigu1= function {
galax1(x,y,z)
}
- declare galtex1= texture {
pigment {
function { pigu1(x,y,z)*1 }
color_map {
[0 rgbt <1,1,1,1>]
[1 rgbt <1/2,1/2,1,0>*4]
}
}
finish {ambient 1}
// normal { function { pigu1(x,y,z) }}
}
- declare gal1=object {
plane {z,0}
texture {galtex1 scale 1/2}
}
union {
object {gal1}
}
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 | 06:02, 30 June 2023 | 1,600 × 1,200 (1.24 MB) | Merikanto (talk | contribs) | Update | |
15:21, 29 June 2023 | 1,600 × 1,200 (1.21 MB) | 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 | 06:02, 30 June 2023 |
Software used |