Hmm, this is a nice problem; the thing is, a good solution (that is, one that looks and feels just like real physics) is by nature one that uses real physics. Luckily, most of the newtonian physics within this problem can be easily simplified. Pardon me if I get overly verbose, but physics tends to do that to you So, to define the problem, this is an elastic (as in, no energy is absorbed) collision between an arkanoid ball and a paddle.
First of all, since you've obviously got the vertical motion down, I won't concern myself with that. So what follows is all on the horizontal components of the collsions The paddle transfers a certain amount of horizontal momentum to the ball (although, since this is Arkanoid physics, the paddle loses no momentum itself :P). This can be recieved in two ways -- by making the ball spin, and by giving the ball some horizontal momentum (obviously, if the ball already has horizontal momentum or spin, the added momentum will be...well, added) delta momentum + delta angular momentum = momentum paddle gave Of course, it might be annoying to work with momenta, since you don't really have to.
I would asssume that the ball and the paddle have constant mass (that is, the ball does not suddenly become heavier, although you could easily work with that), because then you could factor the mass of each out of your momentum equations. So then delta horizontal velocity + delta angular velocity = paddle velocity * mass of paddle / mass of ball To get an equation you could use out of this, you have to set how much of the momentum from the paddle would go into the spin, and how much would go into ball movement. For example mass_factor = 2 # ratio between paddle and ball masses angular_factor = 0.3 # the amount of the paddle's movement which will go into the ball's spin # and now for the bouncy-bouncy ball.
HVel += (1 - angular_factor) * paddle. HVel * mass_factor * friction or whatever ball. Spin += angular_factor * paddle.
HVel * mass_factor * friction or whatever ball. VVel = - ball. VVel # of course, its vertical velocity reverses This will be enough to set up a quasi-realistic bounce, but one nugget remains (which you don't need to adress, but adressing it would make your Arkanoid amazing) -- what happens to all that spin?
Can the spin be used somehow for more interesting bounces? So, to recap, your spin is the speed at which the periphery of the ball is moving relative to the center. Thing is, whenever a spinning ball bounces against something stationary, its spin changes as well as its velocity.
If a spinning ball hits a stationary surface, the bal gets a little "kick" in the direction opposite that of its spin (if spin is measured at the point of contact), and the spin will change Upon collision with a surface (assumed horizontal, with the ball above the surface) ball. HVel += -(ball. Avel * rate) # Where "rate" is hte ratio which determines how much angular velocity decays with each bounce ball.
Avel *= 1 - rate # So the angular velocity decays properly Since angular velocity is rotationally symmetric, you would just treat collisions at different angles (balls on walls, balls on ceilings) as rotations of this Phew, that was unintentionally long-winded, and it is nowhere near complete, but it's enough to answer your question IMHO.
Hmm, this is a nice problem; the thing is, a good solution (that is, one that looks and feels just like real physics) is by nature one that uses real physics. Luckily, most of the newtonian physics within this problem can be easily simplified. Pardon me if I get overly verbose, but physics tends to do that to you.So, to define the problem, this is an elastic (as in, no energy is absorbed) collision between an arkanoid ball and a paddle.
First of all, since you've obviously got the vertical motion down, I won't concern myself with that. So what follows is all on the horizontal components of the collsions. The paddle transfers a certain amount of horizontal momentum to the ball (although, since this is Arkanoid physics, the paddle loses no momentum itself :P).
This can be recieved in two ways -- by making the ball spin, and by giving the ball some horizontal momentum (obviously, if the ball already has horizontal momentum or spin, the added momentum will be...well, added). Delta momentum + delta angular momentum = momentum paddle gave Of course, it might be annoying to work with momenta, since you don't really have to. I would asssume that the ball and the paddle have constant mass (that is, the ball does not suddenly become heavier, although you could easily work with that), because then you could factor the mass of each out of your momentum equations.
So then, delta horizontal velocity + delta angular velocity = paddle velocity * mass of paddle / mass of ball To get an equation you could use out of this, you have to set how much of the momentum from the paddle would go into the spin, and how much would go into ball movement. For example, mass_factor = 2 # ratio between paddle and ball masses angular_factor = 0.3 # the amount of the paddle's movement which will go into the ball's spin # and now for the bouncy-bouncy ball. HVel += (1 - angular_factor) * paddle.
HVel * mass_factor * friction or whatever ball. Spin += angular_factor * paddle. HVel * mass_factor * friction or whatever ball.
VVel = - ball. VVel # of course, its vertical velocity reverses This will be enough to set up a quasi-realistic bounce, but one nugget remains (which you don't need to adress, but adressing it would make your Arkanoid amazing) -- what happens to all that spin? Can the spin be used somehow for more interesting bounces?
So, to recap, your spin is the speed at which the periphery of the ball is moving relative to the center. Thing is, whenever a spinning ball bounces against something stationary, its spin changes as well as its velocity. If a spinning ball hits a stationary surface, the bal gets a little "kick" in the direction opposite that of its spin (if spin is measured at the point of contact), and the spin will change.
#Upon collision with a surface (assumed horizontal, with the ball above the surface) ball. HVel += -(ball. Avel * rate) # Where "rate" is hte ratio which determines how much angular velocity decays with each bounce ball.
Avel *= 1 - rate # So the angular velocity decays properly Since angular velocity is rotationally symmetric, you would just treat collisions at different angles (balls on walls, balls on ceilings) as rotations of this. Phew, that was unintentionally long-winded, and it is nowhere near complete, but it's enough to answer your question IMHO.
Thank you for such a detailed answer! Hopefully ill get some free time to have a go at implementing these principles in the next couple of weeks, am I ok to comment here with any questions? Thanks.
– Stowelly Nov 15 at 11:57.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.