POV-Ray : Newsgroups : povray.general : Spline problem : Re: Spline problem Server Time
19 Nov 2024 18:21:08 EST (-0500)
  Re: Spline problem  
From: Christopher James Huff
Date: 19 Jan 2002 11:12:36
Message: <chrishuff-9C93D9.11132819012002@netplex.aussie.org>
In article <3c4990b9$1@news.povray.org>,
 "Andrew" <ast### [at] hotmailcom> wrote:

> OK, can someone tell me why this generates a parse error:
> 
> #declare Spline = spline {cubic_spline
>                            -2/13, <-1,0,0>
>                           -1/13, <0,0,0>
>                           0,     <1,0,0>
>                           1/13,  <5,0,0>
>                           2/13, <8,0,0>
>                           }

You don't have commas separating the items. POV-Ray doesn't care about 
spaces or separate lines, it sees:
                            -2/13, <-1,0,0>
                           -1/13, <0,0,0>
as:
-2/13, <-1,0,0> - 1/13, <0,0,0>

When you add in the parentheses, it sees:
-2/13, <-1,0,0> (-1/13), <0,0,0>
and can figure out that the "-1/13" is a separate value.

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

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