|
|
|
|
|
|
| |
| |
|
|
From: Mark Hanford
Subject: Cannot Copy Identifier when using a spline{}?
Date: 17 Mar 2002 15:08:44
Message: <3c94f7cc@news.povray.org>
|
|
|
| |
| |
|
|
I have a simple spline set up which I was hoping to use for camera work...
Now the stuff in the while loop works, but the Camera_Location declaration
doesn't (this is used later to set the camera's location)
Upon parsing this, I get the error:
File: D:\Mark\Pov-Ray\projects\bug\bug.pov Line: 270
#declare Camera_Location1 = Camera_Path <----ERROR
Parse Error: Cannot copy identifier
//snip
#local Cam_Start = <-60, 70, -70>;
#local Cam_CockpitWindow = <-43.5, 34.5, -6.5>;
#declare Camera_Path=
spline{
natural_spline
-1, Cam_Start+(100*x)
0, Cam_Start
1, Cam_CockpitWindow
2, Cam_CockpitWindow+(100*x)
}
#local i=0; #while (i<1)
sphere{Camera_Path(i), 0.2 pigment{color rgbt <1,1,0,0.8>}}
#local i=i+0.03; #end
#declare Camera_Location = Camera_Path(0); //Camera_Path(clock);
//snip
I assume it's something daft, but I haven't spotted it :(
--
Mark Hanford
http://www.mrhanford.com/povray
Post a reply to this message
|
|
| |
| |
|
|
From: Mark Hanford
Subject: Re: Cannot Copy Identifier when using a spline{}?
Date: 17 Mar 2002 16:39:24
Message: <3c950d0c@news.povray.org>
|
|
|
| |
| |
|
|
Why can I do
#debug vstr(mySpline(pos), ...)
or
camera{ location mySpline(pos) ...}
but not
#declare MyVar = mySpline(pos);
???
thanks
--
Mark Hanford
http://www.mrhanford.com/povray
"Mark Hanford" <ren### [at] blueyondercouk> wrote in message
news:3c94f7cc@news.povray.org...
> I have a simple spline set up which I was hoping to use for camera work...
> Now the stuff in the while loop works, but the Camera_Location declaration
> doesn't (this is used later to set the camera's location)
>
> Upon parsing this, I get the error:
> File: D:\Mark\Pov-Ray\projects\bug\bug.pov Line: 270
> #declare Camera_Location1 = Camera_Path <----ERROR
> Parse Error: Cannot copy identifier
>
>
> //snip
> #local Cam_Start = <-60, 70, -70>;
> #local Cam_CockpitWindow = <-43.5, 34.5, -6.5>;
> #declare Camera_Path=
> spline{
> natural_spline
> -1, Cam_Start+(100*x)
> 0, Cam_Start
> 1, Cam_CockpitWindow
> 2, Cam_CockpitWindow+(100*x)
> }
>
> #local i=0; #while (i<1)
> sphere{Camera_Path(i), 0.2 pigment{color rgbt <1,1,0,0.8>}}
> #local i=i+0.03; #end
>
> #declare Camera_Location = Camera_Path(0); //Camera_Path(clock);
> //snip
>
>
> I assume it's something daft, but I haven't spotted it :(
>
> --
>
> Mark Hanford
> http://www.mrhanford.com/povray
>
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3c950d0c@news.povray.org>,
"Mark Hanford" <ren### [at] blueyondercouk> wrote:
> Why can I do
> #debug vstr(mySpline(pos), ...)
>
> or
> camera{ location mySpline(pos) ...}
>
> but not
> #declare MyVar = mySpline(pos);
POV-Ray's parser (currently) isn't smart enough to figure out whether
you want a copy of mySpline or a point on it. In the other two examples,
it knows you are using vectors. Try this instead:
#declare MyVar = (mySpline(pos));
The parentheses get POV to treat it as a numeric expression, so it
evaluates the spline instead of trying to copy it.
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Mark Hanford who wrote:
>Why can I do
>#debug vstr(mySpline(pos), ...)
>
>or
>camera{ location mySpline(pos) ...}
>
>but not
>#declare MyVar = mySpline(pos);
>
>???
>thanks
I thought I remembered doing that sort of thing all the time, but it
turned out that I wasn't using raw splines, I was using spline functions
#declare Camera_Path=
function {
spline{
natural_spline
-1, Cam_Start+(100*x)
0, Cam_Start
1, Cam_CockpitWindow
2, Cam_CockpitWindow+(100*x)
}
}
#declare Camera_Location = Camera_Path(0); //Camera_Path(clock);
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
From: Mark Hanford
Subject: Re: Cannot Copy Identifier when using a spline{}?
Date: 18 Mar 2002 07:14:24
Message: <3c95da20$1@news.povray.org>
|
|
|
| |
| |
|
|
Isn't that a bug?
Surely these shouldn't be considered identical:
#declare myVar=mySpline //makes myVar a spline{}
#declare myVar=mySpline(32) //makes myVar equal <1,2,3>
--
Mark Hanford
http://www.mrhanford.com/povray
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
> In article <3c950d0c@news.povray.org>,
> "Mark Hanford" <ren### [at] blueyondercouk> wrote:
>
> > Why can I do
> > #debug vstr(mySpline(pos), ...)
> >
> > or
> > camera{ location mySpline(pos) ...}
> >
> > but not
> > #declare MyVar = mySpline(pos);
>
> POV-Ray's parser (currently) isn't smart enough to figure out whether
> you want a copy of mySpline or a point on it. In the other two examples,
> it knows you are using vectors. Try this instead:
> #declare MyVar = (mySpline(pos));
> The parentheses get POV to treat it as a numeric expression, so it
> evaluates the spline instead of trying to copy it.
>
> --
> Christopher James Huff <chr### [at] maccom>
> POV-Ray TAG e-mail: chr### [at] tagpovrayorg
> TAG web site: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
From: Thorsten Froehlich
Subject: Re: Cannot Copy Identifier when using a spline{}?
Date: 18 Mar 2002 07:39:55
Message: <3c95e01b@news.povray.org>
|
|
|
| |
| |
|
|
In article <3c95da20$1@news.povray.org> , "Mark Hanford"
<ren### [at] blueyondercouk> wrote:
> Isn't that a bug?
No.
Also note this is common in typeless languages.
Thorsten
____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg
I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
From: Mark Hanford
Subject: Re: Cannot Copy Identifier when using a spline{}?
Date: 18 Mar 2002 10:02:29
Message: <3c960185$1@news.povray.org>
|
|
|
| |
| |
|
|
I was confused by the manual
"To use a spline, you place the spline identifier followed by the parameter
(in parentheses) wherever you would normally put a vector, similar to a
macro. Splines behave exactly like three-dimensional vectors"
So apparently not quite like a macro or vector, after all...
--
Mark Hanford
http://www.mrhanford.com/povray
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3c95e01b@news.povray.org...
> In article <3c95da20$1@news.povray.org> , "Mark Hanford"
> <ren### [at] blueyondercouk> wrote:
>
> > Isn't that a bug?
>
> No.
>
> Also note this is common in typeless languages.
>
> Thorsten
>
> ____________________________________________________
> Thorsten Froehlich
> e-mail: mac### [at] povrayorg
>
> I am a member of the POV-Ray Team.
> Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|