POV-Ray : Newsgroups : povray.general : Help! Creating a window Server Time
27 Dec 2024 21:53:13 EST (-0500)
  Help! Creating a window (Message 1 to 3 of 3)  
From: chichi86
Subject: Help! Creating a window
Date: 22 Nov 2005 22:25:01
Message: <web.4383e0d0ea3ed4d32328301f0@news.povray.org>
Hi there,

I'm very new to povray and I'm supposed to create a room for a computer
science class I'm taking. I'm trying to put a window into one of my walls
but I can't get it to show up. This is what I have:

#declare wall=
union{
box{<-1,0,5> <9,8,5>}
pigment{color LightBlue}
}
object{wall}
object{wall rotate<0,90,0> translate <-6,0,4>}

#declare window=
difference{
box {<-1,0,5> <9,8,5>}
box {<2,3,2.5> <6,6,2.5>} texture{Glass}}
object{window}

The entire wall turns into glass, and I've tries all sorts of dimensions.
I'm sorry to bug you with a beginner's question, but I wasn't able to find
an answer in the FAQs or help text.
Thanks!


Post a reply to this message

From: Mike Williams
Subject: Re: Help! Creating a window
Date: 23 Nov 2005 02:12:42
Message: <eWXEqYAlZBhDFwM9@econym.demon.co.uk>
Wasn't it chichi86 who wrote:
>Hi there,
>
>I'm very new to povray and I'm supposed to create a room for a computer
>science class I'm taking. I'm trying to put a window into one of my walls
>but I can't get it to show up. This is what I have:
>
>#declare wall=
>union{
>box{<-1,0,5> <9,8,5>}
>pigment{color LightBlue}
>}
>object{wall}
>object{wall rotate<0,90,0> translate <-6,0,4>}
>
>#declare window=
>difference{
>box {<-1,0,5> <9,8,5>}
>box {<2,3,2.5> <6,6,2.5>} texture{Glass}}
>object{window}
>
>The entire wall turns into glass, and I've tries all sorts of dimensions.
>I'm sorry to bug you with a beginner's question, but I wasn't able to find
>an answer in the FAQs or help text.
>Thanks!

Your main problem is that your boxes have zero thickness in the z
direction. That doesn't work very well in POV. Give them a little
thickness, like box{<-1,0,5> <9,8,5.25>}

The second problem is that the second component of your window
difference misses the first component completely. One has a z value of 5
and the other 2.5. Make the two boxes overlap, like this:
  difference{
    box {<-1,0,5> <9,8,5.25>}
    box {<2,3,4.5> <6,6,6>}

The third problem is that the "window" object isn't a window, it's a
wall with a window-shaped hole in it, so its texture shouldn't be Glass,
it should be your wall texture.

Then you need to get rid of the solid wall that's in the same place as
the wall with the hole in it.

But now there's no glass in the window, so you need to add something
like this

#declare pane = box{<2,3,5.1> <6,6,5.15> texture {Glass}}
object {pane}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: chichi86
Subject: Re: Help! Creating a window
Date: 23 Nov 2005 11:55:01
Message: <web.43849dd08f2f511f2328301f0@news.povray.org>
Thank You so much!
:)Maria

Mike Williams <nos### [at] econymdemoncouk> wrote:
> Wasn't it chichi86 who wrote:
> >Hi there,
> >
> >I'm very new to povray and I'm supposed to create a room for a computer
> >science class I'm taking. I'm trying to put a window into one of my walls
> >but I can't get it to show up. This is what I have:
> >
> >#declare wall=
> >union{
> >box{<-1,0,5> <9,8,5>}
> >pigment{color LightBlue}
> >}
> >object{wall}
> >object{wall rotate<0,90,0> translate <-6,0,4>}
> >
> >#declare window=
> >difference{
> >box {<-1,0,5> <9,8,5>}
> >box {<2,3,2.5> <6,6,2.5>} texture{Glass}}
> >object{window}
> >
> >The entire wall turns into glass, and I've tries all sorts of dimensions.
> >I'm sorry to bug you with a beginner's question, but I wasn't able to find
> >an answer in the FAQs or help text.
> >Thanks!
>
> Your main problem is that your boxes have zero thickness in the z
> direction. That doesn't work very well in POV. Give them a little
> thickness, like box{<-1,0,5> <9,8,5.25>}
>
> The second problem is that the second component of your window
> difference misses the first component completely. One has a z value of 5
> and the other 2.5. Make the two boxes overlap, like this:
>   difference{
>     box {<-1,0,5> <9,8,5.25>}
>     box {<2,3,4.5> <6,6,6>}
>
> The third problem is that the "window" object isn't a window, it's a
> wall with a window-shaped hole in it, so its texture shouldn't be Glass,
> it should be your wall texture.
>
> Then you need to get rid of the solid wall that's in the same place as
> the wall with the hole in it.
>
> But now there's no glass in the window, so you need to add something
> like this
>
> #declare pane = box{<2,3,5.1> <6,6,5.15> texture {Glass}}
> object {pane}
>
> --
> Mike Williams
> Gentleman of Leisure


Post a reply to this message

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