POV-Ray : Newsgroups : povray.newusers : Scale by axis? : Re: Scale by axis? Server Time
5 Jul 2024 04:51:47 EDT (-0400)
  Re: Scale by axis?  
From: Alain
Date: 1 Jun 2010 16:13:28
Message: <4c0569e8$1@news.povray.org>

> On 01/06/2010 3:44 AM, Alain wrote:
>> You can only scale uniformly.
>
> Are you sure about that? I was under the impression that you could scale
> <x, y, z> ;-)
The question was about non-uniform scaling along an axis. There is 
nothing that prevent you from scaling diferently for each axis.
Any straight line through the object will remain straight after that 
kind of scaling.

>
>> Also, you can't scale by zero.
>
> Now this is true but you can scale by 0.000001
>
> How about?
>
> #declare My_Location = <x, y, z> ;
>
> object {
> OBJECT_IDENTIFIER
> scale My_Location + 0.000001
> translate My_Location
> }
>
>
In that sample, the scale depends on the current value of the location, 
but remains constant for the whole object.
When the object is located close to the origin, it's scaled small, and 
large far away from the origin. By the way, you still can have a scaling 
by zero. What about My_Location = <-0.000001, -0.000001, -0.000001>?


Alain


Post a reply to this message

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