Pink 0.9

lengthspline.c File Reference

computes the length of a spline which is specified by its control points in a text file More...


Detailed Description

computes the length of a spline which is specified by its control points in a text file

Usage: lengthspline spline.txt [out.list]

Description: Computes the length of a spline which is specified by its control points in a text file. The file format for spline.txt is the following for 2D:

c n+1 (where n+1 denotes the number of control points)
x1 y1
...
xn+1 yn+1
C0X1 C0Y1 C1X1 C1Y1 C2X1 C2Y1 C3X1 C3Y1
...
C0Xn C0Yn C1Xn C1Yn C2Xn C2Yn C3Xn C3Yn

and in the 3D case:

C n+1 (where n+1 denotes the number of control points)
x1 y1 z1
...
xn+1 yn+1 zn+1
C0X1 C0Y1 C0Z1 C1X1 C1Y1 C1Z1 C2X1 C2Y1 C2Z1 C3X1 C3Y1 C3Z1
...
C0Xn C0Yn C0Zn C1Xn C1Yn C1Zn C2Xn C2Yn C2Zn C3Xn C3Yn C3Zn

Types supported: spline 2D, spline 3D

Category: geo

Author:
Michel Couprie