Vous êtes sur la page 1sur 6

// Date : 14/08/07

// Author : Juan Alvarez


// Title : Rhino

#version 3.5;

#include "colors.inc"
#include "textures.inc"
global_settings {
assumed_gamma 1.0
}
//-----------------------------------------
#declare color_rhino = color rgb <0.439,0.384,0.282>;
#declare tmp = color rgb <0.439-.1,0.384-.1,0.282-.1>;
#declare color_rhino = tmp;
#declare arena = color rgbt <0.831,0.78,0.559,.2>;
// ----------------------------------------
#declare cam_1 = camera {
location <-2.4, 5, 25>
direction 1.5*z
right x*image_width/image_height
look_at <-2.4, 1, 20>
//rotate <0,180,0>
//translate x*-2.3
}

#declare cam_2 = camera {


location <8, 6, -15.0>
direction 1*z
right x*image_width/image_height
look_at <0,0,3>
//rotate <0,0,0>
translate <-2.35,-1,3>
}

#declare cam_3 = camera {


location <-17,6,10>
direction 1*z
right x*image_width/image_height
look_at <0,3,10>
//rotate <80,180,0>
translate <0,0,0>
}
// ----------------------------------------
sky_sphere {

pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
//-----------------------------------------
fog {
distance 150
color arena
fog_type 2
fog_offset 0
fog_alt 2
}
// ----------------------------------------
light_source {
<0, 0, 0>
color rgb <1, 1, 1>
translate <10, 100, -20>
}
//-----------------------------------------
#declare camo = texture
{
pigment
{
image_map {jpeg "rhino.jpg" interpolate 2}
rotate <90,90,0>
scale 5
}
finish { ambient 0.03 diffuse 0.6 }
}
//-----------------------------------------
#declare rued = texture
{
pigment
{
image_map {jpeg "rueda.jpg" interpolate 2}
rotate <0,0,0>
scale 1.3

}
finish { ambient 0.05 }
}
//-----------------------------------------
#declare suelo = pow(1000,2);
#declare t_des = texture {
pigment {
crackle solid
color_map {
[ 0 color rgb <0.439-.1,0.384-.1,0.282-.1> ]
[ 1 color rgb <0.439-.0,0.384-.0,0.282-.0> ]
}
}
normal { granite 0.9 scale <1, 1, 1>*3
}
finish {
ambient color rgb <0.439-.1,0.384-.1,0.282-.1>
diffuse 0.8
specular 0.1
roughness 0.1
brilliance 1
}
scale <1, 1, 1>*0.4
}
//-----------------------------------------
#declare desierto = box {
//y, -1
<-suelo,-1.5,-suelo>,<suelo,-1,suelo>
//pigment { color rgb <0.7,0.5,0.3> }
texture {t_des}
}
//-------------------------------------
#declare objeto1=difference{
difference
{
sphere {<0,2,0>,1 }
box{<0,.5,-1>,<2,3,1>}
sphere {<0,2,0>,0.9 }
}
#declare hoyo=0;
#while (hoyo < 1)
sphere {<0,.8,0>,0.2 rotate x*(360*hoyo) translate <-.5,2,0>}
#declare hoyo=hoyo+1/6;
#end
texture {
pigment { color rgb <0.3,.3,.3>}
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection {
0.2
metallic
}
conserve_energy
}
}
}
// ----------------------------------------
#declare bomba = union{
cylinder {<0,0,-2>,<0,0,0>,.2}
sphere {<0,0,0>, 0.2}
sphere {<0,0,-2>, 0.2}
rotate <0,-10.5,-20>
translate <-4.3,3,5>
}
//-------------------------------------
#declare rueda = 0;
#while (rueda < 12)
cylinder
{
<0.0,0.0,0.0>, <1.3,0.0,0.0>, 1
//pigment { color rgb <0.1,0.1,0.1> }
texture {rued}
#if(rueda<6)
translate <0.0,0.0,rueda*2.1+1>
#else
translate <-6.0,0.0,(rueda-6)*2.1+1>
#end
}
#if(rueda<6)
object {objeto1 scale <.32,.6,.6> translate <-5.9,-1.2,1+rueda*2.1>}
#else
object {objeto1 scale <.32,.6,.6> translate <-1.2,-1.2,1+(rueda-6)*2.1> rotate
z*180}
#end
#if(rueda<6)
object {objeto1 scale <.22,.4,.4> translate <-6.14,-.8,1+rueda*2.1>}
#else
object {objeto1 scale <.22,.4,.4> translate <-1.44,-.8,1+(rueda-6)*2.1> rotate
z*180}
#end
#declare rueda = rueda + 1;
#end
//-------------------------------------
#declare luz_t = union{
cylinder { <0,0,0>, <0,0,-.05>, .2 translate <-5.7,1.5,13.05>}
cone { <0,0,0>,.1 <0,0,-.05>, .2
translate <-5.7,1.5,13.1>
texture {
pigment {color rgb <.8,0,0>}
finish
{
diffuse 0.1
ambient 0.1
specular 0.2
reflection { 0.2 metallic }
conserve_energy
}}
}}
//-------------------------------------
#declare objeto4 = union{
#declare pos=0;
#while(pos<.9)
box {<0,0,0>,<1,.01,.2> rotate x*25 translate <-4,0.81+pos,12.3>}
#declare pos = pos + .154;
#end
}
//-------------------------------------
#declare objeto3 = union
{
#declare b=0;
#while(b < 4*2.5)
cylinder { <0,0,0>, <0,2.3,0>,.17 translate <-6.7,-.2,2.5+b>}
#declare b=b+2.5;
#end
}
//-------------------------------------
#declare objeto2=difference{ //Cobertura Ruedas
union
{
difference
{
box {<0,0,-1>,<-2,2,13> translate <-4.7,0,0> }
box {<0,-15,-1.3-.3>,<-2.2,1+0.2,1-1.3-.3> translate <-4.69,1.5,-0.8> rotate
<45,.0,.0>}
}
cylinder { <-4.7,1,.15>, <-6.7,1,.15>, 1}
luz_t
}
box {<-.1,-15,0+.12>,<-4.7,3,2> translate <-3,-.3,-1.5> rotate <-45,.0,.0>}
box {<0,0,-1>,<-1.7,1.4,12.5> translate <-4.7,0,0>}
box {<0,0,0>,<2.5,1.5,1> rotate x*8 translate <-7,-.6,12.8>}
box {<0,0,0>,<1,1.5,1> translate <-7,1.3,12.8>}
objeto3
//pigment {color_rhino}
}
//-------------------------------------
//Base
#declare base = union{
difference{
box {<0,0,0>,<-4.7,2,13.3> translate <0,.0,-.6> }
box {<0,-15,0+.12>,<-5,3,1+.12> translate <0.1,.0,-0.6> rotate <-45,.0,.0>}
box {<0,-1-0.2,-1.3-.3>,<-5,1+0.2,1-1.3-.3> translate <0.1,1.5,-0.8> rotate
<45,.0,.0>}
box {<0,-1-0.5,-1.3-.3>,<-5,1+0.5,1-1.3-.3> translate <0.1,1.3,-1.2> rotate
<86,.0,.0>}
box {<0,0,0>,<1,1,1> translate <-4,0.7,11.8>}
box {<0,0,0>,<1,1,1> translate <-4+2.3,0.7,11.8>}
}
object{ objeto4}
object{ objeto4 translate x*2.3}
object{ objeto2}
object{ objeto2 scale -1*x translate -4.7*x}
difference
{
box {<0,0,0>,<-4.7,.3,8> translate <0,1.9,2> }
box {<0,0,-1>,<2,.6,9> translate <-1.2,1.8,2> rotate <0,10,0> }
box {<0,0,-1>,<3,.6,9> translate <-4.4,1.8,2> rotate <0,-24,0> }
}
cone
{
<0,-.2,0>,1.1, <0,.47,0>, .9
translate <-1.5,1.8,2>

}
texture {camo}
}
//-----------------------------------
#declare cannon=difference{
cylinder {<0,0,-.5>,<0,0,0>,.1 translate <-3.48,2.96,2.5>}
cylinder {<0,0,-.5>,<0,0,0>,.07 translate <-3.48,2.96,2.4>}
}
//-----------------------------------
#declare o_superior = union{
difference
{
box {<-4.7,0,0>,<-2.3,1.3,8.5> translate <0,2.2,2>}
box {<-4.2,-.3,0>,<-2,1.5,8> translate <-2,1.1,2> rotate <0,-10,-16>}
box {<-5.2,0,0>,<-2.2,1.3,8.5> translate <.5,3,2> rotate <-3.6,0,0>}
box {<-4.7,0,0>,<-2.3,1.3,1> rotate <10,10,0> translate <0,2.2,0.5>}
box {<-4.7,0,0>,<-2.3,1.3,1> translate <1.8,2.1,1.9>}
sphere { <-2.35,1.7,2>, 1}
}
difference{
box {<0,0,-.3>,<.5,.5,.3> translate <-3.6,2.6,2.4>}
box {<-4.7,0,0>,<-2.3,1.3,1> rotate <10,10,0> translate <0,2.2,0.44>}
}
object {cannon}
object {cannon translate .22*x}
object {cannon translate <0,-.22,0>}
object {cannon translate <.22,-.22,0>}
object {bomba}
object {bomba translate <-.25,-.2,-.12> rotate <3.1,0,0>}
cylinder { <1,1.5,.15>, <1,1,.15>, .1 translate <-5.5,1.9+.2,9.5>}
cone { <1,1.1,.15>,.09 <1,1,.15>, .1 translate <-5.5,2.4+.2,9.5>}
cylinder { <1,1.55,.15>, <1,5,.15>, .03 translate <-5.5,1.9+.2,9.5>}
}
//-----------------------------------
#declare superior = union{

object {o_superior translate x*-.05}


object {o_superior scale -1*x translate -4.65*x}

difference
{
box {<0,0,-.3>,<.8,.8,.7> translate <-2.75,2.6,2.4>}
box {<0,0,-.3>,<.8,.8,.1> rotate x*-70 translate <-2.75,2.6,2.4-.1 >}
}
difference
{
cone {<0,0,-7>,.16 <0,0,0>,.3 rotate x*5 translate <-2.35,3.05,2.2>}
cone {<0,0,-3>,.1 <0,0,0>,.16 rotate x*5 translate <-2.35,3.4,-1.8>}
}
cylinder { <1,1.5,.15>, <1,1,.15>, 1 translate <-3.9,2-.1,4>}
cone { <1,1.1,.15>,.9 <1,1,.15>, 1 translate <-3.9,2.5-.1,4>}
cylinder { <1,1.5,.15>, <1,1,.15>, .6 translate <-2.2,2-.1,4>}
cone { <1,1.2,.15>,.5 <1,1,.15>, .6 translate <-2.2,2.5-.1,4>}
texture {camo}
}
//-----------------------------------
object {superior}
object {base}
#declare huella = box
{
<0,-1+.1,0>,<1.4,-1-.3,300>
translate <0,0,1>
texture
{
pigment { image_map {jpeg "huella.jpg" interpolate 2 } rotate <90,0,0> scale
1.4}
}
}
difference
{
object {desierto}
object {huella}
object {huella translate -6*x}
}
camera {cam_2}