#include "colors.inc"
#include "math.inc"

camera {
  location  <0,2,-15>
  look_at   3*<0,0,0> 
} 

/*
light_source {
	100*<0,0,-1>
	color White
	fade_power 0.4
}
*/

background{ color rgb < 0, 0.20, 0.29 > }
plane { y, -0.01  
        texture{
            waves
            texture_map {
                [ 0.0 pigment { color rgb <0.3,0.1,0.8> } ]
                [ 0.4 pigment { color rgb <0.3,0.8,0.5> } ]
                [ 0.6 pigment { color rgb <0.3,0.4,0.4> } ]
                [ 1.0 pigment { color rgb <0.3,0.6,0.7> } ]
            }
        }
}
#declare TEX_CIMO =
        texture{
            waves
            texture_map {
                [ 0.0 pigment { color rgb <0.7,0.1,0.8> } ]
                [ 0.4 pigment { color rgb <0.3,0.8,0.5> } ]
                [ 0.6 pigment { color rgb <0.9,0.9,0.4> } ]
                [ 1.0 pigment { color rgb <0.3,0.6,0.4> } ]
		}
	}
         

#declare TEX_COLUNA =
        texture{
	    finish{
	    	ambient 0.1 diffuse 0.1 reflection 0.25  specular 1 roughness 0.001
	    } 
	   pigment { color rgb <0.7,0.7,0.7>}
        }

#declare COR_CIMO = pigment { color rgb <0.4,0.9,0.4>}
#declare COR_SUPORTE = pigment { color rgb <0.96,0.6,0.3>}
#declare COR_REFLETOR = pigment { color rgb <0.6,0.6,0.3>}

#declare COLUNA = box{
		<-0.25,0,-0.25>,<0.25,3,0.25>
		texture { TEX_COLUNA }
//	        interior {ior 1.4}
	}

#declare CIMO = box{
	<0,-0.26,-0.26>,<8,0.26,0.26>
	texture { TEX_COLUNA }
//	interior {ior 1.2}
	}

#declare SUPORTE = 
	box{
		<0.2,-0.3,0.2>,<0.25,0.1,0.25>
		pigment { COR_SUPORTE }
	}

#declare L_LETTER = union{
	text{
		ttf "timrom.ttf" "L" 0.6, 0
	        texture{
        	    granite
	            texture_map {
        	        [ 0.1 pigment { color rgbt <0.89,0.6,0.5,0.26> } ]
                	[ 0.6 pigment { color rgbt <0.98,0.5,0.6,0.46> } ]
	                [ 0.8 pigment { color rgbt <0.98,0.4,0.5,0.56> } ]
        	        [ 0.6 pigment { color rgbt <0.89,0.5,0.4,0.36> } ]
	            }	
        	}
		interior {ior 1.6}
	}
	object { SUPORTE }
}
	

#declare I_LETTER = union{
	text{
		ttf "timrom.ttf" "I" 0.6, 0
	        texture{
        	    granite
	            texture_map {
        	        [ 0.1 pigment { color rgbt <0.99,0.6,0.5,0.36> } ]
                	[ 0.6 pigment { color rgbt <0.98,0.5,0.6,0.26> } ]
	                [ 0.8 pigment { color rgbt <0.98,0.4,0.5,0.56> } ]
        	        [ 0.6 pigment { color rgbt <0.99,0.5,0.4,0.46> } ]
	            }	
        	}
		interior {ior 1.6}
	}
	object { SUPORTE translate <-0.1,0,0> }
}

#declare V_LETTER = union{
	text{
		ttf "timrom.ttf" "V" 0.6, 0
	        texture{
        	    granite
	            texture_map {
        	        [ 0.1 pigment { color rgbt <0.89,0.6,0.5,0.56> } ]
                	[ 0.6 pigment { color rgbt <0.98,0.5,0.6,0.36> } ]
	                [ 0.8 pigment { color rgbt <0.98,0.4,0.5,0.26> } ]
        	        [ 0.6 pigment { color rgbt <0.89,0.5,0.4,0.46> } ]
	            }	
        	}
		interior {ior 1.6}
	}
	object { SUPORTE translate <0.12,0,0> }
}

#declare GLOBO_REFLETOR = sphere{
		<0,0,0>,0.4	
		pigment { COR_REFLETOR }
	}

#declare REFLETOR = union{
	difference{
		object { GLOBO_REFLETOR }
		intersection{
			object { GLOBO_REFLETOR }
			sphere{
				<0,0,0.4>,0.1
			}
		}
	}
}

#declare LUZ_REFLETOR = light_source {
		<0,0,0.4>
		color White
		fade_power 0.4
		looks_like { REFLETOR }
	}

union{
	object { COLUNA translate -3.8*x }
	object { COLUNA translate 3.8*x }
	object { CIMO translate <-4,3,0> }
	object { L_LETTER scale 1.9 translate <-3,3.8,0> }
	object { I_LETTER scale 1.9 translate <0,3.8,0> }
	object { V_LETTER scale 1.9 translate <2.7,3.8,0> }
	object { LUZ_REFLETOR rotate 20*z rotate -55*y translate <-5,0.3,-7> }
	object { LUZ_REFLETOR rotate 20*z rotate 55*y translate <5,0.3,-7> }
	object { LUZ_REFLETOR rotate -55*y translate <-5,0.1,-7> }
	object { LUZ_REFLETOR rotate 55*y translate <5,0.1,-7> }
}