|
![](/i/fill.gif) |
"Chocolate Cake" <nomail@nomail> wrote:
> That's a great looking sky. Would you mind posting a small povray code example
> demonstrating how to achieve this effect? I am povray newbie :-I
The following code demonstrates the media effects for a single star. (The star
looks different from the stars in the original posts because I used a simpler
function here.) Have fun!
/* star_media_demo.pov
*
* Copyright 2012 Richard Callwood III. All rights reserved.
* Fair use or similar concept may apply in your country.
*
* 20-jan-2012 Created.
*/
#version 3.6;
global_settings
{ assumed_gamma 1
max_trace_level 10
}
camera
{ orthographic
right 320 * x
up 240 * y
}
#declare C_STAR = rgb <1.000, 0.477, 0.154>; //3000K
#declare fn_Disc = function (x) { 1 / (1 + pow (x, 3)) }
#declare fn_Spike = function (x) { 1 / (1 + pow (x, 2)) }
#declare Disc = cylinder
{ 0, z, 50
hollow
pigment { rgbt 1 }
interior
{ media
{ emission C_STAR * 10
density { function { fn_Disc (sqrt (x*x + y*y)) } }
}
}
}
#declare Diffraction_spike = box
{ <-100, -0.5, 0>, <100, 0.5, 1>
hollow
pigment { rgbt 1 }
interior
{ media
{ emission C_STAR * 2
density { function { fn_Spike (abs(x)) } }
}
}
}
object { Disc translate <0, 0, 1> }
object { Diffraction_spike rotate 45*z translate <0, 0, 2.1> }
object { Diffraction_spike rotate -45*z translate <0, 0, 3.2> }
Post a reply to this message
Attachments:
Download 'star_media_demo.png' (6 KB)
Preview of image 'star_media_demo.png'
![star_media_demo.png](/povray.binaries.images/attachment/%3Cweb.4f1a1e89a6a67a4085de7b680%40news.povray.org%3E/star_media_demo.png?preview=1)
|
![](/i/fill.gif) |