POV-Ray : Newsgroups : povray.general : spline question Server Time
7 Nov 2024 07:31:56 EST (-0500)
  spline question (Message 1 to 2 of 2)  
From: Alf Peake
Subject: spline question
Date: 7 Apr 2002 18:15:42
Message: <3cb0c50e@news.povray.org>
I wanted to store a vector from a spline in Temp but can't figure why
this doesn't work in v3.5 or megapov 0.7. What am I doing wrong?

Alf


//#version 3.5;
//#version unofficial MegaPov 0.7;

camera { location -4*z look_at 1 }
light_source {-10*z rgb 1 }

#declare Step = <0.5,0.5,0>;
#declare Count = 0;
// Make a path
#declare MySpl =
   spline{ linear_spline
   #while (Count<10)
      Count, Count*Step
   #declare Count=Count+1;
   #end
}

//#declare Temp = <0,0,0>; // Force type
sphere{ MySpl(2), 0.5 pigment{ rgb 1 } } // OK
#declare Temp = MySpl(2); // Error here

/*
version 3.5 says:
#declare Temp = MySpl( <----ERROR
Parse Error: Expected 'object or directive', ( found instead

MegaPov says:
error: cannot copy identifier
*/


Post a reply to this message

From: Alf Peake
Subject: Re: spline question
Date: 7 Apr 2002 18:53:47
Message: <3cb0cdfb@news.povray.org>
Just picked up pov 3.5 beta 16 and problem cured.

Alf


Post a reply to this message

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