POV-Ray : Newsgroups : povray.animations : grouping objects for transforms : Re: grouping objects for transforms Server Time
19 Apr 2024 15:29:15 EDT (-0400)
  Re: grouping objects for transforms  
From: Stephen
Date: 5 Feb 2017 12:12:11
Message: <58975ceb$1@news.povray.org>
On 2/5/2017 2:15 PM, Klewlis wrote:
> For my animation, I want to place several objects in my scene individually,
> group them somehow and perform transform operations on the entire group.
> #declare groups the objects, but then I have to insert all objects as one unit.
> Is there a way to create a group as you place the items in one at a time?
>
> Something like:
>
> #group {eastwall}
>
> object { LongPlate
>      rotate z*90
>      rotate y*90
>      rotate x*-90 }
>
> object { LongPlate
>      rotate z*90
>      rotate y*90
>      translate z*94.125
>      rotate x*-90 }
>
> object { ShortPlate
>      rotate z*90
>      rotate y*90
>      translate <3.5, 0, 95.625>
>      rotate x*-90 }
>
> #for (i, 1.5, 241.5, 16)
>      object {Stud
>          rotate z*90
>          translate <i, 0, 1.5>
>          rotate x*-90 }
> #end
>
> #endgroup
>
> translate {eastwall} x*-90
>
> then I would use a clock to place each item individually then transform the
> entire group.
>
>

Use union 2.2.3.2 CSG Union

union{		 // Start of union


 > object { LongPlate
 >      rotate z*90
 >      rotate y*90
 >      rotate x*-90 }
 >
 > object { LongPlate
 >      rotate z*90
 >      rotate y*90
 >      translate z*94.125
 >      rotate x*-90 }
 >
 > object { ShortPlate
 >      rotate z*90
 >      rotate y*90
 >      translate <3.5, 0, 95.625>
 >      rotate x*-90 }
 >
 > #for (i, 1.5, 241.5, 16)
 >      object {Stud
 >          rotate z*90
 >          translate <i, 0, 1.5>
 >          rotate x*-90 }
 > #end

 > translate {eastwall} x*-90

}  // End of union

-- 

Regards
     Stephen


Post a reply to this message

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