U
U
Uncle_Savva2020-04-21 16:14:58
Programming
Uncle_Savva, 2020-04-21 16:14:58

How can the physics of circles be implemented?

I want to make circles collide with floors, walls, and each other. Please tell me in which direction to at least dig?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Skusnov, 2020-04-21
@Uncle_Savva

Circle from the wall or floor: the angle of reflection is equal to the angle of incidence.
When circles collide, the velocity vectors after the collision will depend on their masses (if the circles have the same thickness and density, then the masses are proportional to the area). Most likely it is necessary to write the laws of conservation of momentum in both coordinates and find solutions.

U
uvelichitel, 2020-04-21
@uvelichitel

  • square tree
  • Verlet integration

G
Griboks, 2020-04-21
@Griboks

1. Decide on the physics of your circles. What is a circle? What properties does it have? How does it interact with other circles, walls, floor, air, inside itself, gravity? I think you were talking about the projection from the side onto the collision of homogeneous absolutely elastic balls in a vacuum.
2. Make a model. Usually use analytical or simulation.
3. Select a language. Find libraries/physics engine or implement it yourself. At low speeds, a banal check |delta {x;y;z}| <=R.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question