POV-Ray : Newsgroups : povray.beta-test : Spline: Cannot copy identifier : Re: Spline: Cannot copy identifier Server Time
30 Jul 2024 18:21:53 EDT (-0400)
  Re: Spline: Cannot copy identifier  
From: Ron Parker
Date: 11 Oct 2001 08:53:17
Message: <slrn9sb5hu.cg1.ron.parker@fwi.com>
On 11 Oct 2001 06:50:57 -0400, ingo wrote:
>in news:3bc51a6c@news.povray.org Mark Wagner wrote:
>
>> Try
>> 
>> #declare A = 0+Spl(0.3);
>
>Ah, I tried #declare A = Spl(0.3)+<0,0,0>; as a work around that didn't 
>work. Yours does.
>
>> This tells the parser you are trying to declare a float or vector,
>> rather than trying to copy a spline.  I don't know why you get the
>> particular error message you do; my development version gives
>> "Expected: RValue to declare". 
>
>Shouldn't copying a spline be (made) possible?

It isn't that simple.  Like passing spline and function evaluations to macros,
it requires an extra token of lookahead, and the parser isn't made to be able
to handle that.

I do think splines and functions should have the same limitations, though, and
currently they do not.  Functions act one way and splines act the opposite way.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

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