/*
 *	H E X A C O N E   -   O R B I T E
 */

#version 3.7;

#include  "globals.inc"

#include  "contexte.inc"
#include  "hexacone.inc"
#include  "hexabenz.inc"

// =======================================================
#declare R_planete = 1.45;

#declare Croute = object
{
#local R1 = R_planete * 1.05;
#local R2 = R_planete * 1.03;
#local HC = R_planete * 0.12;
#local BN = R_planete * 3;

difference {
	sphere { 0, R1 }
	sphere { 0, R2 }
	box { <-HC, -BN, -BN>, <HC, BN, BN> }
	box { <-BN, -HC, -BN>, <BN, HC, BN> }
	box { <-BN, -BN, -HC>, <BN, BN, HC> }
	}
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 Boule = object
{
sphere { 0, R_planete }
texture {
	pigment { rgb <0.40, 0.50, 0.70> }
	finish { metallic 0.50 reflection 0.55 }
	}
}

#declare Planete = object
{
union	{
	object { Croute }
	object { Boule }
	}
}
// =======================================================

#local RO = 4.15;
#local CK = NormClock * 13.37;

#declare PosX = RO * sin(CK);
#declare PosY = 0;
#declare PosZ = RO * cos(CK);
object { HexaBenz ()
	rotate -y*CK*42.3 translate <PosX, PosY, PosZ>
	}
#declare PosX = RO * sin(CK+2.12);
#declare PosY = 0;
#declare PosZ = RO * cos(CK+2.23);
object { HexaCone ()
	rotate  y*CK*49.22 translate <PosX, PosY, PosZ>
	}

object { Planete rotate (-clock*0.21)*y }
light_source { <19, 6,  15>, rgb <0.77, 0.79, 0.80> }

camera	{
	location	<3, -1.0+(2*NormClock), 10.59>
	look_at		<0.0, 0.0, 0>
	focal_point	<0.0, 0.0, 0>
	aperture	0.046
	blur_samples	30
	angle		62
	}