|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Warp" <war### [at] tagpovrayorg> wrote in message news:3c0aa96d@news.povray.org...
<snip>
A good point - the obvious solution, from a user's point of view, would be that
scale <0,0,2> would generate an error (not a warning), but scale z*2 wouldn't,
it would just silently expand to <1,1,2> - however, from a programmer's p.o.v.
(sic) I can see that this might be impossible if the expansion to a full vector
is done before the vector operation itself...
Post a reply to this message
|
|
| |
| |
|
|
From: Trevor Quayle
Subject: Re: scale by 0 (was Re: Disc which is not flat)
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Huh? I did mistakes? It's likely to be the case, since I've never read an
English grammar book, or talked with an English person. My English now is
what I picked up from your posts during the past year. :)
--
Jonathan.
"Ben Chambers" <bdc### [at] hotmailcom> ha scritto nel messaggio
news:3c0b3228@news.povray.org...
>
> "JRG" <jrg### [at] hotmailcom> wrote in message
> news:3c0aaac1@news.povray.org...
> > If we start to put here and there exceptions to the
> > rules, things won't be easier, but harder.
>
> Kind of like the English language :)
>
> ...Chambers
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tom Melly <tom### [at] tomandlucouk> wrote:
: A good point - the obvious solution, from a user's point of view, would be that
: scale <0,0,2> would generate an error (not a warning), but scale z*2 wouldn't,
: it would just silently expand to <1,1,2> - however, from a programmer's p.o.v.
: (sic) I can see that this might be impossible if the expansion to a full vector
: is done before the vector operation itself...
I have the feeling that the promotion is done as an independent and
completely separated step, before the 'rotate' code even sees it. Thus it
would be very difficult to distinguish between the two.
And besides, should this generate the warning/error or not:
#declare Scale = y*2;
scale Scale
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Or perhaps these:
#macro scalex(Amnt) scale <Amnt,1,1> #end
#macro scaley(Amnt) scale <1,Amnt,1> #end
#macro scalez(Amnt) scale <1,1,Amnt> #end
It's even shorter to use: Eg. scalex(2)
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
From: Trevor Quayle
Subject: Re: scale by 0 (was Re: Disc which is not flat)
Date: 3 Dec 2001 15:40:27
Message: <3c0be33b$1@news.povray.org>
|
|
|
| |
| |
|
|
> #macro scalex(Amnt) scale <Amnt,1,1> #end
> #macro scaley(Amnt) scale <1,Amnt,1> #end
> #macro scalez(Amnt) scale <1,1,Amnt> #end
>
> It's even shorter to use: Eg. scalex(2)
>
Yes, but I was aiming for a single macro to use in place of scale.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Trevor Quayle <Tin### [at] hotmailcom> wrote:
: Yes, but I was aiming for a single macro to use in place of scale.
Why?
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Yes, but I was aiming for a single macro to use in place of scale.
Hmmm... perhaps...
#macro Scale(Amnt)
scale Amnt+<(Amnt.x=0?1:0),(Amnt.y=0?1:0),(Amnt.z=0?1:0)>
#end
then for example use "Scale(3*y)" instead "scale 3*y".
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c0be9ae@news.povray.org...
> Trevor Quayle <Tin### [at] hotmailcom> wrote:
> : Yes, but I was aiming for a single macro to use in place of scale.
>
> Why?
>
I think that was my original point, no purpose other than to placate those
who dislike the way scale works. I personally have no need for a macro like
this as I can handle the way POV scales.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Jaime Vives Piqueres" <jai### [at] ignoranciaorg> wrote in message
news:3C0### [at] ignoranciaorg...
> > Yes, but I was aiming for a single macro to use in place of scale.
>
> Hmmm... perhaps...
>
> #macro Scale(Amnt)
> scale Amnt+<(Amnt.x=0?1:0),(Amnt.y=0?1:0),(Amnt.z=0?1:0)>
> #end
>
> then for example use "Scale(3*y)" instead "scale 3*y".
>
To risk flogging this thing to death, the problem here was that if you pass
a float as opposed to a vector you get an error so you need to turn Amnt
into an equivilant vector first.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|