POV-Ray : Newsgroups : povray.general : Status of Moray? : Re: New SDL for POVRay Server Time
13 Jul 2025 14:39:13 EDT (-0400)
  Re: New SDL for POVRay  
From: Nicolas Alvarez
Date: 6 Oct 2007 16:59:27
Message: <4707f72f$1@news.povray.org>

> Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> 
>> Also, how would you handle this?
>> sphere {
>>     <1,2,3>, 0.5
>>     translate <12,35,61>
>>     texture { some_complex_texture }
>>     translate y*2
>> }
>> The first translate doesn't affect the texture, the second does.
>>
> 
> Just like POV does (correct me if I am wrong): when translate is encountered
> it translates the whole object. At the time of first translate, no texture
> is specified yet (=null, I suppose). At the time of the second the sphere's
> 'texture' field is non-null, thus transformed with the object. The final
> state is that de texture has been translated twice.
> 
> In new SDL, it would be the same: the translate() method (or whatever it
> will be) of an object (or its derived) will apply on whatever there is
> inside the current object. You could have also written
> 
>  sphere {
>      <1,2,3>, 0.5
>      translate <12,35,61>
>      texture { some_complex_texture translate 100*x}
>      translate y*2
>  }
> 
> with 3 translations for the texture.
> 
> Bruno
> 
> 
You missed my point (because I didn't make it so clear :P). How would 
you handle that *and* allow syntax like this?

sphere.translate[0]="<5,0,0>"

I think it's a bad idea to allow changing individual transformation 
statements after the object has been created.


Post a reply to this message

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