POV-Ray : Newsgroups : povray.general : union of door and handle pushes item off z axis : Re: union of door and handle pushes item off z axis Server Time
30 Jul 2024 06:28:58 EDT (-0400)
  Re: union of door and handle pushes item off z axis  
From: optima
Date: 25 Aug 2009 04:55:00
Message: <web.4a93a598b4a77fd0e1fab65c0@news.povray.org>
I got it with the code shown below, thank you. I hope this is the best way to
assemble a cabinet in povray code. I extracted the solution from povray's
woodbox sample. Alain's help was encouraging also.

#declare door = object{ model_101_ scale <0.01,0.01,0.8> scale
<49.4999961853027,75,1> translate <25,-1,61> pigment {image_map {jpeg
"A333_bergama.jpg"} scale 1} finish {phong 1 ambient 0.6 reflection 0.08}
  translate -<0,47.5,60> rotate y*-0 translate <0,47.5,60>
 }


#declare handle = object {k_model_1_ pigment {image_map {jpeg "A316_wenge.jpg"}
scale 1}
scale <0.1,0.1,0.1> rotate z*0
translate <3,62,64>finish {phong 1 ambient 0.3 reflection 0.3}//a2
}


#declare cabinetcase = union{
object{ BOX scale <50,2,60> translate <25,0,0> pigment {color rgb <1,1,1>}}
object{ BOX scale <2,73,58> translate <49,37.5,2> pigment {color rgb <1,1,1>}}
object{ BOX scale <2,73,58> translate <1,37.5,2> pigment {color rgb <1,1,1>}}
object{ BOX scale <50,73,2> translate <25,37.5,0> pigment {color rgb <1,1,1>}}

}//close union

 //FINALLY PUT EVERYTHING TOGETHER
union {
object { cabinetcase  }
object { door  }
object { handle  }

 translate x*62   rotate -y*35
     }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.