POV-Ray : Newsgroups : povray.unofficial.patches : Suggestions for spline function implementation : Suggestions for spline function implementation Server Time
2 Sep 2024 00:19:23 EDT (-0400)
  Suggestions for spline function implementation  
From: Fabien Mosen
Date: 22 Jul 2000 10:59:15
Message: <3979B575.F3DBCCD5@skynet.be>
[note : this is a user's point of view, I am totally unable to get 
 my hands on the actual c code.  These suggestions comes from an 
 (unsuccessfull) attempt to make a special (but logical) use of the 
 spline function.]
 
Problems with the current implementation : 

 - The name of the splines are defined as a string inside the spline 
   definition.  This is inconsistent within POV-Ray syntax, and does 
   not allow redefinition of a spline (a new spline with the same 
   name).  Thus, it does not allow the algorithmic generation of 
   multiple splines.
   
 - Unability to "extract" values of the control points (for example, 
   if I want to put a sphere at each control point)
   
What would be a nice syntax ?

 - the spline's data would be stocked into an ordinary declared array 
   of points 
 
      #declare MySpline = array[N]{Pt1, Pt2, Pt3,.. PtN}
 
   this would allow both easy redefinition of data and extraction of 
   data for other purposes than splines.  Also, it would be consistent 
   with common syntax.
 
 - points on the spline would be retrieved by a function : 
 
    #declare Point = 
     eval_3D_spline (Identifier,[options : natural..],Position)
 
   this allows using different options at different times, using the 
   same data.
   
And also :                  

 - suppress the 2D spline function, the user just have to declare 
   points with one of the vector components set at 0.
 - suppress the "spline {..}" function, it became useless.
 
Cheers,
Fabien.


Post a reply to this message

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