tailuge / billiards Goto Github PK
View Code? Open in Web Editor NEWbilliards physics in the browser
Home Page: https://tailuge.github.io/billiards/dist
License: GNU General Public License v3.0
billiards physics in the browser
Home Page: https://tailuge.github.io/billiards/dist
License: GNU General Public License v3.0
Hey @tailuge, I just wanted to say thank you for building this project. I’ve long been wanting to build an algorithm to suggest routes given the current set of balls. I found this project to implement the physics engine and debugging tools to be super convenient to play with my ideas.
Current status:
I’m able to place two balls randomly on the table and shot the other one in the pocket. Demo: https://vjeux.github.io/billiards/dist/diagrams.html
Next is to start building the route planning. I have an idea that I believe will work.
Some of the tweets from my hack session today:
So far it’s been dead simple to run and haven’t hit any bugs.
The only thing is that the spins don’t behave quite like the physical world. If I get far enough in my prototype I’ll give some more concrete repro, my hunch is that it’s going to be about tweaking the constants.
Han 2005 suggests e can be modelled as
e = 0.39 + 0.257*Vx-0.044*Vx^2 (eqn. 26)
https://www.wolframalpha.com/input?i=plot%280.39%2B0.257v-0.044v%5E2%2C+v+%3D+0+to+5%29+
In practice I found this to give unrealistic results and use e=0.86 as a constant.
How does this compare to https://github.com/ekiefl/pooltool implementation?
In this project Vx has maximum of 4.5
How do the following quantities compare to pooltool and Han2005
Constants and derived quantities
Mx,My = 0.000720
Mz = 0.000370
I = 0.000099
Max vel = 4.912500
Max rvel = 187.5000
g = 9.8
mu = 0.00985
muS = 0.105
rho = 0.025
m = 0.23
R = 0.03275
e = 0.86
In the description of Key equations,
rolling motion <-> sliding motion
in constants.ts
export const mu = 0.8
But, Moving friction is much larger than Rolling friction
It should not be one variable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.