<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_spline_8h">
<title>/Users/bernard/b20/bsoft/include/spline.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/spline.h</primary></indexterm>
<para>

<para>Header file for spline interpolation. </para>
 
</para>
<programlisting>#include &quot;Vector3.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_class_vector3">Vector3</link>&lt; double &gt; * <link linkend="_spline_8h_1ae19ad80428de72b33a020989ff71276e">vector3_catmull_rom_spline</link> (long ncoord, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; *coords, long &amp;nspline)</para>

<para>Calculates a 2D/3D spline curve using the Catmull-Rom algorithm. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Header file for spline interpolation. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20020808 </para>

<para>Modified: 20151023 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_spline_8h_1ae19ad80428de72b33a020989ff71276e"/>    <section>
    <title>vector3_catmull_rom_spline()</title>
<indexterm><primary>vector3_catmull_rom_spline</primary><secondary>spline.h</secondary></indexterm>
<indexterm><primary>spline.h</primary><secondary>vector3_catmull_rom_spline</secondary></indexterm>
<para><computeroutput><link linkend="_class_vector3">Vector3</link>&lt;double&gt;* vector3_catmull_rom_spline (long ncoord, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; * coords, long &amp; nspline)</computeroutput></para><para>

<para>Calculates a 2D/3D spline curve using the Catmull-Rom algorithm. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>ncoord</entry>
                                <entry>
<para>number of coordinates. </para>
</entry>
                            </row>
                            <row>
                                <entry>*coords</entry>
                                <entry>
<para>node or point coordinates. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;nspline</entry>
                                <entry>
<para>pointer to number of values in spline curve. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para><link linkend="_class_vector3">Vector3&lt;double&gt;</link>* spline curve. <literallayout><computeroutput>A Catmull-Rom spline curve is defined for 4 points {p0,p1,p2,p3} by:
    spline = 0.5*(-t*(1-t)^2)*p0 + (2-5*t^2+3*t^3)*p1 +
             t*(1+4*t-3*t^2)*p2 - t^2*(1-t)*p3
where 0 &lt;= t &lt;= 1 is the fractional distance between points p1 and p2.
Each dimension is interpolated separately.
The end segments of the spline are defined as straight lines.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 33 of file spline.cpp.</para>
</section>
</section>
</section>
