The construction in details:
The door is constructed in a similar way to the "Window".
It's made as a macro to let the door open angle be free to choose.
#macro Door (Door_Angle)
union{ // I
difference{
box{<-0.50,0.01,-0.02>,< 0.50,1.80,0.02>}
box{<-0.45,0.85,-0.03>,<-0.03,1.27,0.03>}
box{< 0.03,0.85,-0.03>,< 0.45,1.27,0.03>}
box{<-0.45,1.33,-0.03>,<-0.03,1.75,0.03>}
box{< 0.03,1.33,-0.03>,< 0.45,1.75,0.03>}
texture{Door_Texture_1}
} // ---end of difference
box{ <-0.49,0.81,0.0>,< 0.49,1.79,0.001>
texture{T_Glass3}} // no interior!!!
// door handle
union{ // II
sphere {<-0.15,0,-0.07>, 0.015 }
cylinder{<-0.15,0,-0.07>,<0,0,-0.10>,0.015}
sphere {< 0,0,-0.07>, 0.015}
cylinder{< 0,0,-0.07 >,<0,0,0>, 0.015}
cylinder{< 0,0,-0.035>,<0,0,0>, 0.04}
texture { Chrome_Metal
finish {ambient 0.1 diffuse 0.9}}
translate<0.43,0.75,0>
}// end of union II
// rotation of the door:
translate< 0.50,0,0>
rotate<0,-Door_Angle,0>
translate<-0.50,0,0>
} // ---end of union I
#end // ------------ end of Door(...) macro
#declare Door_Hole = //symmetric!!!
box{<-0.50,0.01,-0.50>,< 0.50,1.80,0.50>
texture{Wall_Texture_2}}
//--------- end of Door_Hole ---------------
|
A door with windows and handle.
|
|
To place the doors in their position
we have to define their positions. Then we can subtract
the door holes from the wall and add doors to their positions.
#declare Door_Positon_1 = <-1,0,0>;
#declare Door_Positon_1 = < 1,0,0>;
difference{
box { <-2,0,0>,< 2,2.3,0.2>
texture {Wall_Texture_1}}
object{ Door_Hole translate Door_Positon_a}
object{ Door_Hole translate Door_Positon_b}
} // end of difference --------------------
object{ Door(85) translate Door_Positon_1}
object{ Door(25) scale<-1,1,1>
translate Door_Positon_2}
//-----------------------------------------
|
This makes to following image
Click here for the complete scene description for POV-Ray:
".txt" file or
".pov" file
|