POV-Ray : Newsgroups : povray.newusers : First-time user - object groups Server Time
5 Sep 2024 12:16:26 EDT (-0400)
  First-time user - object groups (Message 1 to 7 of 7)  
From: me
Subject: First-time user - object groups
Date: 23 Mar 2001 10:20:05
Message: <3abb69a5$1@news.povray.org>
I'm a first-time user of POV-Ray, and am really enjoying it. I am having a
bit of a problem, though, manipulating items made up of objects. Here's the
brief story: I have a podium that I have defined in POV-Ray, using three
boxes, eight rods (skinny cylinders) and a conical-sweep prism (basically an
upside-down pyramid with the top chopped off) that is scaled to be longer in
the y-axis. (I can send a .bmp if you wish.) Each of these objects I have
declared and named, as in this example:

#declare TopBox =
box
{
  <0, 0, 0>
  <14, 2.5, 14>
  pigment { color Wheat }
  translate <-7, 0, -3.5>
}
#declare BottomBox =
box
{
  <0, 0, 0>
  <12,  .5,  12>
  pigment { color Wheat }
  translate <-6, -17.5, -2.5>
}
#declare Base =
box
{
  <0, 0, 0>
  <12, .5,  12>
  pigment { color DarkWood }
  translate <-6, -19, -2.5>
}
#declare Main =
  prism {
    conic_sweep
    linear_spline
    0.825, // height 1
    1, // height 2
    5, // the number of points making up the shape...
    <5, 5>,<-5, 5>,<-5, -5>,<5, -5>,<5, 5>
    scale <1, 95, 1.2>
  texture {
    T_Wood3
  }
  translate <0, -97, 3.45>
}

The "rods" are declared in much the same way. My problem is this: I want to
use a #declare statement to combine each of these objects into one, as so:

#declare Podium_All =
object { Main }
object { FrontName }
object { FrontLogo }
object { TopBox }
object { BottomBox }
object { Base }
object { Rods }

and I want to be able to use an object {...} statement to move the construct
as one unit, as so:

object { Podium_All
   translate <0, 3, 0>
   rotate -45*y
 }

However, when I do this, only one piece of the whole object moves. Is there
something I'm missing? Is there some kind of ability to "nest" objects (or
in this case, sub-objects) into one object statement, so that POV-Ray sees
the individual pieces as one object? I'd appreciate any help.

dan


Post a reply to this message

From: Ken
Subject: Re: First-time user - object groups
Date: 23 Mar 2001 10:24:45
Message: <3ABB6B44.BEB25E71@pacbell.net>
me wrote:

> The "rods" are declared in much the same way. My problem is this: I want to
> use a #declare statement to combine each of these objects into one, as so:

Simply wrap all of your objects in a union statement and it will be treated
like a single object. Example -

#declare Podium_All =

union {

object { Main }
object { FrontName }
object { FrontLogo }
object { TopBox }
object { BottomBox }
object { Base }
object { Rods }

}

-- 
Ken Tyler


Post a reply to this message

From: Tom Melly
Subject: Re: First-time user - object groups
Date: 23 Mar 2001 10:25:19
Message: <3abb6adf$1@news.povray.org>
"me" <me### [at] minecom> wrote in message news:3abb69a5$1@news.povray.org...

<SNIP>

You need to create a union of your objects. So your code should read:

 #declare Podium_All =
union{
 object { Main }
 object { FrontName }
 object { FrontLogo }
 object { TopBox }
 object { BottomBox }
 object { Base }
 object { Rods }
}

object { Podium_All
   translate <0, 3, 0>
   rotate -45*y
 }


Post a reply to this message

From: Tom Melly
Subject: Re: First-time user - object groups
Date: 23 Mar 2001 10:27:39
Message: <3abb6b6b@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote in message
news:3ABB6B44.BEB25E71@pacbell.net...

Holy bat-doo-doo, I beat Ken!


Post a reply to this message

From: me
Subject: Re: First-time user - object groups
Date: 23 Mar 2001 10:35:48
Message: <3abb6d54@news.povray.org>
Thanks, guys...I knew it was something simple! :-)

dan

"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3abb6b6b@news.povray.org...
> "Ken" <tyl### [at] pacbellnet> wrote in message
> news:3ABB6B44.BEB25E71@pacbell.net...
>
> Holy bat-doo-doo, I beat Ken!
>
>


Post a reply to this message

From: Ken
Subject: Re: First-time user - object groups
Date: 23 Mar 2001 11:00:34
Message: <3ABB73AA.858F081F@pacbell.net>
Tom Melly wrote:
> 
> "Ken" <tyl### [at] pacbellnet> wrote in message
> news:3ABB6B44.BEB25E71@pacbell.net...
> 
> Holy bat-doo-doo, I beat Ken!

I beat you by a full 30 sec. I just need to reset the clock on my computer :)

-- 
Ken Tyler


Post a reply to this message

From: Tom Melly
Subject: Re: First-time user - object groups
Date: 23 Mar 2001 11:11:59
Message: <3abb75cf@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote in message
news:3ABB73AA.858F081F@pacbell.net...

> I beat you by a full 30 sec. I just need to reset the clock on my computer
:)

I'm not listening, I'm not listening, TRA-LA-LA-LA-LA


Post a reply to this message


Attachments:
Download 'ibk.jpg' (2 KB)

Preview of image 'ibk.jpg'
ibk.jpg


 

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