实验截图如下:实验代码如下:#includestdio.h#includegraphics.hintmain(){intgdriver=DETECT,gmode,i,a[4],b[4];floatt,x,y;printf(inputfourpoints\n);for(i=0;i4;i++)scanf(%d%d,&a[i],&b[i]);initgraph(&gdriver,&gmode,C:\\TC20\\bgi);setcolor(12);for(i=0;i3;i++)line(a[i],b[i],a[i+1],b[i+1]);for(t=0.000;t=1.00;t+=0.001){y=(1-t)*(1-t)*(1-t)*b[0]+3*(1-t)*(1-t)*t*b[1]+3*(1-t)*t*t*b[2]+t*t*t*b[3];x=(1-t)*(1-t)*(1-t)*a[0]+3*(1-t)*(1-t)*t*a[1]+3*(1-t)*t*t*a[2]+t*t*t*a[3];putpixel((int)(x+0.5),(int)(y+0.5),50);}getch();closegraph();return1;}