40 likes | 138 Views
v. t. v ||. v . a. Ballz. Ballz. v1par = (v1x * tx + v1y * ty) / d; v1per = (-v1x * ty + v1y * tx) / d; v2par = (v2x * tx + v2y * ty) / d; v2per = (-v2x * ty + v2y * tx) / d; vxf = (v2par * tx - v1per * ty) / d; vyf = (v2par * ty + v1per * tx) / d;. Ballz. t x. t y. d. Ballz.
E N D
v t v|| v a Ballz
Ballz v1par = (v1x * tx + v1y * ty) / d; v1per = (-v1x * ty + v1y * tx) / d; v2par = (v2x * tx + v2y * ty) / d; v2per = (-v2x * ty + v2y * tx) / d; vxf = (v2par * tx - v1per * ty) / d; vyf = (v2par * ty + v1per * tx) / d;
Ballz tx ty d
Ballz t’x t’y tx ty d pBall1->Move(-tx * ratio / 2, -ty * ratio / 2); pBall2->Move(tx * ratio / 2, ty * ratio / 2);