global_settings	{
	assumed_gamma  1.0
	ambient_light rgb <0.47, 0.47, 0.47>
	max_trace_level 15
	}

#include  "colors.inc"
#include  "metals.inc"
#include  "textures.inc"
#include  "stones.inc"
#include  "woods.inc"

#declare Rng1 = seed(1789);
#declare foo  = rand(Rng1);
#declare Rng2 = seed(now*24*60*60);
#declare bar  = rand(Rng2);

#declare  NormClock = clock / 360.0;

/* ------------------------------------------------------------ */
/*
 *	Some constants...
 */

#declare SzSol      = 34;
#declare H_sol      = 0.000;	// c'est quoi exactement ?

#declare SzBase     = 2.90;
#declare H_base     = 0.23;

#declare R_basecone = 0.117;
#declare H_cone     = 0.97;

#declare R_gyro     = 0.09;
#declare H_gyro     = 2.10;
#declare H_gylampe  = 0.25;

#declare H_QuadriLight = 34;
#declare E_QuadriLight = SzSol * 1.35;

/* ------------------------------------------------------------ */
/*
 *	Some textures...
 */

#declare WIP_color = texture
{
pigment { color Cyan*0.60 }
finish  { phong 0.01 }
}

#declare T_WIP_alert = texture
{
pigment { color Red }
finish { ambient 1 specular 0.90 }
}

#declare T_Planete_A = texture
{
pigment { color rgb <0.20, 0.30, 0.10>  }
normal { dents 0.38 scale 0.5}
finish { phong 0.80 reflection 0.05 }
}
#declare T_Planete_B = texture
{
pigment { rgb <0.40, 0.50, 0.70> }
finish { metallic 0.50 reflection 0.55 }
}

/*
 *	deux textures pour faire des batiments
 */
#declare T_Beton_1 = texture
{
pigment { color <0.9, 0.8, 0.7> }
normal { dents 0.75 scale 0.3 }
finish { roughness 1.00 }
}

#declare T_Beton_2 = texture
{
pigment { color <0.7, 0.6, 0.5> }
normal { dents 0.25 scale 2 }
finish { roughness 1.00 }
}


#declare Flashy = texture {
pigment {
	onion
	colour_map {
		[0.00,  Red	]
		[0.40,  Gray50	]
		[1.00,  Blue	]
		}
	turbulence 3.14159
	scale	0.50
	}
finish {
	emission 0 ambient 1 diffuse 0 specular 0
	}
}

/* ------------------------------------------------------------ */
/*
 *	Usefull macros
 */
#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

/* Interpolate */
#macro Interpolate(A, B, pos)
  #local resultat = ( (B-A) * pos) +A;
  resultat
#end

/* ------------------------------------------------------------ */