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:27:34 EDT (-0400)
  Re: union of door and handle pushes item off z axis  
From: optima
Date: 26 Aug 2009 04:00:01
Message: <web.4a94ea56b4a77fd0e1fab65c0@news.povray.org>
Alain, thank for your explanatory answer, a few points remain

1 - With the code below I cant open the door, where to place the opening code?

#declare door = object{ model_101_ scale <0.01,0.01,0.8> scale
<49.4999961853027,75,1> translate <25,0,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>

}



//> This must be located relative to the door at it's starting location.
#declare handle = object {k_model_1_ pigment {image_map {jpeg "A316_wenge.jpg"}
scale 1}//a1
scale <0.1,0.1,0.1> rotate z*0
translate <47,62,64>finish {phong 1 ambient 0.3 reflection 0.3}}//a2
//translate -<0,47.5,60> rotate y*-0 translate <0,47.5,60>}//b2



//New union:
 union{
  object { cabinetcase  }
  union{ // for the door itself
   object { door  }
   object { handle  }
     rotate y*45 //Door_Opening
 // This will rotate ONLY the door and it's decorations
   translate -<0,0,0>//Door and Handle Location
 // To place the door at it's final location
   }
  rotate y*0//Cabinet_Rotation
 // To align the cabinet to a wall or some thing
  translate <-0,0,0>   rotate <0,0,0>//Cabinet_Location
 // Final placement of the whole cabinet
  }

2 - You say,
  Make sure that one edge, preferably the hinge axis, of the door lies ON
the Y axis. How, I don't get it? I guess because of that the above union don't
work.



3 -You say
  translate <-0,0,0>   rotate <0,0,0>//Cabinet_Location
 // Final placement of the whole cabinet

Is it better to use min max extent for final placements?
#declare CentrePoint = (min_extent( altdolap1kpk2 )+max_extent(altdolap1kpk2
))/2;
object { altdolap1kpk2 translate -CentrePoint rotate <0,0,0> translate
<-170.5,47.5,134.5>}


Thank you million times.....


Post a reply to this message

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