POV-Ray : Newsgroups : povray.general : Disc which is not flat : Re: scale by 0 (was Re: Disc which is not flat) Server Time
7 Aug 2024 09:26:05 EDT (-0400)
  Re: scale by 0 (was Re: Disc which is not flat)  
From: Trevor Quayle
Date: 3 Dec 2001 12:06:13
Message: <3c0bb105$1@news.povray.org>
> > Also what would be the difference between
> > #local s=s*<1,1,1>
> > and
> > #local s=s+<0,0,0>
> > ?
>
> You want put floats and vectors into this just like scale accept, right ?
> But I'm not sure multiplication Vector*<1,1,1> is defined. I can't check
it
> becouse limitation of current 3.5 beta.

It seems to work.
From 6.1.4.3: Operations are performed on a component-by-component basis.
For example <1,2,3> + <4,5,6> evaluates the same as <1+4,2+5,3+6> or
<5,7,9>. .. etc.

It doesn't say multiplication explicitly, but it seems to imply that
<a,b,c>*<d,e,f> = <a*d,b*e,c*f> and it does work, passing a float or a
vector into the macro doesn't produce an error.

I guess either way may be equally valid, unless someone else can see a
shortcoming.

-tgq


Post a reply to this message

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