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 11:16:56 EDT (-0400)
  Re: scale by 0 (was Re: Disc which is not flat)  
From: Trevor Quayle
Date: 3 Dec 2001 11:04:00
Message: <3c0ba270$1@news.povray.org>

news:oh6n0uoqibno6v3ighkgd7moo9u6cm0doi@4ax.com...
> On Mon, 3 Dec 2001 10:13:54 -0500, "Trevor Quayle"
<Tin### [at] hotmailcom>
> wrote:
>
> > #macro ScaleIt (s)
> >   #local s=s*<1,1,1>
> >   scale <#if (s.x=0) 0 #else s.x #end,
> >          #if (s.y=0) 0 #else s.y #end,
> >          #if (s.z=0) 0 #else s.z #end>
> > #end
>
> Excuse me, but ... what is purpose of this macro :-)
> You probably want
>
> #macro ScaleIt (s)
>    #local s=s+<0,0,0>;
>   scale <(s.x=0?1:s.x),(s.y=0?1:s.y),(s.z=0?1:s.z)>
> #end
>

Oops, my mistake, I did mean to use 1s not 0s, and I didn't think of the
conditional operand.  Still, there is no real point to it other than to
placate those who don't like the present results of scaling by 0.
Also what would be the difference between
#local s=s*<1,1,1>
and
#local s=s+<0,0,0>
?

-tgq


Post a reply to this message

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