POV-Ray : Newsgroups : povray.beta-test : crash during function creation in loop : Re: crash during function creation in loop Server Time
30 Jul 2024 06:28:40 EDT (-0400)
  Re: crash during function creation in loop  
From:
Date: 3 Jan 2002 09:13:40
Message: <4dp83ucg4vs4cakq15e9gb5gnaf4lh0rht@4ax.com>

wrote:

I played little more with this bug and found possible explanation. The problem
is probably here:

>        #local G=function{f_sphere(x-X,y-Y,z-Z,R)};
>        G(x,y,z)

I redefined function during parsing of outer function.
I found it becouse my workaround works fine (when function is not overwriten)

  function{
    #local S=seed(0);
    #local N=3;
    #local A=array[N];
    #local C=0;
    #while (C<N)
      #local X=rand(S);
      #local Y=rand(S);
      #local Z=rand(S);
      #local R=.1+rand(S)/5;
      #local A[C]=function{f_sphere(x-X,y-Y,z-Z,R)};
      #if(C>0)
        & A[C](x,y,z)
      #else
        A[C](x,y,z)
      #end
      #local C=C+1;
    #end
  }

ABX


Post a reply to this message

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