POV-Ray : Newsgroups : povray.general : Bug with #macro and splines : Bug with #macro and splines Server Time
2 Jun 2024 17:24:52 EDT (-0400)
  Bug with #macro and splines  
From: Nicolas Alvarez
Date: 9 Sep 2004 19:17:48
Message: <4140e49c@news.povray.org>
I'm having a problem with the following file. No light_sources needed --
it's a language problem.

#declare RandStream=seed(0);

#macro RandomSpline(Movements,RS)
 #local Points=array[Movements];
 #local I=0;
 #while (I<Movements)
  #local Points[I]=<rand(RS),rand(RS),rand(RS)>;
  #local I=I+1;
 #end

 #local I=0;
 #local MySpline=spline
 {
  cubic_spline
  -(2/Movements), Points[Movements-2],
  -(1/Movements), Points[Movements-1],
  #while (I<Movements)
   (I/(Movements+1)), Points[I],
   #local I=I+1;
  #end
  1, Points[0],
  1+(1/Movements), Points[1]
 }

 MySpline
#end

#declare MySpline=RandomSpline(5,RandStream);

#debug str(MySpline(0),0,5)

If I render it, I get the following message:

    The POV-Ray core rendering code threw an unhandled exception.

    The backend thread has been shut down and you will not be able to
perform any further renders.

    It is STRONGLY RECOMMENDED that you save your work and exit POV-Ray
now.

    (Note that if internal structures have been damaged POV-Ray may crash
immediately after you click OK).

If I click OK, that message closes and I can't save the file anymore.

I have:
Windows 98 SE
Pentium II 400MHz
128MB RAM
POV-Ray 3.6.1.icl8.win32

--
- Nicolas Alvarez
nicolas [dot] alvarez [at] gmail [dot] com


Post a reply to this message

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