Bug Description
When using pt.Table.from_table_specs() with a low-stroke (backspin) and low-speed shot, the ball exhibits abnormal behavior / "replay" motion.
Expected Behavior
The ball should move smoothly from A → B → C → D → E ... in a continuous sequence.
Actual Behavior
The ball motion appears to "replay" or "jump back" midway. For example:
A → B → C → D → B → C → D → E (suddenly repeats previous segments)
Note: This issue does NOT occur when using pt.Table.default(). Everything works fine with default table.
Code to Reproduce
import pooltool as pt
import numpy as np
# Create table using from_table_specs (causes the bug)
table_specs = pt.objects.BilliardTableSpecs(l=2.57, w=1.28)
table = pt.Table.from_table_specs(table_specs)
# Setup balls
balls = {
"cue": pt.Ball.create("cue", xy=(table.w/2, table.l * 0.3)),
"1": pt.Ball.create("1", xy=(table.w/2, table.l * 0.6)),
}
cue = pt.Cue(cue_ball_id="cue")
shot = pt.System(table=table, balls=balls, cue=cue)
# Low-stroke + low-speed shot
shot.cue.set_state(V0=3.0, phi=90, a=0.0, b=-0.6)
# Simulate and visualize
pt.simulate(shot, inplace=True)
pt.show(shot)
<!-- Failed to upload "BUG.mp4" -->
Bug Description
When using
pt.Table.from_table_specs()with a low-stroke (backspin) and low-speed shot, the ball exhibits abnormal behavior / "replay" motion.Expected Behavior
The ball should move smoothly from A → B → C → D → E ... in a continuous sequence.
Actual Behavior
The ball motion appears to "replay" or "jump back" midway. For example:
A → B → C → D → B → C → D → E (suddenly repeats previous segments)
Note: This issue does NOT occur when using
pt.Table.default(). Everything works fine with default table.Code to Reproduce