|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 28 Feb 2002 18:21:30 -0700, Owen Mortensen wrote:
> Please clear up my thinking on this.
If a box is to be flat then create it where it will live, no need to
rotate and translate etc.
I havn't tested your code or even read it but from what you're saying
there's no need to rotate and translate it.
--
#local i=.1;#local I=(i/i)/i;#local l=(i+i)/i;#local ll=(I/i)/l;box{<-ll,
-((I/I)+l),-ll><ll,-l,ll>pigment{checker scale l}finish{ambient((I/l)/I)+
(l/I)}}sphere{<i-i,l-l,(I/l)>l/l pigment{rgb((I/l)/I)}finish{reflection((
I/l)/I)-(l/I)specular(I/l)/I}}light_source{<I-l,I+I,(I-l)/l>l/l} // Steve
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|