Open tybeady opened 4 years ago
Given (CueX,CueY), (ObjX,ObjY), θp(Cue trajectory), and R(radius of the balls):
deltaX = ObjX - CueX
deltaY = ObjY - CueY
DirectLineLength = sqrt(deltaX^2 + deltaY^2)
θd(Direct line between Object and Cue) = atan2(deltaY,deltaX)*180/PI
deltaθ(ContactAngle) = θd - θp
opposite the direct line is θc
Law of sines gives:
2R/sin(deltaθ) = DirectLineLength/sin(θc)
θc = asin((sin(deltaθ)*DirectLineLength)/2R)
θo (object ball trajectory) = 180 - θc + θp
This is my take on the base line math. hope this helps
We need code that will determine the projected trajectory of the object ball given the following: