Ricochet of moving / rotating block off a wall

In summary, the conversation discusses the creation of a 2D physics simulation involving objects bouncing off solid surfaces without gravity. The objects have constant rotation and translation, and the goal is to determine the formula for calculating their position after colliding with a wall. Factors such as elasticity and angular velocity are also considered. The conversation concludes with a confirmation of the simulation's accuracy and a suggestion to use the moment of inertia for more accurate results.
  • #1
DigitalPenman
4
0
Thank you in advance for your help!

The title pretty much says it all. I'm looking to write a 2D physics sim in which various objects can bounce off solid surfaces (without gravity). The objects are rotating and translating at a constant rate. We are dealing only with x and y - not z.

Let's take a rectangular block with these data:
mass = 'm'
width = 'w'
height = 'h'
center = 'cx, cy' (simply w/2, h/2)
rot = 'θ' (around the origin cx,cy in degrees)
slope = 'sx', 'sy' (speed and direction of travel)

say one corner of this rectangle is x0, y0 just before the point of impact. What formula could describe this scenario where x1, y1 is the same corner during impact?
i.e. x1 = ...
y1 = ...
Please feel free to fill in any missing data that I may need.
 
Physics news on Phys.org
  • #2
What formula could describe this scenario where x1, y1 is the same corner during impact?
I don't understand that question.

Here are some hints:
Momentum is conserved.
Angular momentum around the point of collision is conserved.
Neglecting friction, momentum transfer will occur perpendicular to the surface only.
Do you have elastic collisions? If yes, energy is conserved.
 
  • #3
mfb said:
I don't understand that question.

Here are some hints:
Momentum is conserved.
Angular momentum around the point of collision is conserved.
Neglecting friction, momentum transfer will occur perpendicular to the surface only.
Do you have elastic collisions? If yes, energy is conserved.
I understand that elasticity in the objects is a factor. Let us simply assume that the wall has elasticity 'We' and the object has an elasticity 'Oe'.

If the object is in motion i.e. every point on the object is incremented by x = 'sx' and y = 'sy' and then the object rotates around its center point (cx, cy) by a rotation of θ, this can be defined by:

x' = cx + (x - cx)cosθ + (y - cy)sinθ + sx
y' = cy + (y - cy)cosθ - (x - cx)sinθ + sy

Any arbitrary x,y point on the rectangle is rotated and translated with this formula which works fine. My problems is when this object hits a wall and new values for θ, sx and sy must be computed.

Please feel free to add required variables.
 
  • #4
DigitalPenman said:
I understand that elasticity in the objects is a factor. Let us simply assume that the wall has elasticity 'We' and the object has an elasticity 'Oe'.
Are you sure that you want to use elastic materials? That will complicate the required computations a lot.

My problems is when this object hits a wall and new values for θ, sx and sy must be computed.
See my previous post.

And in addition to the current angle θ, you need an angular velocity.
 
  • #5
I guess I shouldn't say elasticity. Basically, any minimal complexity variable so that the object can ricochet off the wall and not just stop when it hits the wall. I guess a good way to put it would be a solid object ricocheting off a solid wall in 2D space with no gravity.

Sorry, I forgot to say that the angle θ is actually incremented by an angular velocity 'av'. in a prior step. also, sx, sy would have to be incremented by some value on each step or the object wouldn't move say sx0, sy0. The whole thing would be:

loop{
θ = θ + av

x' = cx + (x - cx)cosθ + (y - cy)sinθ + sx
y' = cy + (y - cy)cosθ - (x - cx)sinθ + sy

sx = sx + sx0
sy = sy + sy0
}
 
  • #6
Elasticity is not what you think it is. It is just conservation of momentum you're interested in. elasticity will deform the object and it's nonconserving, so in the end your objects will stop moving.

When a solid square with known translational and angular velocity hits a wall with one of it's corners, then use the conservation equations to calculate the new angular and translational velocity. Just draw a free body diagram for this situation for a better understanding.
 
  • #7
Wow, thanks a million! The application seems to simulate the new rotation after the collision very naturally now.

Please see if this can be confirmed:

L = r x p for angular velocity, in my case:

r = (r1,r2) ==> (r1, r2) being the vector from the center (cx, cy) of the object to the point which has collided with the wall: x,y.
r1 = cx - x and r2 = cy - y.

p = mv which in my case is the vector p = (p1,p2) where p1 = m(sx), p2 = m(sy). sx and sy define the velocity of the object. I simply use an arbitrary mass of m which I added as an extra specification for an object.

so L = new rotation = r x p would be

L = new rotation = (cx - x)(m(sy)) - (cy-y)(m(sx)) using the cross product.
 
  • #8
Be aware that your approach is an approximation. It is not suited for the case where objects turn around their own center. For instance, you can use it for the rotation of the Earth around the sun, but not for the rotation of the Earth around its own axis.
Then you should use
L = Iw,
with I the moment of inertia and w the angular velocity.
Of course, some simple tests (first with angular velocity zero) can show you that your simulation works. Always try to find a case with a known solution that you can simulate.
 

1. How does the angle of the block affect the direction of the ricochet?

The angle of the block plays a crucial role in determining the direction of the ricochet. When the block hits the wall at a shallow angle, it will undergo a larger change in direction compared to when it hits the wall at a steeper angle.

2. What factors influence the speed of the ricochet?

The speed of the ricochet is influenced by several factors, such as the initial velocity of the block, the angle at which it hits the wall, and the elasticity of the block and the wall. The greater the initial velocity and the more elastic the materials, the faster the ricochet will be.

3. Can the shape of the block affect its ricochet trajectory?

Yes, the shape of the block can definitely affect its ricochet trajectory. A block with a flat surface will typically have a more predictable trajectory compared to a block with an irregular shape or protrusions.

4. What is the relationship between the mass of the block and the ricochet?

The mass of the block does not have a direct influence on the ricochet trajectory, but it can affect the velocity and momentum of the block before and after the ricochet. A heavier block will require more force to move and may have a different trajectory compared to a lighter block with the same initial conditions.

5. Can the surface of the wall affect the ricochet of the block?

Yes, the surface of the wall can affect the ricochet of the block. A smooth and flat wall will typically result in a more predictable ricochet compared to a rough or curved wall. Additionally, the material of the wall can also affect the elasticity and ultimately the speed of the ricochet.

Similar threads

Replies
6
Views
13K
  • Programming and Computer Science
Replies
2
Views
1K
Replies
4
Views
11K
Back
Top