POV-Ray : Newsgroups : povray.general : Spline vector function : Re: Spline vector function Server Time
24 Apr 2024 16:44:49 EDT (-0400)
  Re: Spline vector function  
From: clipka
Date: 19 Nov 2016 14:55:34
Message: <5830ae36$1@news.povray.org>
Am 19.11.2016 um 19:37 schrieb John Greenwood:

> #declare Place = function {
>   spline {
>     linear_spline
> //    -4, <-10,0,-2>
>     -2, <0,0,-1>
>     0, <1,0,0>
>     2.0, <0,1,1>
>     }
>   }
[...]
> This seems to work but if I add another point by deleting the // I get an error
> which does not make sense (to me).

It's not a bug, it's a feature.

Re-formatting gives the following code:

  #declare Place = function {
    spline {
    linear_spline
      -4, <-10,0,-2>-2,
      <0,0,-1> 0,
      <1,0,0> 2.0,
      <0,1,1>
    }
  }

Since `<-10,0,-2>-2` is a valid vector expression, that's how POV-Ray
will interpret it.

Using more commas should fix the ambiguity of the code and thus solve
the problem.


Post a reply to this message

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