POV-Ray : Newsgroups : povray.general : POV-Ray Quiz : Re: POV-Ray Quiz for Intermediate Users Server Time
4 Aug 2024 16:11:37 EDT (-0400)
  Re: POV-Ray Quiz for Intermediate Users  
From: ABX
Date: 5 Jun 2003 10:36:14
Message: <5pkudvongdmkh2c1jc4paa58njv9or68pu@4ax.com>
On 5 Jun 2003 10:21:53 -0400, Warp <war### [at] tagpovrayorg> wrote:
> > The scene which
> > uses macro with 'transform' (tomtreet.inc) renders 6-7 times faster.
>
> You don't mean it parses 6-7 times faster?

When you apply transform to CGS each scale, translate, rotate etc. cause
separate calculation of transformation matrix and applying it to all children of
this object. So if you have union of 100 objects, and you rotate and then scale
this union it cause 202 calls to Transform_Object (for each child + parent). If
you enclose scale and rotate within transform{} it is first parsed into one
matrix within Parse_Objects_Mods and 101 calls to Transform_Object is executed. 
The difference is not small and increases with number of transformations.

ABX


Post a reply to this message

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