POV-Ray : Newsgroups : povray.general : Bezier-Spline-Macro-Set available! : Bezier-Spline-Macro-Set available! Server Time
6 Aug 2024 10:22:13 EDT (-0400)
  Bezier-Spline-Macro-Set available!  
From: Tim Nikias
Date: 28 Mar 2002 18:31:26
Message: <3CA3A7D5.DD15C6D0@gmx.de>
In case anyone's interested:
I've added a new section to my homepage, cleverly entitled
"Downloads". You'll find a set of macros used to calculate
positions on cubic-bezier-splines, using a very simple
approach:
Use a 1D-Array, fill with pairs of vectors:
A node and a direction. At least two pairs, and you've got
yourself a nice BSpline!

Example:
#declare Spline_Nodes=array[4]
{
 <-2,0,0>,<0, 1,0>, //Node 1 and Corresponding Direction
 < 2,0,0>,<0,-1,0> //Node 2 and its direction
}

sphere{BSpline_Pos(Spline_Nodes,clock),.2 pigment{rgb 1}}

Ah well, some more macro-sets will soon follow (though the "soon"
was put there, its just a hope, no guarantee... ;-)

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html


Post a reply to this message

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