POV-Ray : Newsgroups : povray.beta-test : Spline: Cannot copy identifier Server Time
30 Jul 2024 16:18:12 EDT (-0400)
  Spline: Cannot copy identifier (Message 1 to 7 of 7)  
From: ingo
Subject: Spline: Cannot copy identifier
Date: 10 Oct 2001 11:01:19
Message: <Xns9136AD2824CB5seed7@povray.org>
The scene below results in:

#declare A=Spl <----ERROR

Parse Error: Cannot copy identifier

---%<------%<---
#declare Spl=spline{
   linear_spline
   0/4,< 0   , 0  , 0>  
   1/4,< 0.25, 0.5, 0>  
   2/4,< 0.50, 0.1, 0>
   3/4,< 0.75, 0.9, 0>  
   4/4,< 1   , 0  , 0>  
}

#declare A=Spl(0.3);
---%<------%<---


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Bob H 
Subject: Re: Spline: Cannot copy identifier
Date: 10 Oct 2001 15:55:37
Message: <3bc4a7b9@news.povray.org>
How about #declare A(0.3)=Spl(0.3)?

Actually I'm only replying to point out that in the HTML Help section 6.1.9
Spline Identifiers there is a "quadratc_spline" mispelling (no i).  That,
and how both catmull_rom_spline and b_spline are no longer mentioned yet
still work apparently.  Were those supposed to be removed?  Seems I remember
talk of those changes or something.

Bob H.

"ingo" <ing### [at] homenl> wrote in message
news:Xns### [at] povrayorg...
> The scene below results in:
>
> #declare A=Spl <----ERROR
>
> Parse Error: Cannot copy identifier
>
> ---%<------%<---
> #declare Spl=spline{
>    linear_spline
>    0/4,< 0   , 0  , 0>
>    1/4,< 0.25, 0.5, 0>
>    2/4,< 0.50, 0.1, 0>
>    3/4,< 0.75, 0.9, 0>
>    4/4,< 1   , 0  , 0>
> }
>
> #declare A=Spl(0.3);
> ---%<------%<---
>
>
> Ingo
>
> --
> Photography: http://members.home.nl/ingoogni/
> Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Bob H 
Subject: Re: Spline: spline, spline (no spline)
Date: 10 Oct 2001 16:00:17
Message: <3bc4a8d1$1@news.povray.org>
"Bob H." <omn### [at] msncom> wrote in message
news:3bc4a7b9@news.povray.org...
> and how both catmull_rom_spline and b_spline are no longer mentioned yet
> still work apparently.  Were those supposed to be removed?  Seems I
remember
> talk of those changes or something.

Please forgive me  :-)  I went from thinking about sphere_sweep to spline to
fast and confused those two.  They don't share the same spline type, I knew
that before.

Bob H.


Post a reply to this message

From: Mark Wagner
Subject: Re: Spline: Cannot copy identifier
Date: 11 Oct 2001 00:05:00
Message: <3bc51a6c@news.povray.org>
ingo wrote in message ...
>#declare A=Spl(0.3);


Try

#declare A = 0+Spl(0.3);

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".

--
Mark


Post a reply to this message

From: ingo
Subject: Re: Spline: Cannot copy identifier
Date: 11 Oct 2001 06:50:57
Message: <Xns913782B59E38Eseed7@povray.org>
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?


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Ron Parker
Subject: Re: Spline: Cannot copy identifier
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

From: Mark Wagner
Subject: Re: Spline: Cannot copy identifier
Date: 12 Oct 2001 00:19:59
Message: <3bc66f6f@news.povray.org>
ingo wrote in message ...
>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 is possible.  Use the following line:

#declare A=spline{Spl}

--
Mark


Post a reply to this message

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