POV-Ray : Newsgroups : povray.general : "scale" again... Server Time
4 Nov 2024 23:17:24 EST (-0500)
  "scale" again... (Message 1 to 3 of 3)  
From: Marc Champagne
Subject: "scale" again...
Date: 10 Sep 2003 22:46:41
Message: <Xns93F2E748D2C8BPOVMIKA@204.213.191.226>
Ummm me again!

Here is another use that boggles my mind:

    	scale 10 + z * 30

Without testing I would assume the following 2 lines will do the same as
above: 

    	scale <10,10,10>
    	scale < 1, 1,30>

or am I reading it wrong.

I believe the use of x, y and z (also t, u and v for that matter) are
to make things more readable, not more complex.

I guess this goes with any language, where one can create complex
shortcuts that become not so obvious to read later on. 

I'm not in my cup tonight, please excuse me :)

Thanks

-- 
Marc Champagne
marcch.AT.videotron.DOT.ca
Montreal, CANADA


Post a reply to this message

From: Slime
Subject: Re: "scale" again...
Date: 10 Sep 2003 23:44:08
Message: <3f5fef88$1@news.povray.org>
>     scale 10 + z * 30

This is equivalent to

scale <10, 10, 10> + <0, 0, 30>

or

scale <10, 10, 40>

>
> Without testing I would assume the following 2 lines will do the same as
> above:
>
>     scale <10,10,10>
>     scale < 1, 1,30>

No, the above is equivalent to

scale <10, 10, 300>

You'll get used to these sort of vector additions with a little practice,
and you'll be able to quickly identify what an expression evaluates to.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Marc Champagne
Subject: Re: "scale" again...
Date: 11 Sep 2003 08:38:58
Message: <Xns93F357B7A1E8AnewsATctldirectDORco@204.213.191.226>
"Slime" <fak### [at] emailaddress> wrote in news:3f5fef88$1@news.povray.org:

>>     scale 10 + z * 30
> 
> This is equivalent to
> 
> scale <10, 10, 10> + <0, 0, 30>
> 
> or
> 
> scale <10, 10, 40>
> 
>>
>> Without testing I would assume the following 2 lines will do the same
>> as above:
>>
>>     scale <10,10,10>
>>     scale < 1, 1,30>
> 
> No, the above is equivalent to
> 
> scale <10, 10, 300>
> 
> You'll get used to these sort of vector additions with a little
> practice, and you'll be able to quickly identify what an expression
> evaluates to. 


I rest my case :)

Well it turns out that

    	scale <10, 10, 40>

is a lot more readable and less open to misinterpretation than is

    	scale 10 + z * 30


There is just the problem, clarity gone out the window.

It's just frustrating that such a simple instruction can be so complex
and hard to read. 

Thanks

Marc


Post a reply to this message

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