Hermite Curves
In the mathematical subfield of numerical analysis a cubic Hermite spline, named in honor of Charles Hermite (Hermite is pronounced air MEET), is a third-degree spline with each polynomial of the spline in Hermite form. The Hermite form consists of two control points and two control tangents for each polynomial.
On each subinterval, given a starting point p0 and an ending point p1 with starting tangent m0 and ending tangent m1, the polynomial can be defined by

where t varies from 0 to 1 inclusive. The four Hermite basis functions can be defined as



#include <conio.h>
#include <graphics.h>
#include <iostream.h>
struct point
{
int x,y;
}*p;
void main()
{
int gd=DETECT,gm=VGAHI;
initgraph(&gd,&gm,"");
cout<<"Enter control points ";
p=new point[4];
for (int i=0;i<4;i++)
{
cout<<"Enter point P"<<i<<"(x,y)";
cin>>p[i].x>>p[i].y;
}
for (float u=0;u<=1;u+=.001)
{
float x,y;
x=(2*u*u*u-3*u*u+1)*p[0].x+(-2*u*u*u+3*u*u)*p[1].x+(u*u*u-2*u*u+u)*p[2].x+(u*u*u-u*u)*p[3].x;
y=(2*u*u*u-3*u*u+1)*p[0].y+(-2*u*u*u+3*u*u)*p[1].y+(u*u*u-2*u*u+u)*p[2].y+(u*u*u-u*u)*p[3].y;
putpixel(x+getmaxx()/2,getmaxy()/2-y,7);
}
getch();
}