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

Batch operation #53

Open
erdo100 opened this issue Dec 21, 2024 · 1 comment
Open

Batch operation #53

erdo100 opened this issue Dec 21, 2024 · 1 comment

Comments

@erdo100
Copy link

erdo100 commented Dec 21, 2024

Cool tool. I am really surprised what is possible within the browser. Your physics work quit good. Therefore congrats.
I tried to use your tool but due to my poor programming skills, actually I never heard about TypeScript, I was not able to compile on my PC. I tried to install everything, but after now 2 days I lost my faith and I am asking me whether the tool can do what I need. Therefore some questions, which would eventually bring back my motivation to dig in.

Where could I setup a batch operation mode where I can define for different shot parameters (e.g. shot speed, direction, cue hit point on ball) a probability density?
Would it be possible to store the shot definitions and then generate the shots and store the resulting routes.

PS: Just saw that you have used a Night Café video as reference 💯

@tailuge
Copy link
Owner

tailuge commented Dec 21, 2024

Thanks. It should be possible to set up a position and try many different shots (like for a computer turn in a game)

    const a = new Ball(new Vector3(0, 0, 0))
    const b = new Ball(new Vector3(2.01 * R, 0, 0))
    const c = new Ball(new Vector3(4.02 * R, 0, 0))
    a.vel.x = -2.0
    a.state = State.Sliding
    const table = new Table([a, b, c])
    table.advance(t)

Then you would have to change the initial velocity and run it again and again. You would need to know typescript or be very good at getting ChatGPT to code it for you :) Currently it does not record the resulting routes but that could be done. An easy way to experiment with this project is to open it in github codespace

Good luck!

There is a good python project more suited to experiments:

https://github.com/ekiefl/pooltool

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

2 participants