Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed collision detection during the simulation #154

Open
parazjx opened this issue Oct 28, 2024 · 0 comments
Open

Missed collision detection during the simulation #154

parazjx opened this issue Oct 28, 2024 · 0 comments

Comments

@parazjx
Copy link

parazjx commented Oct 28, 2024

Thanks for all the great works! The project has been a great help in verifying my theories about playing pool on daily play.

But sometimes I found the ball went through with other ball in EightBall game when i put cue ball in 1/4 place and others in 3/4 place.

First change position In pooltool/layouts.py:

def _get_eight_ball_rack:
...
blueprint = ball_cluster_blueprint(
seed=BallPos([], (0.5, 0.75), solids),
...
cue = BallPos([], (0.5, 0.25), {"cue"})

Then with the test code follow:

shot = pt.System(
    cue=pt.Cue(cue_ball_id="cue"),
    table=(table := pt.Table.default()),
    balls=pt.get_rack(
        pt.GameType.EIGHTBALL, table
    ),
)
shot.strike(V0=3.262213, phi=81.83468, theta=0, a= 0, b=0)
pt.simulate(shot, inplace=True)   
pt.show(shot)

图片

The magic number of V0 and phi are just copied when i shot by hand.
I am not sure which step caused the problem, wether the time calculation error when solving the equation or the omission when querying the transition event.

Thanks again for all great works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant