Questions tagged [collision-detection]

Use this tag for questions about detecting the intersection of two or more objects.

Collision detection is the computational problem of detecting the intersection of two or more objects. Collision detection is usually associated with video games and other physical simulations but also has applications in robotics. In addition to determining whether two objects have collided, collision detection systems may also calculate time of impact or a contact manifold (the set of intersecting points).

136 questions
8
votes
1 answer

Can a chain of solid round links be twisted without getting shorter?

If I have two linked tori of equal size with $r_{\rm major} >> r_{\rm minor}$ that are tangent at one point, can one of the toruses be slightly rotated around the line through both centers without colliding? (the x-axis in the image) I'm trying to…
Ash
  • 83
7
votes
2 answers

How do I find the Intersection of two 3D triangles?

I've got a rather complicated geometry problem that I'm trying to solve - how to find the intersection between two triangles in 3D space. I've looked around at other questions and answers on this site and quite a few others, but none of them seem to…
6
votes
3 answers

What's the shortest distance between two cubic Bézier curves?

This question comes from TeX.SX https://tex.stackexchange.com/questions/183123/whats-the-minimum-distance-between-two-bezier-curves (From typography; TeX) We are trying to find minimum distance between two glyphs. Glyphs usually consist of one or…
Malipivo
  • 161
5
votes
2 answers

Angle of reflection off of a circle?

I've made simple 2D games in the past using mostly just squares. If an object collided with another object (all squares/rectangles) it would just change the slope to the opposite based on what side it hit. If the object was moving at a slope of 1/1…
Freesnöw
  • 377
5
votes
1 answer

Birthday paradox - variance, parallelisation, simple proofs?

I am looking for an elementary proof of the fact that expected time for finding a colision with $n$ bins is $\sqrt{\frac{\pi n}{2}} + O(1)$. The proof that I knows relies on the asymptotic expansion of the Ramanujan $Q$-function. Additional…
5
votes
1 answer

Do these balls collide?

Assume that two balls $B_1,B_2$ of radius $r$ continuously move around inside of a square of size $d$. They bounce off the walls, i.e. the $x$-component of the velocity is multiplied with $-1$ when they hit the left/right wall, and similarly for the…
4
votes
3 answers

How to calculate solid angle of a rectangular detector of 20cm x 10cm?

I have an detector of $20\mathrm{cm}\times 10\mathrm{cm}$, how can I calculate the solid angle subtended by the detector if the detector is placed at $30\ \mathrm{cm}$ apart? Because directly I can not use the formula $\frac{area}{distance^2}$.…
3
votes
2 answers

Ways to define a curve

I'm trying to give shapes in my physics engine roundness/ curvature. I am aware of various methods for mathematically defining curvature such as bezier-curves, ellipses, etc; but I'm not sure which methods are most appropriate for use in a physics…
3
votes
4 answers

How to find the intersection point of two moving circles?

I'm trying to develop a simulation in C#, and I have to find the intersection (or collision) point of two moving circles, in 2D space. Actually one of my circles will be stationary, so only one of them will be moving (linearly, i.e. constant…
jeff
  • 225
3
votes
0 answers

Finding collision for a hash function

Is there a way to find a collision for a given hash function without brute forcing? The particular hash function I'm talking about is the one used by Python (simplified version given below). It returns a 64-bit value in my case, so I'd guess on…
3
votes
0 answers

What are the techniques one can used for rule based plane generation?

I've asked the question here at gamedev SE, but the response wasn't too encouraging. So I try to reask again, from a slightly difference perspective. I have a terrain, which is defined by mesh. And there are a lot of other polygonal faces scattered…
3
votes
2 answers

Detecting an Intersection between Simple Shapes

I have a circle, ellipse, square or a rectangle, and I want to determine if it intersects a given triangle. I am looking for the easiest way to determine if there exists a geometrical intersection between them. I am only interested in a true/false…
b0x0rz
  • 133
  • 1
  • 5
3
votes
1 answer

How to find the zeros of a fourth degree polynomial without integer coefficient

I am currently programming a simulation for a pinball game and want to calculate the time when the ball hits a circle (if they collide at some point). For the calculation part, i'm adding the radius of the ball to the radius of the circle, so that i…
3
votes
1 answer

Simulating elastic collision

I wrote a simple program where i can move around some objects. Every object has a bounding box and I use hooke's law to apply forces to the colliding objects. On every tick, I calculate the forces, divide them by the masses, multiply by elapsed time…
PEC
  • 133
2
votes
2 answers

Probability of 8 or 9 digit sequence colliding in the same place in two 65 digit numbers

I have two numbers: 3032643431333337636238613038343231383364303731376566303037663231 3861663464383131656131653461343961343364303737663565356561653361 36430373 repeats from digit 36-45 (I only extracted the 8, but the 9th matched too). What are the…
1
2 3
9 10