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:59 EDT (-0400)
  Re: union of door and handle pushes item off z axis  
From: optima
Date: 28 Aug 2009 11:15:00
Message: <web.4a97f3a5b4a77fd044cee4d70@news.povray.org>
Alain, thanks to you and your samples, I got the door to rotate correctly with
the code below.

//DECLARE DOOR AND HANDLE, (case is defined separately "altdolap1kpk")
#declare model_101_ = object{ model_101_ scale <0.01,0.01,0.8> }
#declare k_model_1_ = object {k_model_1_ scale <0.1,0.1,0.1> }

//PLACE CABINETS IN SCENE
union{
object { altdolap1kpk }
union{
object { model_101_ scale <39.4999961853027,75,1> translate <20,0,61> pigment
{image_map {jpeg "Blue.jpg"} scale 1} finish {phong 1 ambient 0.6 reflection
0.08} }
object { k_model_1_ rotate z*0 translate <37,62,64> pigment {image_map {jpeg
"a700.jpg"} scale 1} finish {phong 1 ambient 0.3 reflection 0.3} }
translate -<0,47.5,60> rotate y*-0 translate <0,47.5,60>}//ROTATE DOOR
translate -<0,0,0> rotate <0,0,0> translate -<0,0,0>//TO ROTATE WHOLE CABINET

translate <-50,0,0>}

Thanks to everybody helping me before the DOOR problem is solved with above
code. Now I got a second problem, I want to rotate the cabinet on its on y axis
(turn left or right) but it orbits again. I can only rotate objects on their y
axis 90-180-270 degrees cause I change their width and depth values with each
other in the translate statement. But I know this is wrong...
How do I rotate my cabinet or any object in place. How would you rotate the
above cabinet 34 degrees with values given above?

Note: I have been using povray for a year now, I still can't rotate objects in
place without orbiting? Sorry if I'm slow to understand. Thanks again.


Post a reply to this message

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