POV-Ray : Newsgroups : povray.newusers : NEWBIE Translate/Rotate question : Re: NEWBIE Translate/Rotate question Server Time
5 Sep 2024 00:16:58 EDT (-0400)
  Re: NEWBIE Translate/Rotate question  
From: Owen Mortensen
Date: 28 Feb 2002 20:34:16
Message: <3c7eda98$1@news.povray.org>
DOH!  Figured it out.... my "//ceiling" box was not ON the z-axis at all,
but 96 units in the y-direction above it!

Owen


"Owen Mortensen" <ojm### [at] acmorg> wrote in message
news:3c7ed78f@news.povray.org...
> Hey everyone!  Newbie here!
>
> I'm having a problem with a box that I want to rotate around the Z-axis
but
> it's not doing what I expect.
>
> Here's the code:
>
> <CODE>
> #include "colors.inc"
>
> //bathroom/kitchen wall
> box {
>     <0,0,0>,
>     <150, 96, 6>
>     pigment {color Wheat}
>     finish {specular 0.5 roughness 0.2}
> }
>
> difference {
>     //outside wall
>     box {
>         <0, 0, 0>,
>         <-6, 96, -240>
>         pigment {color Wheat}
>         finish {specular 0.5 roughness 0.2}
>     }
>
>     box {
>         <10, 45, -90>,
>         <-10, 77, -126>
>         pigment {color Wheat}
>         finish {specular 0.5 roughness 0.2}
>     }
> }
>
> //kitchen/pantry wall
> box {
>     <150, 0, 0>,
>     <156, 158.5, -120>
>     pigment {color Wheat}
>     finish {specular 0.5 roughness 0.2}
> }
>
> //ceiling
> box {
>     <-24, 96, -240>,
>     <162.5, 106, 6>
>     pigment {color Wheat}
>     finish {specular 0.5 roughness 0.2}
>     translate 24*x
>     rotate <0, 0, 22.62>
>
> }
>
> camera {
>     location < 75, 48, -400 >
>     look_at < 75, 48, 0 >
> }
>
>
> light_source { < 75, 96, -100 > color White }
>
> </CODE>
>
> my problem is with the code immediately following the "//ceiling" comment.
> I want the box to rotate so that it's bottom left side is still aligned
with
> the "//outside wall".  However, after the rotate, it ends up with its left
> side back over at x=-24 (where it was originally constructed).
>
> After the Translate, shouldn't the box be then aligned right on the z-axis
> so that the rotate leaves it there?
>
> Please clear up my thinking on this.
>
> TIA,
> Owen
>
>


Post a reply to this message

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