POV-Ray : Newsgroups : povray.general : help with splines Server Time
30 Apr 2024 14:09:43 EDT (-0400)
  help with splines (Message 11 to 11 of 11)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: help with splines
Date: 19 Dec 2010 21:10:00
Message: <web.4d0eb9b1464c1137c734aecd0@news.povray.org>
Jellby <me### [at] privacynet> wrote:
> Tor Olav Kristensen saw fit to write:
>
> > See my recent posts to povray.binaries.images and povray.text.scene-files
>
> Have you tried creating a new spline that is already arc-length-
> parametrized? Something like what's described here:
> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.9080&rep=rep1&type=pdf
>
> This seems a different method, but less appropriate for POV-Ray splines:
> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.84.1389&rep=rep1&type=pdf

Those are interesting articles, so thank you for the links.

I'll have to try out this later when I get some more spare time.

In the meantime it is possible to do something similar with the code I posted.
The code below shows one way to do this:

--
Tor Olav
http://subcube.com


#declare FnX_ = function(t_) { FnX(InverseSplineFn(t_)) };
#declare FnY_ = function(t_) { FnY(InverseSplineFn(t_)) };
#declare FnZ_ = function(t_) { FnZ(InverseSplineFn(t_)) };

#declare T_FnX_ = function(t_) { T_FnX(InverseSplineFn(t_)) };
#declare T_FnY_ = function(t_) { T_FnY(InverseSplineFn(t_)) };
#declare T_FnZ_ = function(t_) { T_FnZ(InverseSplineFn(t_)) };

#declare B_FnX_ = function(t_) { B_FnX(InverseSplineFn(t_)) };
#declare B_FnY_ = function(t_) { B_FnY(InverseSplineFn(t_)) };
#declare B_FnZ_ = function(t_) { B_FnZ(InverseSplineFn(t_)) };

#declare N_FnX_ = function(t_) { N_FnX(InverseSplineFn(t_)) };
#declare N_FnY_ = function(t_) { N_FnY(InverseSplineFn(t_)) };
#declare N_FnZ_ = function(t_) { N_FnZ(InverseSplineFn(t_)) };

#declare Intervals = 400;
#declare Knots = Intervals + 1;

#declare I = 0;
#while (I < Knots)
  #declare T = Start + I/Intervals*Span;
  object {
    SmallArrows
    matrix <
      T_FnX_(T), T_FnY_(T), T_FnZ_(T),
      B_FnX_(T), B_FnY_(T), B_FnZ_(T),
      N_FnX_(T), N_FnY_(T), N_FnZ_(T),
        FnX_(T),   FnY_(T),   FnZ_(T)
    >
  }
  #declare I = I + 1;
#end // while

--
Tor Olav
http://subcube.com


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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