POV-Ray : Newsgroups : povray.general : Trouble parsing recursive macro : Re: Trouble parsing recursive macro Server Time
31 Jul 2024 08:32:32 EDT (-0400)
  Re: Trouble parsing recursive macro  
From: barton
Date: 28 Jul 2007 19:25:01
Message: <web.46abcf0a53db5e6e071738a0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> barton wrote:
>
> > I'm not stuck on recursion, although that seems to be the simplest way of
> > generating a structure of this type.
>
> Well, your branch factor is a whopping 10^3 = 1000 so obviously you
> are not going to achieve a great recursion depth with this approach.
> Are you stuck on the 10? Make the division count a parameter and
> play with it, e.g., a 5x5x5 cube would be a lot friendlier.

Yeah... the point of the exercise it to illustrate how big a billion is ;-)

>
> The recursive approach itself is not the problem, just that
> the object you are trying to build has a lot of components.
>
> As there are gaps on all levels, almost every box could contribute
> something to the output image. However, you might get away with
> skipping all inner cubes (i.e., only recurse if one of i,j,k is
> exactly 0 or 10), effectively reducing the branch factor to
> 10x10x10 - 8x8x8 = 488.

I'm definitely willing to give this a try... stupid question:

how do an 'or' in SDL? I would like to do something like this:

#if( i = 0 or j = 0 or k = 0 or i = 9 or j = 9 or k = 9)
  Cube(
    X+i*New_E,
    Y+j*New_E,
    Z+k*New_E,
    New_E, New_L
    )
#end


Post a reply to this message

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