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