POV-Ray : Newsgroups : povray.advanced-users : Help needed! Forest memory problems : Re: Help needed! Forest memory problems - I give up! Server Time
29 Jul 2024 10:22:19 EDT (-0400)
  Re: Help needed! Forest memory problems - I give up!  
From: Greg M  Johnson
Date: 20 Dec 2002 22:14:31
Message: <3e03dc97$1@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote in message
news:3e030164$1@news.povray.org...


> Hmm... my code doesn't quite look like that. I do this:
>
> #declare Mesh = #include "mesh.inc"
>
> #declare Forest =
>     union {
>         #local nTree = 0;
>         #while (nTree < 8000)
>             object { Mesh transform { ... } }
>
>             #local nTree = nTree + 1;
>         #end
>     }
>

Is the problem in the way you're re-including the file each time.

**I** would do it this way:

Have a "mesh.inc" which does a
    #declare TREE= mesh{....}

Then in your main file at the beginning have a single
#include"mesh.inc"

then in your macro say object{TREE transform{...}}

I don't know of a design benefit for calling it the way you do....


Post a reply to this message

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