All pastes #400682 Raw Edit

meh

public text v1 · immutable
·published 2007-03-18 21:12 UTC
rendered paste body
#include "colors.inc"             
#include "stones2.inc"
#include "axis.inc"
#include "luzes.inc"

/************* CAMARA / LUZES *************/
camera {
	// Topo
	location  <600,600,300>
	
	// Ornamento (no centro, y=200)
	//location <0,200,800>
	//look_at <0,200,0>
	
	// Portas
	//location  <350,200,350>
	look_at <0,10,0>
	
	// Ornamentos
	//location <200,200,0> 
	//look_at <0,200,0>
	
	//location 
}



//light_source {
//	<150,200,150> 
//	White
//}

/*light_source {
	<0,1000,0> 
	White
}*/

// ex 3:
sky_sphere {
pigment {
gradient y
color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] }}
}

light_source {
  <100,0,0>         // posicao da luz
  color White       // cor da luz
  
  parallel          // keyword que indica que o tipo de luz e direccional
  point_at < 0.2, -0.8, -0.4>  // posicao para a qual aponta a luz
}

light_source {
        <0,150,0>
        White
        shadowless
}

global_settings

{

  ambient_light     rgb <0, 0, 0>

}
// fim do ex 3
// CAMARA/LUZES
/******************************************/

/***************** MACROS *****************/
declare torre=union  {
	box { <100,-10,-100> <-100,350,100> texture {T_Stone28 } }
	polygon { 4, <-100,350,100>,<0,450,0>,<100,350,100>,<-100,350,100> }
	polygon { 4, <100,350,-100>,<0,450,0>,<100,350,100>,<100,350,-100> }
	polygon { 4, <-100,350,-100>,<0,450,0>,<100,350,-100>,<-100,350,-100> }
	polygon { 4, <-100,350,100>,<0,450,0>,<-100,350,-100>,<-100,350,100> }
	pigment {color Blue }
}

declare bordo=box {	<450,-10,-50>
					<-450,-15,50>     
    				texture {T_Stone29} 
}

declare parede=box {<600,-10,-10>
					<-600,250,10>        
					texture {T_Stone29 }
}

declare telhado = mesh2 {
	vertex_vectors { 7
		<200,250,-600>, <200,250,600>
		<0,300,-600>, <0,300,0>, <0,300,600>
		<-200,250,-400>, <-200,250,400> }
	face_indices{ 6
		<0,1,3>, <0,2,3>,    
		<2,3,5>, <3,5,6>,
		<3,4,6>, <1,3,4> }
	pigment { color Red}
}

declare coluna = union  {
	box {	< 10, -8, 10>
			<-10,-10,-10> }
	  
	//cilindro principal
	cone { 	<0,185,0>, 9
			<0, -1,0>, 0 }
	  
	cylinder {	<0,163,0>
				<0,-1,0>
				8 }
				
	cone {	<0, -8,0>, 9
			<0,170,0>, 0 }
	
	//RENDILHADOS
	cylinder {	<0,10,0>
				<0,9,0>
				9 }
	
	cylinder {	<0,0,0>
				<0,-1,0>
				9 }
	
	cylinder {	<0,173,0>
				<0,163,0>
				9 }
	
	cylinder {	<0,173,0>
				<0,165,0>
				10 }
	
	cylinder {	<0,173,0>
				<0,167,0>
				11 }
	
	torus {	11,1
			translate 174*y	}
	
	box {	<10,185,10>
			<-10,200,-10> } 
     texture {T_Stone32}
}

declare parcoluna = union {
	object {coluna translate -10*z }
	object {coluna translate +10*z }
}

declare ala_coluna = union {
	object{coluna translate -400*z}
	object{parcoluna translate -300*z}
	object{parcoluna translate -200*z}
	object{parcoluna translate -100*z}
	object{parcoluna}
	object{parcoluna translate +100*z}
	object{parcoluna translate +200*z}
	object{parcoluna translate +300*z}
	object{coluna translate +400*z}
}

declare porta = union {
	box {
		<-95,-10,-12>
		< 95,100, 12>
	}
	cylinder {
		<0,100,-12>
		<0,100, 12>
		95
	}
	texture {T_Stone29 }
}

declare parede_com_porta = difference {
	object { parede }
	object { porta }
	//pigment { color White }
}

declare ornamento = union {
	// os topos tem altura entre 200 e 250
	// centro do cilindro principal a 200+5
	cylinder {
		<0,205,-11>
		<0,205, 11>
		12.5
		scale x*2
	}
	cylinder {
		<22.5,200,-11>
		<22.5,200, 11>
		2.5
	}
	cylinder {
		<-22.5,200,-11>
		<-22.5,200, 11>
		2.5
	}
	texture { T_Stone30 }
}

declare ala_ornamentos = union {
	object { ornamento translate -350*x }
	object { ornamento translate -250*x }
	object { ornamento translate -150*x }
	object { ornamento translate -50*x }
	object { ornamento translate 50*x }
	object { ornamento translate 150*x }
	object { ornamento translate 250*x }
	object { ornamento translate 350*x }
}

declare topos_coluna = difference {
	box {	
		<410,200,-10>
		<-410,250,10>
		texture { T_Stone30 }
	}
	object { ala_ornamentos }
}

declare fonte_esfera_interior = sphere {
	<0,105,0>
	100
}

declare fonte_caixa = box {
	<100,0,100>
	<-100,25,-100>
}

declare fonte_esfera_exterior =	sphere {
	<0,100,0>
	100
}

declare fonte = intersection {
	difference {
		object { fonte_esfera_exterior }
		object { fonte_esfera_interior }
	}
	object { fonte_caixa }
	texture { T_Stone30 }	
}

declare fonte_agua = intersection {
	object { fonte_esfera_interior }
	object { fonte_caixa translate -2*y }
	texture { pigment {SeaGreen filter 1.33} }
	//normal { bumps 1 scale 0.05 }
	interior {ior 1.33}
	         
}

declare cupula = difference {
   sphere { 
       <0, 0, 0>
       170
   }
   
   sphere {
		<0, 0, 0>
		165
		}
   
   cylinder {
       <0,-200,175>
       <0,200,175>
       70
   }
   
    cylinder {
       <0,-200,175>
       <0,200,175>
       70
	   rotate 90*y
   }
   
    cylinder {
	   <0,-200,175>
       <0,200,175>
       70
	   rotate -90*y
   }
   
    cylinder {
       <0,-200,175>
       <0,200,175>
       70
	   rotate 180*y
   }
   
   pigment {White transmit 1}
	finish { reflection { 0.1 0.8 }}
	interior {	ior 1.5
				fade_distance 5
				fade_power 1.5
				fade_color <0,0,0>
				}
	
		
   translate -2*y
}
// MACROS
/******************************************/

/********* DEFINICAO DE OBJECTOS **********/

/******* Chao *******/
plane {
	y,-30 
	pigment { 
		checker color LightSteelBlue color Goldenrod
		scale 10 }
}

box {< 600,-15, 600>
     <-600,-20,-600>     
	 texture {T_Stone26} 
}
/********************/

//testing
//object { parede }
//object { topos_coluna }
//object { ornamento }
//object { ala_ornamentos }
//object { ala_coluna rotate 90*y}
//object { parcoluna rotate 90*y}

object { Axis30 }
object {bordo}
object {bordo rotate -90*y}
object {bordo translate -400*z}
object {bordo translate 400*z}
object {bordo rotate -90*y translate -400*x}
object {bordo rotate -90*y translate 400*x}

object {parede_com_porta translate -610*z}
object {parede_com_porta translate 610*z}
object {parede_com_porta rotate -90*y translate -610*x}
object {parede_com_porta rotate -90*y translate 610*x}
object {parede translate -810*z}
object {parede translate 810*z}
object {parede rotate -90*y translate -810*x}
object {parede rotate -90*y translate 810*x}

object {topos_coluna translate -z*400}
object {topos_coluna translate z*400}
object {topos_coluna rotate -90*y translate -x*400}
object {topos_coluna rotate -90*y translate x*400}


object {telhado rotate 180*y translate -600*x}
object {telhado translate 600*x}
object {telhado rotate 90*y translate -600*z}
object {telhado rotate -90*y translate 600*z}

object {torre translate -700*z-700*x}
object {torre translate 700*z-700*x}
object {torre translate 700*z+700*x}
object {torre translate -700*z+700*x}

object{ala_coluna translate +400*x}
object{ala_coluna translate -400*x}
object{ala_coluna rotate 90*y translate +400*z}
object{ala_coluna rotate 90*y translate -400*z}

object { fonte }
object { fonte_agua }	
object {cupula}
// OBJECTOS
/******************************************/