Link
I'm fan of Poolology but i hate math, if you are same as me this tool might save your time.
This website is mobile friendly.
Any suggestions or comments to improve the calculator are welcome.
Link
I'm fan of Poolology but i hate math, if you are same as me this tool might save your time.
This website is mobile friendly.
Any suggestions or comments to improve the calculator are welcome.
Don't know how difficult this would be to implement, but...
Have you seen how the Break Speed app allows the user to tell the app where he has placed the cue ball for the break?
A similar technique could allow the Poolology user to show the locations of the OB and the CB and indicate the target pocket.With this information, the app would be able to determine the proper overhang.
Already thought of that, and my programming buddy is working on it. I told him not to include any actual alignment values or position lines on the table in the app or I'd have to put a price on it because it would basically be a virtual copy of the book. I would like the app to be free. Like zxzlsh's web calculator, it'll be a great workable tool for those interested.
# calc_aim: calculate the percent overhang given x,y coordinates of the cue ball, object ball, target
# cb = Vector[x, y] absolute coordinates of cue ball
# ob = Vector[x, y] absolute coordinates of object ball
# p = Vector[x, y] absolute coordinates of pocket
def calc_aim( cb, ob, p )
#1) calculate the vector ob travels from ob to p
sv = (p - ob).normalize
#2) ghost ball (gb) is 1 ball diameter from ob in the opposite direction of sv
gb = ob + (sv*-1)*1.balls # 1.balls = 2.25"
#3) the shortest distance (d) from the ob to the line that passes through cb and gb
d = dist_line_to_point(cb, gb, ob)
#4) d / 1 ball diameter = % overhang
d / 1.balls
end
def dist_line_to_point( ep1, ep2, p)
# Line defined by two points:
# distance(P1, P2, (x0, y0)) = ( (y2-y1)*x0 - (x2-x1)*y0 + x2*y1 - y2*x1 ).abs / Math.sqrt( (y2-y1)**2 + (x2-x1)**2 )
# Where:
# P1 = a point on the line (x1, y1)
# P2 = a point on the line (x2, y2)
# (x0, y0) = the point we're finding the distance from the line
# https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
x0 = p[0]
y0 = p[1]
x1 = ep1[0]
y1 = ep1[1]
x2 = ep2[0]
y2 = ep2[1]
( (y2-y1)*x0 - (x2-x1)*y0 + x2*y1 - y2*x1 ).abs / Math.sqrt( (y2-y1)**2 + (x2-x1)**2 )
end
It's an easy calculation for a computer too! I cooked this up the other day, you can pass it along to your buddy. It's just straight geometry and doesn't take into account the physics of the shot (throw, english, etc).
Code:# calc_aim: calculate the percent overhang given x,y coordinates of the cue ball, object ball, target # cb = Vector[x, y] absolute coordinates of cue ball # ob = Vector[x, y] absolute coordinates of object ball # p = Vector[x, y] absolute coordinates of pocket def calc_aim( cb, ob, p ) #1) calculate the vector ob travels from ob to p sv = (p - ob).normalize #2) ghost ball (gb) is 1 ball diameter from ob in the opposite direction of sv gb = ob + (sv*-1)*1.balls # 1.balls = 2.25" #3) the shortest distance (d) from the ob to the line that passes through cb and gb d = dist_line_to_point(cb, gb, ob) #4) d / 1 ball diameter = % overhang d / 1.balls end def dist_line_to_point( ep1, ep2, p) # Line defined by two points: # distance(P1, P2, (x0, y0)) = ( (y2-y1)*x0 - (x2-x1)*y0 + x2*y1 - y2*x1 ).abs / Math.sqrt( (y2-y1)**2 + (x2-x1)**2 ) # Where: # P1 = a point on the line (x1, y1) # P2 = a point on the line (x2, y2) # (x0, y0) = the point we're finding the distance from the line # https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line x0 = p[0] y0 = p[1] x1 = ep1[0] y1 = ep1[1] x2 = ep2[0] y2 = ep2[1] ( (y2-y1)*x0 - (x2-x1)*y0 + x2*y1 - y2*x1 ).abs / Math.sqrt( (y2-y1)**2 + (x2-x1)**2 ) end
Why not do that?Already thought of that, and my programming buddy is working on it. I told him not to include any actual alignment values or position lines on the table in the app or I'd have to put a price on it because it would basically be a virtual copy of the book. I would like the app to be free. Like zxzlsh's web calculator, it'll be a great workable tool for those interested.
Why not do that?
Sent from my SAMSUNG-SM-N920A using Tapatalk