/////////////////////////////////////////////////////////////////////////////
// Include Files
#include "colors.inc"
#include "metals.inc"
#include "finish.inc"
#include "woods.inc"
#include "shapes.inc"
#include "skies.inc"
#include "macros.inc"
#include "glass.inc"
#include "functions.inc"
/////////////////////////////////////////////////////////////////////////////
// Declared pigments, finishes, etc.
#declare sky_vect = z;
#declare clk=clock*clock;
#declare clk=1.0;
#declare lookat = <0, 0, 0>;
#declare cam_loc = lookat+(<.5, -1, .3>*600);
//#declare cam_loc = lookat+vrotate(<-(1+(clk*2)), 0, clk*.5>*200, <0, 0, clk*150>);
#declare cam_zoom = 2.5;
#declare light_loc = <1, 0, .3>*500000;
//#declare lookat = <75, -25, 0>;
#local Lights = 1;
#if(0)
#declare flare_scale_factor = 1;
#declare flare_amount = 1;
#declare spot_fade_amount = .01;
#declare flare_brightness = 1;
#declare flare_type = "35mm" // <- Change this value!
#declare flare_auto_rotate = 1;
#include "lnsflare.inc"
#end
#declare image_scale = sqrt(image_width*image_height);
global_settings
{
max_trace_level 256
#if(0)
photons
{
count 20000
autostop 0
jitter .4
media 100
}
#end
#if(0)
radiosity
{
brightness 1
count 160
error_bound .2
distance_maximum 5
minimum_reuse .1
nearest_count 6
recursion_limit 2
}
#end
#if(0)
motion_blur 5, .25
#end
}
background { Black }
#default
{
pigment { Gray75 }
finish
{
ambient .25
diffuse .75
reflection 0
phong 0
phong_size 30
brilliance .5
}
}
/////////////////////////////////////////////////////////////////////////////
// Sky
#if(0)
sky_sphere
{
S_Cloud1
rotate <90, 0, 0>
}
#end
#if(0)
#local fRightAscension=240;
#local fDeclination=0;
#local LimMag = 6;
#macro Star(nRAh, nRAm, nRAs, nDecH, nDecd, nDecm, nDecm, fMag)
#if(nDecH>0)
Star2(vPos(RA(nRAh, nRAm, nRAs), Dec(nDecd, nDecm, nDecm)), fMag)
#else
Star2(vPos(RA(nRAh, nRAm, nRAs), Dec(-nDecd, nDecm, nDecm)), fMag)
#end
#end
#macro Star2(vPosition, fMag)
#if (fMag < LimMag)
#local vP = vrotate(vPosition, <0, -fDeclination, -fRightAscension>);
#local col = ((LimMag+1)-fMag)/(LimMag+1);
sphere
{
vP * 750000 * .75
250000 / (sqrt(cam_zoom)*image_scale)
pigment{colour rgb
*.25}
finish{ambient 1 diffuse 0}
}
#end
#end
#include "BSC.inc"
#local R1=seed(1);
#local vPosition=<0, 0, 0>;
#local nStar=0;
#while(nStar<1000)
#local vPosition=;
#local vPosition=vnormalize(vPosition);
Star2(vPosition, 7)
#local nStar=nStar+1;
#end
// #include "milkyway.inc"
#end
/////////////////////////////////////////////////////////////////////////////
// Lights
#if(1)
light_source
{
light_loc
colour rgb<1, 1, 1>
#if(0)
area_light <0, 100000, 0>, <0, 0, 100000>, 5, 5
adaptive 1
jitter
#end
}
#end
#if(0)
#declare px = -10000;
#while (px <= 10000)
#declare py = -10000;
#while (py <= 10000)
#declare pz = -10000;
#while (pz <= 10000)
light_source
{
color .1
}
#declare pz = pz + 20000;
#end
#declare py = py + 20000;
#end
#declare px = px + 20000;
#end
#end
/////////////////////////////////////////////////////////////////////////////
// Camera
#if(1)
camera
{
location cam_loc
direction
up sky_vect
right <0, -(image_width/image_height), 0>
sky sky_vect
look_at lookat
}
#else
camera
{
spherical_camera
h_angle 180
v_angle 90
location cam_loc
direction
up sky_vect
right <0, -(image_width/image_height), 0>
sky sky_vect
look_at lookat
}
#end
#declare R1 = seed(clock);
#declare R2 = seed(45742);
/////////////////////////////////////////////////////////////////////////////
// Values
#declare mm = 0.0010;
#declare cm = 0.0100;
#declare m = 1.0000;
#declare ft = 0.3048;
#declare in = 0.0254;
/////////////////////////////////////////////////////////////////////////////
// Objects
#local InnerEdge=74.510;
#local OuterEdge=140.390;
#local fRingGradient=
function
{
(sqrt((x*x)+(y*y)+(z*z))-InnerEdge)/(OuterEdge-InnerEdge)
}
#local fRingColour=
function
{
pigment
{
image_map
{
png "bjj\sat_ring_color.png"
interpolate 4
}
}
}
#local fRingTrans=
function
{
pigment
{
image_map
{
png "bjj\sat_ring_trans.png"
interpolate 4
}
}
}
#local fRingScatter=
function
{
pigment
{
image_map
{
png "bjj\sat_ring_backscattered.png"
interpolate 4
}
}
}
#local fRingColourRed=
function
{
fRingColour(fRingGradient(x, y, 0), 0, 0).red
}
#local fRingColourGreen=
function
{
fRingColour(fRingGradient(x, y, 0), 0, 0).green
}
#local fRingColourBlue=
function
{
fRingColour(fRingGradient(x, y, 0), 0, 0).blue
}
#if(1)
#declare pRingColour=
pigment
{
average
pigment_map
{
[1 function { fRingColourRed(x,y,z) } color_map{[0 rgb 0][1 red 3]}]
[1 function { fRingColourGreen(x,y,z) } color_map{ [0 rgb 0][1 green 3]}]
[1 function { fRingColourBlue(x,y,z) } color_map{ [0 rgb 0][1 blue 3]}]
}
}
#else
#declare pRingColour=
function
{
pigment{colour fRingColour(fRingGradient(x, y, 0), 0, 0)}
}
#end
#declare pRingColourA=
pigment
{
function
{
fRingScatter(fRingGradient(x, y, 0),fRingGradient(x, y, 0), 0).red// *.75
}
pigment_map
{
[0 Black]
[1 pRingColour]
}
}
#declare pRingColourAT=
pigment
{
function
{
fRingTrans(fRingGradient(x, y, 0),fRingGradient(x, y, 0), 0).red
}
pigment_map
{
[0.0 pRingColourA]
[0.9 color rgbt 1]
}
}
#local pSaturn=
pigment
{
image_map
{
gif "Saturn.gif"
map_type 1
}
rotate <90, 0, 90>
scale <-1, 1, 1>
}
union
{
disc
{
0, z, OuterEdge, InnerEdge
pigment{pRingColourAT}
finish
{
ambient .0001
diffuse .3
phong 0
}
}
/* disc
{
0, z, OuterEdge, InnerEdge+20
pigment{rgbft<0, 0, 1, 1.5, 1>}
finish
{
ambient 0
diffuse 0
phong 0
}
translate<0, 0, 0.01>
}*/
#local n=0;
#while(n<=1)
sphere
{
0, 1
scale <60.260-(n*3), 60.260-(n*3), 54.360-(n*3)>
pigment
{
image_map
{
gif "Saturn.gif"
map_type 1
transmit all 1-n
}
rotate <90, 0, 90>
scale <-1, 1, 1>
}
finish
{
ambient 0.0001
diffuse .8
phong 0
brilliance 2
}
}
#local n=n+.1;
#end
/* sphere
{
0, 1
scale <61, 61, 55>
hollow
pigment{rgbt 1}
finish{ambient 0 diffuse 0 phong 0}
interior
{
media
{
scattering
{
4, .01
}
}
}
}*/
rotate<2, 0, 0>
}
union
{
sphere
{
0, 500
pigment
{
bozo
colour_map
{
[0.0 rgb<1, 1, .75>]
[1.0 rgb<.9, .9, .65>]
}
scale 100
}
finish{ambient 1}
no_shadow
}
sphere
{
0, 2000
pigment{rgbt 1}
finish{ambient 0 diffuse 0}
hollow
interior
{
media
{
emission .0002
density
{
spherical
colour_map
{
[0.0 rgb<0, 0, 0>]
[1.0 rgb<1, 1, .25>]
}
scale 1500
turbulence .5
}
}
}
no_shadow
}
translate light_loc
}