


float x[21];

void Compute_x_Spline( int x0,  int x1,
					   float dx0, float dx1 )
{

	int step;
	float t, incr;

	float a = 2*x0 - 2*x1 + dx0 + dx1;
	float b = -3*x0 + 3*x1 - 2*dx0 - dx1;
	float c = dx0;
	float d = x0;

	step = 0;
	incr = 0.05f;
	t = 0;
	while( t<=1 )
	{
		x[step] = a*t*t*t + b*t*t + c*t + d;
		step += 1;
		t += incr;
	}// End while loop

}// End Compute_x_Spline(..)



xsetcolour(RED);
// Move to the first point on our new line
xmoveto( x[0], y[0] );
// Draw our new line with the curve
for( int i=1; i<20; i++ )
	xlineto( x[i], y[i] );


