POV-Ray : Newsgroups : povray.documentation.inbuilt : Add a non-origin sphere example to Scale : Re: Add a non-origin sphere example to Scale Server Time
18 Apr 2024 21:25:54 EDT (-0400)
  Re: Add a non-origin sphere example to Scale  
From: Phil Cook
Date: 27 Apr 2004 05:04:48
Message: <opr63x4nh2p4ukzs@news.povray.org>
On Mon, 26 Apr 2004 18:53:48 +0200, Christoph Hormann 
<chr### [at] gmxde> wrote:

> Phil Cook wrote:
>> Someone else has just been caught out by 'moving' objects when using 
>> scale, I was wondering if adding a non-origin sphere to the example 
>> would highlight this, perhaps:
>>
>> Scale also alters the vector components of an object
>>
>> For example
>>
>>  sphere { <1,1,1>, 1
>>   scale 5> // Evaluates as <5,5,5> so uniformly scale
>>       // by 5 in every direction.
>>       // but also multiplies the vector location
>>     // resulting in a translation to <5,5,5>
>>  }
>
> See "2.2.7.2 Transformation Order" - without such a complete example but 
> well explained IMO.
>
> Apart from that your explanation is wrong.  A transform does not 
> transform the radius and center of the sphere but the whole object.  In 
> fact POV-Ray does not even transform the object but transforms the ray 
> with the inverse transform - otherwise a lot of shapes could not be 
> transformed arbitrarily at all.
>

The only transformation order I can see in the v3.5 help file is at 6.3.2 
which states:

"Similarly scaling after translation also moves an object unexpectedly. If 
you scale after you translate the scale will multiply the translate 
amount.
For example

   translate <5, 6, 7>
   scale 4

will translate to <20,24,28> instead of <5,6,7>. Be careful when 
transforming to get the order correct for your purposes."

But doesn't explicitly state what happens if you create an object at a 
non-origin point, if you take the position that doing so is the equivalent 
of creating an origin object then translating it then this makes sense, 
but it's not obvious.

If someone translated an object and then rotated it and complained that 
it's 'moved' you can tell them to look up rotate in the help file and read 
what is there; but you can't look up scale and get a similar answer. I 
just thought it would be better to keep this information together in an 
easier-to-find place as is done with rotate.

As for my explanation, if you want to change it to 'apparent' 
translation/transform or whatever, fine; but as Warp pointed out from the 
users perspective who cares, to them the object has just arbitrarily moved 
without an explanation under scale as to why.

--
Phil Cook

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

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