|
![](/i/fill.gif) |
#version unofficial MegaPov 0.5;
global_settings {
assumed_gamma 2.2
radiosity {}
photons {
spacing .01
gather 60, 100
//media 6, 1.5
autostop 0
jitter 1
max_trace_level 4
media on
expand_thresholds 0.2, 30
//load_file "myfile.ph"
}
}
#default{texture{pigment{rgb .5}}}
#include "colors.inc"
//#include "textures.inc"
//#include "woods.inc"
//#include "metals.inc"
//#include "stones.inc"
//#include "glass.inc"
#macro create_spectrum(nelems,bright)
#local elem=1;
color_map{
#while(elem<=nelems)
/* h goes from 0 at red end to 1.0 at blue end */
#local h = (elem-1)/(nelems-1);
/* co-h goes from 1.0 at red end to 0.0 at blue end */
#local coh = 1.0 - h;
#local Huered = 0.9 - (h/0.5);
#local Hueblue = 1.0 - (coh/0.6);
#if (Huered < 0.0) #local Huered = 0.0; #end
#if (Hueblue < 0.0) #local Hueblue = 0.0; #end
#local Huered=1.0 - (1.0-Huered)*(1.0-Huered);
#local Hueblue=1.0 - (1.0-Hueblue)*(1.0-Hueblue);
#local Huegreen = 1.0 - Huered - Hueblue;
#if (h>0.85)
#local Huered = 4*(h-0.85); // was 4 - changed to 8
#end
#local ybulge = -4.0*(h-0.1)*(h-0.6);
#if (ybulge<0) #local ybulge=0; #end
#local Huered = Huered+ybulge;// * 0.5; // added * 0.5
#local Huegreen = Huegreen+ybulge;
[bright, color rgb<Huered,Huegreen,Hueblue>]
//#debug
concat("<",str(Huered,0,3),",",str(Huegreen,0,3),",",str(Hueblue,0,3),">\n")
#local elem=elem+1;
#end // while
}
#end // macro
//scene
camera {
location <-.5,1.8,-1.8>
look_at
<0,0,0>}
light_source {<-.05,1,1>
color rgb 1
create_spectrum (15,3)
spotlight
point_at <.05,0,0>
radius 20
falloff 22
photons {global refraction on reflection on}
fade_power 2
fade_distance .5}
light_source {<.05,1,1>
color rgb 1
create_spectrum (15,3)
spotlight
point_at <-.05,0,0>
radius 20
falloff 22
photons {global refraction on reflection on}
fade_power 2
fade_distance .5}
light_source {<0,1,1>
color rgb 1
create_spectrum (15,3)
spotlight
point_at <0,0,0>
radius 20
falloff 22
photons {global refraction on reflection on}
fade_power 1
fade_distance .5}
#declare RandColor = seed(tick_count)
#declare GlassColor = color rgbf
<1,1+.2*rand(RandColor),1+.2*rand(RandColor),.8>
#declare GlassFinish = finish {specular 1 roughness .005 ambient .2 diffuse
1 reflection .3
phong 1 phong_size 100}
#declare GlassInterior = interior {ior 1.2 dispersion 1.1 disp_nelems 20
fade_power 2 fade_distance 2}
box {<-2,-2,-2>,<2,0,2>
finish {diffuse .2 ambient .1}
photons {target 1 refraction on reflection on}
}
sphere {<0,.5,0>,.5
interior {GlassInterior}
texture {
pigment {GlassColor}
finish {GlassFinish}
}
photons {target .35 refraction on reflection on ignore_photons}
}
Post a reply to this message
|
![](/i/fill.gif) |