POV-Ray : Newsgroups : povray.general : But I didn't ask for variable promotion Server Time
5 Nov 2024 18:24:44 EST (-0500)
  But I didn't ask for variable promotion (Message 1 to 3 of 3)  
From: Greg M  Johnson
Subject: But I didn't ask for variable promotion
Date: 30 Jan 2003 09:06:03
Message: <3e39314b$1@news.povray.org>
// Scene file as follows  uncomment one declaration of rah or the other:
#declare RRR=seed(123);

#macro ra()
rand(RRR)-0.5
#end

#declare n=0;
#while(n<1000)

// if you uncomment the line below
// you get what I want
// #declare rah= 0.9*(rand(RRR)-0.5)*x;

// if you uncomment the line below
// you get a variable that has x,y,z
//#declare rah= 0.9*ra()*x;

       #declare obstacle= 12*vaxis_rotate(x*1+rah,y,360*n/1000);
        sphere{obstacle, .1 pigment {rgb 0.95}finish{ambient 1}}
#declare n=n+1;
#end


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: But I didn't ask for variable promotion
Date: 30 Jan 2003 09:21:23
Message: <3e3934e3$1@news.povray.org>
In article <3e39314b$1@news.povray.org> , "Greg M. Johnson" 
<gregj:-)565### [at] aolcom> wrote:

> // Scene file as follows  uncomment one declaration of rah or the other:
> #declare RRR=seed(123);
>
> #macro ra()
> rand(RRR)-0.5
> #end
>
> #declare n=0;
> #while(n<1000)
>
> // if you uncomment the line below
> // you get what I want
> // #declare rah= 0.9*(rand(RRR)-0.5)*x;
>
> // if you uncomment the line below
> // you get a variable that has x,y,z
> //#declare rah= 0.9*ra()*x;

Of course.  The parenthesis in your macro are missing.  Thus both cases are
not identical.  RTFM.

    Thorsten


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: But I didn't ask for variable promotion
Date: 30 Jan 2003 09:24:43
Message: <3e3935ab$1@news.povray.org>
In article <3e3934e3$1@news.povray.org> , "Thorsten Froehlich" 
<tho### [at] trfde> wrote:

> RTFM.

6.2.8.4 Returning a Value Like a Function through to the end.

    Thorsten


Post a reply to this message

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