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).

137 questions
10
votes
6 answers

Detect if two ellipses intersect

I have seen a lot of papers on how to find points of intersection between two ellipses for 2D case, but i only need to check if two ellipses are in collision. I don't need to know points of intersection if there are any. Is there simplified…
Yola
  • 2,203
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

Test for the intersection of two $N$-dimensional ellipsoids

Let's say I have two $N$-dimensional ellipsoids: $$ \sum_{i=1}^{N} \frac{(x_i - b_i)^2}{c_i^2} = 1 $$ $$ \sum_{i=1}^{N} \frac{(x_i - b'_i)^2}{c_i'^2} = 1 $$ How can I tell if the two intersect? Is there a computationally easy way to do this test?
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…
4
votes
1 answer

Convex shape in ellipsoid containment test

Supposed you to want find out if an ellipsoid fully contains a convex shape. In the picture below I have drawn two situations. The left shape is overlapping with the ellipsoid, and the right shape is fully contained in it. Using an algorithm like…
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…
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
2 3
…
9 10