POV-Ray : Newsgroups : povray.general : Array... : Re: Array... Server Time
20 Nov 2024 06:36:11 EST (-0500)
  Re: Array...  
From: Ron Parker
Date: 14 Oct 2001 22:05:59
Message: <slrn9skh47.kt.ron.parker@fwi.com>
On Sun, 14 Oct 2001 21:39:23 -0400, F.Audet wrote:
>I decided to do what I wanted to do in simulating an array
>with two #while loops, and it finally worked.
>But if you could see why the famous array
>did not work,  here is the code :

Maybe something having to do with returning a local from a macro; this might
have been a bug in 3.1 as well.  Try rewriting the macro like this:

>
>#declare s1 = seed(1);
>#macro bin_01 ()  // note that it works well with a simple while, without array....
>  #if ( rand(s1) <= 0.5 )
>    object { nice_zero }
>  #else
>    object { nice_one }
>  #end
>#end

-- 
#macro R(P)z+_(P)_(P)_(P+1)_(P+1)+z#end#macro Q(C)bicubic_patch{type 1u_steps 6
v_steps 6R(1)R(3)R(5)R(7)translate 9*z-2pigment{rgb z}}#end#macro _(Y)#local X=
asc(substr(C,Y,1))-65;<mod(X,4)div(X,4)>#end#local O=union{Q("ABEFUQWS")Q(// RON
"WSXTLOJN")}Q("JNKLCGCD")union{O}union{O translate 3*x}light_source{x 1}//PARKER


Post a reply to this message

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