POV-Ray : Newsgroups : povray.binaries.scene-files : Making functions for natural cubic splines : Re: Making functions for natural cubic splines Server Time
25 Apr 2024 19:58:03 EDT (-0400)
  Re: Making functions for natural cubic splines  
From: Bald Eagle
Date: 8 Oct 2014 23:10:00
Message: <web.5435fb975b2bbe7b5e7df57c0@news.povray.org>
Something caught my eye right away as I looked through some of this.

  function(t_) {
    select(t_ - tt[0], 1, 0, 0)*ff[0](t_) +
    #local I = 0;
    #while (I <= N - 1)
      select(t_ - tt[I], 0, select(t_ - tt[I+1], 1, 0))*ff[I](t_) +
      #local I = I + 1;
    #end // while
    select(t_ - tt[N], 0, 1, 1)*ff[N-1](t_)
  }

It appear(ed)(s) that those "+" operators are just hanging off the edges ...

Does it work by having the first result of SELECT added to the contents of the
loop, which itself is a concatenation of SELECT results?
That's pretty crazy and I might need an adult beverage to even begin how it is
that you came up with that.
Not that I didn't let out a few whistles looking over some of those other
methods.

Constants reminders of
(a) why I should have stuck with and went into writing computer software
and
(b) I should have definitely taken more math.

:D


Post a reply to this message

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