POV-Ray : Newsgroups : povray.general : Spline vector function : Re: Spline vector function Server Time
25 Apr 2024 06:15:42 EDT (-0400)
  Re: Spline vector function  
From: omniverse
Date: 20 Nov 2016 10:35:01
Message: <web.5831c28cf8564a279c5d6c810@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 11/19/2016 02:55 PM, clipka wrote:
> > 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.

I see I replied less than 5 minutes after this was said, posting delay got me.

I just wanted to point something out. A comma after *every* vector is apparently
possible, I just hadn't actually said that before. I was surprised it didn't
cause a parse error.

Looking at the documentation, spline examples leave out the trailing commas but
the spline definition denotes them as optional (without final comma).

So to be sure other things don't allow a final comma, which is what I had
expected, I tried doing that with sor, lathe and sphere_sweep. Sure enough,
parse error. No doubt countless times I've dealt with this comma error thing in
the past.

I wonder if spline is the only thing allowing that last ,
And wondering if it makes more sense to allow that for everything listing
vectors or exclude the possibility. Of course I would have to lean toward
allowing it, thinking if sections of vector lists were generated externally and
added or subtracted somehow, else the error would occur.


Post a reply to this message

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