// Sun. // All bodies are defined separately, location <0, 0, 0>, radius 1 #ifndef (SunScale) #local SunScale = 1; #end #include "functions.inc" #local SunAmbient = 1; #local SunDiffuse = 1; #local SunLight = finish {ambient SunAmbient diffuse SunDiffuse} #local SurfaceGranularity = 0.2; #local SunSpot = texture { pigment { bozo color_map { [0, rgb<0.7, 0.0, 0.0>] [1, rgb<1.0, 1.0, 0.0>] } scale SurfaceGranularity } finish { SunLight } } #local SunSurface1 = texture { pigment { bozo colour_map { [0, rgb<1.0, 0.5, 0.2>] [0.25, rgb<1.0, 0.5, 0.2>] [0.5, rgb<1.0, 0.8, 0.2>] [1.0, rgb<1.0, 0.5, 0.2>] } scale SurfaceGranularity } finish { SunLight } } #local SunSurface2 = texture { pigment { bozo colour_map { [0, rgb<1.0, 0.5, 0.1>] [0.25, rgb<1.0, 0.5, 0.2>] [0.5, rgb<1.0, 0.8, 0.1>] [1.0, rgb<1.0, 0.5, 0.2>] } scale SurfaceGranularity*0.7 } finish { SunLight } } #local Eruption = texture { pigment { bozo color_map { [0, rgbt<1.0, 1.0, 1.0, 1.0>] [0.5, rgbt<1.0, 1.0, 1.0, 1.0>] [0.5, rgb<1.0, 1.0, 1.0>] [1, rgb<1.0, 1.0, 1.0>] } scale SurfaceGranularity } finish { ambient SunAmbient * 2 diffuse SunDiffuse } } #declare Sun = union { object { isosurface { function { f_sphere(x, y, z, 1) - f_noise3d(x*20, y*20, z*20)/20 } contained_by { box {-1.2, 1.2} } max_gradient 2.164 } hollow texture { bozo texture_map { [0, SunSpot] [0.15, SunSpot] [0.3, SunSurface1] [0.5, SunSurface2] [0.7, SunSurface1] [0.9, Eruption] [1, Eruption] } scale 0.25 } } object { isosurface { function { f_sphere(x, y, z, 0.8) - f_noise3d(x*10, y*10, z*10)/1.7 } contained_by { sphere {<0, 0, 0>, 1.5} } max_gradient 7.465 } hollow texture { pigment { rgbt<1, 1, 1, 1> } finish { ambient 0 diffuse 0 } } interior { media { intervals 1 samples 1, 1 emission <5, 5, 4> / SunScale density { spherical scale 1.5 } } } } // prominance or CME object { julia_fractal { <0.9, 0.5, 0.45, 0.43> quaternion cube max_iteration 7 precision 400 scale <0.9, 0.7, 0.9> translate <0, 0.9, 0> rotate -30*z } hollow texture { pigment { rgbt<1.2, 1.15, 1, 1> } finish { ambient 0 diffuse 0 } } interior { media { intervals 1 samples 1, 1 emission <8, 8, 6> / SunScale } } } // and another object { julia_fractal { <0.85, 0.55, 0.5, 0.48> quaternion cube max_iteration 7 precision 400 scale <0.6, 0.4, 0.6> rotate 80*y translate <0, 1, 0> rotate 130*z } hollow texture { pigment { rgbt<1.25, 1.2, 1, 1> } finish { ambient 0 diffuse 0 } } interior { media { intervals 1 samples 1, 1 emission <8, 8, 6> / SunScale } } } }