POV-Ray : Newsgroups : povray.unofficial.patches : Inverse Transformations patch : Re: Inverse Transformations patch Server Time
2 Sep 2024 12:19:16 EDT (-0400)
  Re: Inverse Transformations patch  
From: Chris Huff
Date: 26 Apr 2000 08:29:18
Message: <chrishuff_99-1BF663.07321726042000@news.povray.org>
In article <3906b3c9@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Suppose that I have this:
> 
> #declare MyObject=
>   box
>   { 0, 1
>     rotate x*30
>     texture { Whatever }
>     scale <1,.5,1> translate x*10 rotate y*60
>   }
> 
>   How should I declare the transformations so that I could apply them to
> MyObject as above and the use the sum of all those transformations (for
> example inverted)?

#declare TransA = transform {rotate x*30}
#declare TransB = transform {scale <1,.5,1> translate x*10 rotate y*60}
#declare InvTrans =
transform {
    transform {TransA}
    transform {TransB}
    inverse
}

#declare MyObject=
box { 0, 1
    transform {TransA}
    texture { Whatever }
    transform {TransB}
}

Using the additional syntax of my patch, of course.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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