POV-Ray : Newsgroups : povray.general : Creating an Office Server Time
2 Nov 2024 11:23:52 EDT (-0400)
  Creating an Office (Message 1 to 6 of 6)  
From: yara
Subject: Creating an Office
Date: 14 Jul 2009 13:20:00
Message: <web.4a5cbe2631caf091f0b6e6d20@news.povray.org>
Hi. I am a high school student taking a course on povray during the summer.
Our first project was to create an office on povray.
I managed to complete but I need some help editing it and making the office look
a little more realistic.
Thanks again, here's the code :)

#include "textures.inc"
#include "colors.inc"
camera { location <0, 6, -24> look_at <0,1,3>}

light_source { <8,20, -15> color rgb <1.5,1.5,1.5> }
background {color White}

plane {<0,1,0>,-2
 texture{
              pigment{checker
                         color White color rgb<0.8,0.65,0.8>
                      scale 0.5}
              finish { diffuse 0.35 reflection 0.4}
             }// end of texture
        }

#declare table = union {
box { < -3,1,-1>, <2,2,6>
        texture {Silver_Metal}}
box { <-3,1,-1>, <-2,-2,0>
         texture { pigment {color rgb <0,0,0>}}}
box { <2,1,-1>, <1,-2,0>
         texture { pigment {color rgb <0,0,0>}}}
box { <2,1,6>, <1,-2,6>
         texture { pigment {color rgb <0,0,0>}}}
box { <-3,1,6>, <-2,-2,5>
         texture { pigment {color rgb <0,0,0>}}}    }

object {table
translate <-8,0,5> }

object { table
translate <8,0,5> }

object { table
translate <8,0,-5> }

object { table
translate <-7,0,-5> }

plane {<1,0,0>,-15
 texture{pigment{ color Blue} }}

plane {<0,0,1>,15
 texture{
              pigment{ color Blue}}}

#declare chair = union {
box { < -1,0,0>, <3,1,3>
texture { pigment {Cherry_Wood} } }

box { <3,1,3>, <2.5,4,0>
texture { pigment {Cherry_Wood} } }

box { <-1,0,0>, <-.5,-2,.75>
texture { pigment {Cherry_Wood} } }

box { <3,0,0>, <2.5,-2,.75>
texture { pigment {Cherry_Wood} } }

box { <-1,0,3>, <-.5,-2,2.25>
texture { pigment {Cherry_Wood} } }

box { <3,0,3>, <2.5,-2,2.25>
texture { pigment {Cherry_Wood} } }
}



object {chair
translate <8,0,-5> }

object {chair
translate <8,0,5.5> }

object {chair
rotate y*180
translate <-8,0,5.5>}

object {chair
rotate y*180
translate <-8,0,-2>}

#declare vase = union {
sor { 9,

<0,0>, <1.25,.75>, <.75,1.25>, <1.25,2.25>, <1.5, 3.25>, <1, 4.5>, <.75, 5.25>,
<1.5,5.75>, <.5,5.75>
pigment {Blue}
finish {ambient .3
phong .75}
}

cylinder { <0,5.75,.25>, <0,6.75,.25>,.1
 texture { pigment {MediumSeaGreen} } }

sphere { <0,6.75,0>,.5
texture { pigment {Yellow} } }

sphere { <.7,6.75,.5>,.52
texture { pigment {Scarlet} } }

sphere { <-.7,6.75,.5>,.52
texture { pigment {Scarlet} } }

sphere { <0,7.5,.5>,.52
texture { pigment {Scarlet} } }

sphere { <0,6.05,.5>,.52
texture { pigment {Scarlet} } } }

object {vase
scale <.5,.5,.5>
translate <-6,1.5,-2>}

#declare book = union {
prism {linear_sweep
linear_spline
0,
1,
6,
<0,0>, <1,0>, <1,2>, <-1,2>, <-1,0>, <0,0>
pigment {Scarlet}}  }

object {book
scale <1,.15,1>
rotate y*15
translate <8,2,-4>}

#declare book2 = union {
prism {linear_sweep
linear_spline
0,
..5,
6,
<0,0>, <1,0>, <1,2>, <-1,2>, <-1,0>, <0,0>
pigment {Black}}  }

object {book2
rotate y*-15
translate <8,2.15,-4>}

#declare paper = union {
prism {linear_sweep
linear_spline
0,
..05,
6,
<0,0>, <1,0>, <1,2>, <-1,2>, <-1,0>, <0,0>
pigment {White}} }

object {paper
rotate y*15
translate <-7,2,-5>}

object {paper
rotate y*15
translate <-7.5,2.05,-4.5>}

object {paper
rotate y*15
translate <-8,2.1,-5>}

#declare frame =
box { <3,0,3>, <2.75,-2,2.5>
texture {Silver_Metal} }

#declare picture = union {
object { frame
rotate z*-65
translate <0,-.25,0>}

object { frame
scale <1,1.25,1>
rotate z*30
translate <-2,-3,0>}
}
object {picture
translate <5.85,5.85,-8>}

#declare trash =
difference {
cylinder { <1,1,1>, <1,4.5,1>,1.5
     texture {pigment {Black}} }
cylinder { <1,1,1>, <1,5,1>,1.25

     texture {pigment {Black}} }
}

object {trash
translate <0,-3,9> }

#declare pencup = difference {
cylinder { <1,1,1>, <1,1.75,1>,.5
     texture {pigment {Red}} }
cylinder { <1,1,1>, <1,2,1>,.25

     texture {pigment {Red} }}}

object { pencup
translate <4.75,1,4.5>}

cylinder { <5.75,2.5,5.25>, <5.75,3.75,5.25>, .075
texture {pigment {ForestGreen}
}}

#declare laptop =
box { <6,2,5.5>, <9,2.35,7.5> }

object {laptop}


Post a reply to this message

From: clipka
Subject: Re: Creating an Office
Date: 14 Jul 2009 13:55:01
Message: <web.4a5cc63bd6b0ec325fee4dc70@news.povray.org>
"yara" <yar### [at] gmailcom> wrote:
>
> #declare book2 = union {
> prism {linear_sweep
> linear_spline
> 0,
> ..5,
> 6,
> <0,0>, <1,0>, <1,2>, <-1,2>, <-1,0>, <0,0>
> pigment {Black}}  }

This one will not work in the newest release of POV-Ray (both 3.62, and 3.7
betas); older versions just ignored excessive decimal points in numeric
literals, but the new ones will righteously reject the "..5". Same with your
"paper" object.

As for getting things more realistic, for starters I'd suggest to make sure you
don't use pitch black - you never have that in real life.

Also, you should make more use of the "finish" statement, especially specular or
phong highlights. This can help with your pitch-black objects, too.

You may also want to improve on the proportions; e.g. the table top is rather
thick, and the legs likewise.

From there on, things get comparatively complicated. For instance, for a
*really* realistic look, all edges would need some beveling, and you would want
to use radiosity, blurred reflections and focal blur :P

Aside from that, it looks like a good start.

Try to develop a consistent style regarding indentations and use of curly
braces. Teachers like that (especially if it matches their own personal style
:P), and you'll probably come to like it as well.

I personally favor the following in POV-Ray SDL:

  // short statements:

  statement { <parameters> }

  // long statements:

  statement { <mandatory_parameters>
    <other_parameters_and_stuff>
  }

But the main point is to use *some* style consistently. (Yet feel free to
deviate from it wherever it happens to be unwieldy.)


Post a reply to this message

From: yara
Subject: Re: Creating an Office
Date: 15 Jul 2009 13:40:01
Message: <web.4a5e1392d6b0ec32f0b6e6d20@news.povray.org>
thank you so much :)im going to try fixing it up during the weekend
and thanks for helping my classmates out as well :)
i dont think anyone else will post anything from oru class

"clipka" <nomail@nomail> wrote:
> "yara" <yar### [at] gmailcom> wrote:
> >
> > #declare book2 = union {
> > prism {linear_sweep
> > linear_spline
> > 0,
> > ..5,
> > 6,
> > <0,0>, <1,0>, <1,2>, <-1,2>, <-1,0>, <0,0>
> > pigment {Black}}  }
>
> This one will not work in the newest release of POV-Ray (both 3.62, and 3.7
> betas); older versions just ignored excessive decimal points in numeric
> literals, but the new ones will righteously reject the "..5". Same with your
> "paper" object.
>
> As for getting things more realistic, for starters I'd suggest to make sure you
> don't use pitch black - you never have that in real life.
>
> Also, you should make more use of the "finish" statement, especially specular or
> phong highlights. This can help with your pitch-black objects, too.
>
> You may also want to improve on the proportions; e.g. the table top is rather
> thick, and the legs likewise.
>
> From there on, things get comparatively complicated. For instance, for a
> *really* realistic look, all edges would need some beveling, and you would want
> to use radiosity, blurred reflections and focal blur :P
>
> Aside from that, it looks like a good start.
>
> Try to develop a consistent style regarding indentations and use of curly
> braces. Teachers like that (especially if it matches their own personal style
> :P), and you'll probably come to like it as well.
>
> I personally favor the following in POV-Ray SDL:
>
>   // short statements:
>
>   statement { <parameters> }
>
>   // long statements:
>
>   statement { <mandatory_parameters>
>     <other_parameters_and_stuff>
>   }
>
> But the main point is to use *some* style consistently. (Yet feel free to
> deviate from it wherever it happens to be unwieldy.)


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Creating an Office
Date: 15 Jul 2009 19:40:52
Message: <4a5e6904$1@news.povray.org>
> i dont think anyone else will post anything from oru class

except maybe your instructor. Is this a 3 week course? ;)


Post a reply to this message

From: yara
Subject: Re: Creating an Office
Date: 21 Jul 2009 15:05:00
Message: <web.4a6610c7d6b0ec32f0b6e6d20@news.povray.org>
yeah
and for the next 3 weeks were going to work on postscript i believe
im assuming our instructor posted something asking for help?

Christian Froeschlin <chr### [at] chrfrde> wrote:
> > i dont think anyone else will post anything from oru class
>
> except maybe your instructor. Is this a 3 week course? ;)


Post a reply to this message

From: clipka
Subject: Re: Creating an Office
Date: 21 Jul 2009 23:00:00
Message: <web.4a668082d6b0ec32785322500@news.povray.org>
"yara" <yar### [at] gmailcom> wrote:
> and for the next 3 weeks were going to work on postscript i believe

Fascinating language, too. Something for the weird folks. People who favor HP
calculators, for instance ;)

Prepare yourself for some serious backwards-thinking :P


Post a reply to this message

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