diff --git a/contexte.inc b/contexte.inc index 61e2ff4..cd7f899 100644 --- a/contexte.inc +++ b/contexte.inc @@ -3,20 +3,6 @@ */ -#declare Rng2 = seed(now*24*60*60); -#declare foo = rand(Rng2); - -#declare NormClock = clock / 360.0; - -/* ------------------------------------------------------------ */ - -#macro Cos_01( X ) - (0.5-0.5*cos( 3.141592654 * X)) -#end -#macro Cos_010( X ) - (0.5-0.5*cos( 2 * 3.141592654 * X)) -#end - /* ------------------------------------------------------------ */ #declare Rhxba = 0.30; @@ -36,20 +22,26 @@ merge { } } -object { HexaBalls - texture { Lightning1 scale 0.33 } - rotate - translate <3, 0.72, 5> - } +#declare Les_Bibelots = object +{ +union { + object { HexaBalls + texture { Lightning1 scale 0.33 } + rotate + translate <3, -1+1.11*Cos_010(NormClock), 5> + } -object { HexaBalls - texture { Lightning2 scale 0.33 } - rotate <-clock, clock*0.62, clock> - translate <5, 0.92, -4> + object { HexaBalls + texture { Lightning2 scale 0.56 } + // rotate <-clock, clock*0.62, clock> + translate <5, -1+0.92*Cos_010(NormClock), -4> + } } - +} /* ------------------------------------------------------------ */ +#declare Le_Sol = object +{ height_field { png "datas/hf.png" smooth @@ -61,7 +53,7 @@ height_field { finish { phong 0.125 } } } - +} #declare Repere = object { @@ -71,41 +63,71 @@ union { } } -#if (1) -light_source { - <0.3, 2.50, 2.8> color Gray90 - spotlight - radius 14 - falloff 10 - tightness 10 - point_at <0, 0.95, 0.22222222> - } -#end - -#if ( (clock>166) & (clock<213) ) -light_source { - <2, 0.30, -2> color Yellow - spotlight - radius 12 - falloff 20 - tightness 10 - point_at <-0.08, 0.80, 0.17> - } -#end - -#if (1) -light_source { - <-5, 5.60, 8> - #if ( (clock > 290) & (clock<344) ) - #local Couleur = rgb <0.20, 0.20, 0.90>; - #else - #local Couleur = rgb <0.80, 0.80, 0.70>; +#declare Les_Lumieres = object +{ +union { + #if (1) + light_source { + <0.3, 2.50, 2.8> color Gray90 + spotlight + radius 14 falloff 10 tightness 10 + point_at <0, 0.95, 0.22222222> + } #end - color Couleur - spotlight - radius 9 - falloff 10 - tightness 5 + + #if ( (clock>166) & (clock<213) ) + light_source { + <2, 0.30, -2> color Yellow + spotlight + radius 12 falloff 20 tightness 10 + point_at <-0.08, 0.80, 0.17> + } + #end + + #if (1) + light_source { + <-5, 5.60, 8> + #if ( (clock > 290) & (clock<344) ) + #local Couleur = rgb <0.20, 0.20, 0.90>; + #else + #local Couleur = rgb <0.80, 0.80, 0.70>; + #end + color Couleur + spotlight + radius 9 falloff 10 tightness 5 point_at <0, 0.95, -0.22> + } + #end } -#end +} + +// #declare Le_Ciel = object +// { +sky_sphere { + pigment { + gradient y + color_map { + [ 0.5 color Orange*0.7 ] + [ 1.0 color Yellow*0.5 ] + } + turbulence 2.87 + Cos_010(NormClock) + scale 0.207 + translate -1 + } + emission rgb <0.1, 0.1, 0.1> + } +// } + +/* ------------------------------------------------------------ */ +/* + * Et on rassemble tous les éléments... + */ +#declare Le_Decor = object +{ +union { + object { Le_Sol } + object { Les_Bibelots } + object { Les_Lumieres } + } +} +/* ------------------------------------------------------------ */