X = ((-t3+3*t2-3*t+1)*P1.X+(3*t3-6*t2+3*t)*P2.X+(-3*t3+3*t2)*P3.X+t3*P4.X);
Y = ((-t3+3*t2-3*t+1)*P1.Y+(3*t3-6*t2+3*t)*P2.Y+(-3*t3+3*t2)*P3.Y+t3*P4.Y);
P2.X = P3.X = - (((-t3+3*t2-3*t+1)*P1.X+t3*P4.X - X )/(-3*t2+3*t));
P2.Y = P3.Y = - (((-t3+3*t2-3*t+1)*P1.Y+t3*P4.Y - Y )/(-3*t2+3*t));