Ha no, it should be though. I programmed it in before I knew what energy even was (by physics standards). I think its the magnitude of one of the balls velocity...can't remember.
Very good, this is the kind of program I'm trying to make.
I notice at 1:05 those 2 balls stick together as they go to the top right, as if they have coalesced.
I'm not sure how you set the frame rate cause if balls are moving fast, you can't plot them pixel by pixel, but need a gap.
Suppose frame rate was 10 frames per second, then every 0.1 secs you need to repaint screen, so you still need the mathematical description of the ball action
I've sent you a message if you want to read it. Thx
Yeah, the algorithm I use isn't exactly perfect I guess. Theres actually no pixel by pixel plotting going on (although the motion is simulated on a single point). All the collision detection and rebounding is calculated mathematically to estimate when in time a collision will occur.
Of course, all the code for this is really old and I wrote it before I understood the concept of documenting your code/leaving friendly comments.
Is there any friction between the balls and the background?
patrick1020000 2 months ago
maybe link of this program
MrRenar11 1 year ago
nice dude
enrichedd 1 year ago
My nuts hurt watching all these balls slap into each other
FrankRizzo6662 2 years ago
great work!
Chuechco93 2 years ago
Ha this is a great program. You could if you had the time make a game out it. Solving puzzles with a certain amount of balls :D
xxxOmnislashxx 2 years ago
Great program :) Is the enery on the top left total energy of all particles?
ceyceycey1 4 years ago
Ha no, it should be though. I programmed it in before I knew what energy even was (by physics standards). I think its the magnitude of one of the balls velocity...can't remember.
Seoryn 4 years ago
Very good, this is the kind of program I'm trying to make.
I notice at 1:05 those 2 balls stick together as they go to the top right, as if they have coalesced.
I'm not sure how you set the frame rate cause if balls are moving fast, you can't plot them pixel by pixel, but need a gap.
Suppose frame rate was 10 frames per second, then every 0.1 secs you need to repaint screen, so you still need the mathematical description of the ball action
I've sent you a message if you want to read it. Thx
cms271828 2 years ago
Yeah, the algorithm I use isn't exactly perfect I guess. Theres actually no pixel by pixel plotting going on (although the motion is simulated on a single point). All the collision detection and rebounding is calculated mathematically to estimate when in time a collision will occur.
Of course, all the code for this is really old and I wrote it before I understood the concept of documenting your code/leaving friendly comments.
btw, I don't think I got your message...
Seoryn 2 years ago