POV-Ray : Newsgroups : povray.general : clone/duplicate of a union : Re: clone/duplicate of a union Server Time
20 Apr 2024 11:14:11 EDT (-0400)
  Re: clone/duplicate of a union  
From: Alain
Date: 25 May 2018 16:16:18
Message: <5b086f12@news.povray.org>
Le 18-05-25 à 08:16, Kima a écrit :
> It is probably a ridiculous question, but imagine we have created a union as
> 
> #declare obj_u1 =
>      union {
>          obj1
>          obj2
>      }
> 
> how can we create clones of obj_u1 and apply different transformations?
> 
> For example, how can we transform three independent copies of obj_u1 as
> 
> translate obj_u1
> scale obj_u1
> rotate obj_u1
> 
> 

Very simple.
You can simply place the object multiple times into your scene :
object{obj_u1 translate SomeTranslation}
object{obj_u1 scale SomeScalling}
object{obj_u1 rotate SomeRotation}

Or, you can make transformed copies :
#declare obj_t1 = object{obj_u1 translate SomeTranslation}
#declare obj_t2 = object{obj_u1 scale SomeScalling}
#declare obj_t3 = object{obj_u1 rotate SomeRotation}


Post a reply to this message

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