Skip to content

Instantly share code, notes, and snippets.

@baptiste
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save baptiste/7c9ad92c2dea89a2da43 to your computer and use it in GitHub Desktop.

Select an option

Save baptiste/7c9ad92c2dea89a2da43 to your computer and use it in GitHub Desktop.
crystal.pov
global_settings { assumed_gamma 1.2 }
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#declare R = 3;
#declare Rs = 0.05;
#declare Rd = R - Rs;
#declare dist = 1.0;
//////
light_source {
z*10000
White
}
light_source {
y*-10
White
}
//
light_source {
<-10,-10,-10>
White
}
camera {location <3, 10 ,2>
right <0, 4/3, 0>
up <0,0.1,1>
look_at <0.0 , 0.0 , 0.0>}
light_source{<15,25,-25> color rgb 1*<1,1,1>
photons {reflection on refraction on}
}
light_source{<15,15,-25> color rgb 1*<1,1,1> }
light_source{<15,25,-25> color rgb 1*<1,1,1> }
global_settings {
//assumed_gamma 1
max_trace_level 25
photons {
spacing 0.05
autostop 0
jitter 0
max_trace_level 3
}
}
#declare T_05 = texture { pigment { color Clear } finish { F_Glass1 } }
plane { y, -R
texture { T_05 } interior { I_Glass1 fade_color Col_Blue_01 }
texture {
pigment{color White}
finish { ambient 0.3 diffuse 0.3 }
}
}
#declare Particle = sphere {
<0,0,0>, R
no_shadow
no_reflection
interior{ior 2.5}
texture { T_05 } interior { I_Glass4 fade_color Col_Blue_01 }
}
#declare redsphere = sphere {
<0,0,0>, Rs
no_shadow
no_reflection
interior{ior 1.5}
pigment{color Red}
texture { T_05 } interior { I_Glass4 fade_color Col_Red_01 }}
#declare bluesphere = sphere {
<0,0,0>, Rs
no_shadow
no_reflection
interior{ior 1.5}
pigment{color Blue}
texture { T_05 } interior { I_Glass4 fade_color Col_Blue_01 }}
object{ Particle rotate<0, 0, 0> translate <0, 0, 0> }
#declare Rnd_1 = seed (123);
#declare NrX = 0; // start
#declare EndNrX = 50; // end
#while (NrX < EndNrX+1)
object{ bluesphere rotate<0, 0, 0> translate <-Rd/2+Rd* rand( Rnd_1) , -Rd/2+Rd* rand( Rnd_1) , -Rd/2+Rd* rand( Rnd_1) > }
object{ redsphere rotate<0, 0, 0> translate <-Rd/2+Rd* rand( Rnd_1) , -Rd/2+Rd* rand( Rnd_1) , -Rd/2+Rd* rand( Rnd_1) > }
#declare NrX = NrX + 1; //next Nr
#end // ----------- end of loop ----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment