Collision of an expanding disc with another disc.

In summary, Xavier's collision model is based on the conservation of momentum, but it is unclear how a disk that is expanding will still have a conserved momentum. To prevent the disks from expanding further, he calculates the velocity of the collision point at the circumference of the disks.
  • #1
Tipx
6
0
Hi,
Like a lot of people programming, I created a simplistic 2D collision engine. This engine handles the collisions of circles (I know I typed "disc" in the title, but I wanted to avoid replies like "circles don't really exist so they can't collide".)

The simulation is friction-less, so since the circles do not rotate initially, they never end up rotating. The collisions are also totally elastic and since there is no deformation, the collisions happen instantly. The detection model is an a-priori model. I want my engine to handles circles that expand or shrink.

It works fine with regular ("regular", opposed to "expanding" or "shrinking") circles, but when it comes to non-regular circles, I'm having an issue :
I can detect when the collision will occur, but I have no clues how to calculate the movement of the circles after the collision. I can't base the impact forces on the velocity of the circles since it's possible for 2 non-moving circles to collide if one (or both) of them expands.

I thought about taking into account the "radius growth speed" into the velocity, but that's just a wild guess. Anyone can steer me in the right direction?

Thanks,
Xavier
 
Physics news on Phys.org
  • #2
Your collision model is fundamentally based on the conservation of momentum... but from your post it is not clear how a moving, expanding disk has a conserved momentum. Does its density fall to keep its mass constant? At the point of collision, do you assume the disk is not expanding? (otherwise it would expand into the other disk!)
 
  • #3
Tipx said:
I thought about taking into account the "radius growth speed" into the velocity, but that's just a wild guess. Anyone can steer me in the right direction?
Sounds reasonable. You modify the velocity vector of the disc center with the radial velocity of the circumference due to explansion/shinking. The sum of both vectors gives you the velocity of the collision point at the discs circumference, used for the collision calculations.
 
  • #4
Oh, forgot to specify, sorry. The mass of the disk is deemed in the middle of the disk and remains constant through the expansion.

As for preventing the disk from further expanding when it collides : I though that since the collision is totally elastic, after any given collision, the 2 colliding disks will move away from each other at at-least the "Radius Growth speed". This is if I manage to take the radius growth speed into account. The following code is how I handle the collision for now. I'll mention the changes I plan to make after :

float collAMass = collidableA.Mass;
Vector2 collASpeed = collidableA.Speed;
float collAGrowth = collidableA.RadiusGrowth;

float collBMass = collidableB.Mass;
Vector2 collBSpeed = collidableB.Speed;
float collBGrowth = collidableB.RadiusGrowth;

// Center of Mass Speed
Vector2 cmSpeed = (collAMass * collASpeed + collBMass * collBSpeed) / (collAMass + collBMass);

Vector2 collAInitialRelativeSpeed = collASpeed - cmSpeed;
Vector2 collBInitialRelativeSpeed = collBSpeed - cmSpeed;

Vector2 collAParallelSpeed = Vector2Tools.Projection(collAInitialRelativeSpeed, impulseNormal);
Vector2 collBParallelSpeed = Vector2Tools.Projection(collBInitialRelativeSpeed, impulseNormal);

Vector2 collAPerpendicularSpeed = collAInitialRelativeSpeed - collAParallelSpeed;
Vector2 collBPerpendicularSpeed = collBInitialRelativeSpeed - collBParallelSpeed;

Vector2 collAFinalRelativeSpeed = -collAParallelSpeed + collAPerpendicularSpeed;
Vector2 collBFinalRelativeSpeed = -collBParallelSpeed + collBPerpendicularSpeed;

Vector2 collAFinalSpeed = collAFinalRelativeSpeed + cmSpeed;
Vector2 collBFinalSpeed = collBFinalRelativeSpeed + cmSpeed;



So I know I need to take into account the RadiusGrowth, but where I'm unsure, is how to incorporate it in the "Center of Mass Speed". I think I'll have to add the growth of one disk and subtract the growth of the other one when calculating cmSpeed. I know it sounds silly because the actual center of mass doesn't change, but that's the only way I see to transfer the "Expansion" from one disk into another disk (as a motion). For example if we lose one dimension for the time being :

Disk A (CollidableA) :
* Position : 0
* Speed : 0
* Mass : 10
* Radius : 1
* Radius Growth : 1/sec

Disk B (CollidableB) :
* Position : 3
* Speed : 0
* Mass : 5
* Radius : 1
* Radius Growth : 0

There should be a collision after 1sec. I expect Disk A to end up with a negative speed (relative to the referential) that is about half of how fast Disk B should be going the other way. If I don't change cmSpeed, Disk A would end up moving after the collision, and not Disk B.

(Just explaining this helps me see my problem clearer, as always!)
 
  • #5


Hello Xavier,

Thank you for sharing your work on your collision engine. It sounds like you have a good understanding of the basic principles of collisions and have created a solid foundation for your engine. As for your issue with expanding or shrinking circles, I can offer a few suggestions that may help you find a solution.

First, it may be helpful to think about the conservation of momentum and energy in your collisions. Even though the circles may be expanding or shrinking, these principles still apply. You may need to adjust your calculations to take into account the changing radius and velocity of the circles during the collision. One approach could be to calculate the radius and velocity at the moment of impact and use those values in your calculations.

Another idea is to consider adding a rotational component to your collisions. While your engine may be friction-less, in reality, objects do rotate when they collide. This could help you better model the movement of non-regular circles after a collision.

Lastly, you may want to look into more advanced collision detection algorithms, such as SAT (Separating Axis Theorem) or GJK (Gilbert-Johnson-Keerthi) which can handle complex shapes and take into account factors like rotation and deformation.

I hope these suggestions help guide you in the right direction. Keep experimenting and refining your engine, and I'm sure you will come up with a solution that works for your expanding and shrinking circles.

Best of luck,
 

1. What is a collision of an expanding disc with another disc?

A collision of an expanding disc with another disc is a physical event in which two discs, typically made of a solid material, come into contact with each other. This can happen in a variety of scenarios, such as in a laboratory experiment or in a natural phenomenon like the collision of two planets.

2. What causes a collision of an expanding disc with another disc?

The cause of a collision between two discs is typically some form of external force or momentum. In the case of an expanding disc, this force could be the result of an explosion or rapid expansion of the disc's material. In other cases, it could be the gravitational pull of two objects in space.

3. What happens during a collision of an expanding disc with another disc?

During a collision, the two discs will come into contact with each other and transfer energy and momentum. This can result in changes to the shape, velocity, and direction of both discs. In some cases, the discs may shatter or break apart due to the force of the collision.

4. What are the potential effects of a collision of an expanding disc with another disc?

The effects of a collision between two discs can vary depending on the circumstances. In a controlled laboratory setting, the effects may be minimal and simply result in changes to the discs' properties. However, in a natural setting or with larger, more powerful discs, the effects can be more significant and may include destruction or alteration of the discs involved or their surroundings.

5. How is a collision of an expanding disc with another disc studied?

Scientists study collisions between expanding discs and other discs using a variety of methods. These may include simulations, experiments in a controlled environment, or observations of natural occurrences. By studying these collisions, scientists can gain a better understanding of the physical laws and processes involved, and how they may apply to other scenarios in the universe.

Similar threads

  • Classical Physics
Replies
13
Views
2K
Replies
9
Views
1K
  • Special and General Relativity
2
Replies
46
Views
2K
  • Mechanics
Replies
5
Views
2K
Replies
1
Views
2K
Replies
8
Views
1K
  • Mechanics
Replies
1
Views
4K
  • Introductory Physics Homework Help
Replies
9
Views
1K
  • Mechanics
Replies
1
Views
2K
Back
Top