// Last edited on 2013-12-11 09:19:53 by stolfilocal
// Processed by remove-cam-lights

background{ color rgb < 0.75, 0.80, 0.85 > }

#declare tx_plastico =
  texture{
    pigment{ color rgb < 0.10, 0.80, 1.00 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_fosca =
  texture{
    pigment{ color rgb < 1.00, 0.80, 0.10 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_espelho =
  texture{
    pigment{ color rgb < 1.00, 0.85, 0.30 > }
    finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 }
  }

#declare tx_vidro =
  texture{
    pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 }
    finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 }
  }

#declare tx_xadrez =
  texture{
    pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > }
    finish{ diffuse 0.9 ambient 0.1 }
    scale 2.0
  }

#declare tx_verde =
  texture{
    pigment{ color rgb < 0, 1, 0 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_azul =
  texture{
    pigment{ color rgb < 0, 0.5, 1 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_vermelho =
  texture{
    pigment{ color rgb < 1, 0, 0 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_amarelo =
  texture{
    pigment{ color rgb < 1, 1, 0 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_rosa =
  texture{
    pigment{ color rgb < 1, 0.5, 1 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare ball=
        sphere{
                < 0, 0, 0 > 0.1
        }

#macro Interpola2(p0, p1, tt)
                        #local aux = ((1-tt)*p0 + tt*p1);
                        aux
#end

#macro Interpola4(p0, p1, p2, p3, tt)
                #local p01 = Interpola2(p0, p1, tt);
                #local p12 = Interpola2(p1, p2, tt);
                #local p23 = Interpola2(p2, p3, tt);
                #local p012 = Interpola2(p01, p12, tt);
                #local p123 = Interpola2(p12, p23, tt);
                #local p0123 = Interpola2(p012, p123, tt);
                p0123
#end

#macro curva(p0, p1, p2, p3, tt,raio)
        #while(tt <= 1)
        #local cord = Interpola4(p0,p1,p2,p3, tt);
        object { ball translate cord scale raio texture {tx_vermelho}}
        #local tt = tt + 0.001;
        #local raio = raio - 0.0005;
        #end
#end

#macro tentaculo()
#local p0 = <0,-4,0>;
#local p1 = <0,-3,2>;
#local p2 = <0,-2,-2>;
#local p3 = <0,-1,0>;

#local p4 = p3;
#local p5 = <0,0,2>;
#local p6 = <0,1,-2>;
#local p7 = <0,2,0>;

curva(p0, p1, p2, p3, 0, 1)
curva(p4, p5, p6, p7, 0, 0.5)
#end

union{ tentaculo() }
union{ tentaculo() rotate <0,0,90> }
union{ tentaculo() rotate <0,0,180> }
union{ tentaculo() rotate <0,0,270> }

#declare cabeca=
        sphere{
                < 0, 0, 0.8 > 1
        }

object { cabeca texture {tx_verde} }

#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 0.00 >;
#declare raio_cena = 6.0;
#declare dir_camera = < 14.00, 7.00, 4.00 >;
#declare dist_camera = 16.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)