sumber : http://mohsodq1608.wordpress.comvoid GambarKurvaBezier3(Graphics Img, int x1, int y1, int x2, int y2, int x3, int y3)
{
int Px,Py,Qx,Qy;
Px=x1;
Py=y1;
for (float t=0;t<=1;t+=0.00001)
{
Qx = (int)((Math.pow((1-t),2)*x1) + (2*(1-t)*t*x2) + (Math.pow(t,2)*x3));
Qy = (int)((Math.pow((1-t),2)*y1) + (2*(1-t)*t*y2) + (Math.pow(t,2)*y3));
Garis(Img, Px,Py,Qx,Qy);
Px=Qx;
Py=Qy;
}
Garis(Img, Px,Py,x3,y3);
}
1 comments:
tanks gan ane kebantu skali
Post a Comment