Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [collision-detection]

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

2
votes
0answers
14 views

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

Two linked tori 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 ...
0
votes
2answers
28 views

Determining circle-line intersection on sphere

There are two sets of coordinates (latitude/longitude) that form a line along the surface area of the Earth. There is a third coordinate, along with a radius, that denotes a circular region somewhere ...
1
vote
1answer
26 views

Approximating a probability threshold for hash collisions

First off: I know this is on the verge of being subjective and i'll try my best to make it as specific as possible. I am in a situation where I need to generate a fixed number of hashes (k), say 10,...
0
votes
0answers
47 views

How to determine the position and time of intersection of a moving cone and basic shapes in a 3D environment?

I created a Simulink model in which two objects are moving in a 3D environment (objets have six degrees-of-freedom). The main object has the characteristics of a cone and the second object has the ...
0
votes
1answer
33 views

Collision course of 2 objects

i've tried the question in another Q&A website but nobody could really helped me there so i will try it in here. I want to calculate the point where 2 objects hit each other. More detailled: ...
0
votes
0answers
41 views

How to find the value of the projection of an angle onto a plane?

Consider a triangle (T) in 3D space of given vertices A, B, and C. A given ray (R) (assumed to be in the direction of the x-axis) hits the triangle at one of its vertices - say A. Let $\theta$ be ...
0
votes
0answers
14 views

Recursive integral in elastic collision modelled on springs

I am writing a simulator for elastic collisions; however, I would like an elegant solution to the time-continuous problem, rather than the time-discrete problem. As I was solving the elastic ...
0
votes
0answers
73 views

How to calculate the area and volume of a random 3d shape knowing only its coordinates?

Given a set of 3d points which make up an vector object of any shape (with any number of points), without the edges being known, how can the object's edges be found/detected so that the object's ...
0
votes
0answers
25 views

Finding pixel inside rotation rectangular around a point

I would like to determine that pixels are inside a rotated rectangle around the center of the circle. Let: say I have a circle radius R at the center ( x0, y0 ) Given: theta as the degree of rotation ...
0
votes
1answer
16 views

prevent time collision in N Course initiation for M Student

Hypothesis: we have n courses and m students. we decide to initiate a sample course program named ...
0
votes
0answers
38 views

Sample from Poisson process with no collisions.

On a 2D square $[0,\ 1]^2$, I can draw a random configuration of points $c = (n,\ (x_i)_{1..n})$ with interesting independence properties using a Poisson point process: draw the number of points $n \...
0
votes
2answers
42 views

Semi line collision with line segment

How to tell whether a semi straight line intersects with a line segment? This is required because I am writing an algorithm to check if a given point lies inside or outside a polygon. Update ...
0
votes
1answer
24 views

Distance between a cone and a line

I would like to compute analytically the distance between a finite cone and a line. My idea so far is to setup the following minimization problem $\min_{t_1, t_2, c, s} \|L(t_1) - C(t_2, c,s)\|^2$ s....
0
votes
2answers
208 views

Line segment circle minimal vector before collision

Let this problem be in 2D cartesian plane. Let 'Collision' of two objects be $<=>$ they are not touching and they have atleast one intersection point. Let $C$ be a circle with centre $O$ and ...
0
votes
0answers
105 views

Solution for finding intercept point of two moving objects (XY plane)

This problem is limited to 2 dimensions (XY plane) + time. There are two objects, A and B. Both objects move in a straight line. Object A has an initial speed and decelerates (constant deceleration)....
1
vote
1answer
31 views
-1
votes
1answer
93 views

Finding collision probability of hash function using modulo operation

I have a hash function which maps elements from a set A to another set B. The size of the two sets are n and m respectively (with n >> m). The hash function is of the form - $h: x' = x \; (mod \; m) \...
0
votes
1answer
17 views

Why do we need difference of radius when calculating the intersection of 2 circles?

While I was looking for how to detect if 2 circles $(x_0, y_0, R_0)$ and $(x_1, y_1, R_1)$ collide I found this answer where it is given that 2 circles collide if and only if $(R_0 - R_1)^2 \...
2
votes
0answers
41 views

An application of the Hahn-Banach separation theorem

Let $U_i,H$ be $\mathbb R$-Hilbert spaces $A_i\in\mathfrak L(U_i,H)$ with $$\left\|A_1^\ast h\right\|_{U_1}\le C\left\|A_2^\ast h\right\|_{U_2}\;\;\;\text{for all }h\in H\tag1$$ for some $C\ge0$ $B_1:...
1
vote
1answer
24 views

Given 2 constant acceleration model with initial position in 2D, how can I compute the when will the two object be closest to each other?

The motion model is defined by Initial position $\vec{x}$ in 2d space Initial timestamp $t$ Initial velocity $\vec{v}$ of $x,y$ direction a constant acceleration $\vec{a}$ of $x,y$ direction How ...
1
vote
0answers
51 views

Axis aligned torus collision detection

I am looking to detect the collision (test for intersection) of axis aligned torus and other axis aligned shapes: Torus and box. Torus and cylinder. Torus and another torus. There exist algorithms ...
0
votes
0answers
44 views

Particle collisions in the plane

A particle, moving at a speed of $v$ and an angle of $\theta$ (taking $0^\circ$ to be the positive $x$-axis) collides with a fixed slope with a gradient of $m$. How are $v$ and $\theta$ affected? ...
1
vote
1answer
89 views

Probability of picking the same choices

I have a system where there are 5 players. At each of times $t$ and $t+1$, each of players 2 to 5 generates $0$ or $1$, where the probability to get $1$ is $p$. If a player gets at least one $1$, then ...
0
votes
1answer
232 views

How do I detect if a circle overlaps with a polygon or not?

I have a polygon on earth described by a set of latitude and longitude points. I have following list of points that construct my polygon: ...
0
votes
1answer
91 views

2D CSG: Finding difference between intersection of two polygons

Originally, I have two polygons that do not intersect, call them A and B. I now translate polygon A with a translation vector $V$ such that $A\land B \neq \phi$. I now want to find a factor $\alpha$ ...
0
votes
1answer
101 views

Collision detection of rotating circles around fixed point in 2D

Recently I have learned how to predict the time of collision between two circles moving linearly. Positions of $P$ and $Q$ after time $t$ are: $P(t) = P_0 + vPt$ $Q(t) = Q_0 + vQt$ The goal was to ...
1
vote
1answer
413 views

Line Segment vs Circle Swept Collision Detection Algorithm

Notice: Implementation Can be found on GitHub. Search the username MonkeyToiletLadder for the repository. It has passed all test cases I have given it. It's pretty fast with the most expensive ...
0
votes
0answers
100 views

Where can I find implementation code for the algorithm

I am trying to build a computer simulation for collision of 2 ellipsoids that translate and rotate with very high speed. (accuracy is more important then running speed) is the article: An Algebraic ...
-1
votes
1answer
202 views

Ellipsoids - test for collision

I would like to be able to find two ellipsoid for collision. I have found a paper which describes an algorithm in which they use Lagrange multipliers and Cramer's rule to find the collision. However I ...
0
votes
1answer
23 views

What's a simple algorithm for orthogonally separating two colliding rectangles using these primitive functions?

Suppose there are two colliding rectangles $R_0$, and $R_1$, and I'd like to separate them by only moving $R_1$. In the degenerate case that $R_1$'s center is equal to $R_0$'s and that they are ...
1
vote
2answers
1k views

How to find vector components of velocities of two balls after elastic collision, using angle-free representation

You have two balls of equal masses: Ball 1 and Ball 2. You are given the initial vector velocities (i.e velocity represented as a vector, with x and y components) as well as the initial x and y ...
2
votes
0answers
38 views

Inelastic Collision Response

It comes to mind that the coefficient of restitution (CR) for collision response only models the separating velocity in the normal direction. Thus, for $CR=0$, the separating velocity of two colliding ...
1
vote
1answer
657 views

Point-Ellipse collision test.

O.k, so basically i am writing some C++ program and I've encountered some problem. i need to check if a given Point $P$ is inside Ellipse or not. So lets say points $(X_0,Y_0),(X_1,Y_1),P_0,P_1$ ...
1
vote
1answer
1k views

Calculate if circle intersects a rectangle

In Euclidean 2D space I have a circle $A$ with radius $r$ and center $c(x_c,y_c)$, and a rectangle $B$ with height $h$, width $w$ which topleft corner is positioned at $d(x_d,y_d)$. The rectangle is ...
1
vote
1answer
93 views

Predicting when and where 2 points with non-constant velocity will collide

I am trying to estimate when and where 2 objects will collide with non-constant velocites which also have thrust and friction considerations. This for a physics simulation I am working on where I have ...
0
votes
1answer
176 views

Converting an equation into a quadratic polynomial in terms of time

I was trying to do some collision detection between discs for a physics simulation program I was doing. I had arrived at the equation: Object1Coordinate + (time$\cdot$Object1Velocity) = ...
0
votes
1answer
52 views

Circle collision offset

Just to clear some things i know how to detect collision i do not want a bounce effect since i am not working with velocity so lets say i have 2 circles C1 and C2. C1 can not be moved, and is ...
1
vote
0answers
88 views

Constrained optimization problem using Largange multipliers: ellipsoid collision detection and response

This one is purely for the mathematics so the result is far less important than the method itself. My task is to implement a fast and efficient ellipsoid collision detection and response algorithm. ...
1
vote
0answers
121 views

Applying drag to a collision prediction formula

I feel like this question might be below the minds of Math StackExchange, but I'll try anyway. (I can understand Math generally, but I'm probably not the caliber of people here.) I've been working on ...
2
votes
1answer
337 views

Two-dimensional collision with two moving objects formula for velocity [closed]

Could anyone explain me this formula? https://wikimedia.org/api/rest_v1/media/math/render/svg/14d5feb68844edae9e31c9cb4a2197ee922e409c $$\langle \mathbf v_1 - \mathbf v_2, \mathbf x_1 - \mathbf x_2 \...
0
votes
0answers
60 views

How to solve the general case for a projectile that collides with any angled wall without vectors or dot products, just x and y components?

There are several formulas out there for figuring out the reflected angle of a projectile that collides with a stationary wall at any angle using vectors and dot products, I'm trying to solve it using ...
1
vote
1answer
636 views

Detect if point is within rotated rectangles bounds

I need to detect whether one of rectangles is within the other one. The title says 'point' - because I wanted to approach it by checking if any of the corners (points) is inside the other rectangle, ...
0
votes
2answers
534 views

Find Intersection Points of two Lines in 3D-Space [duplicate]

I tried to read this article, but i didn't understand: Intersection point of two lines in 3D Can someone give an easy example with numbers to see how intersection points of lines in 3D-Space are ...
1
vote
0answers
339 views

How do I detect collisions in a parametric equation$?$ (Lissajous curve)$?$

Let's say you have a simple parametric equation where $x= \sin(3t)$ and $y=\cos(7t).$ This is a pretty simple parametric equation that generates a relatively complicated Lissajous figure. You can ...
0
votes
1answer
57 views

Probability of at minimum 1/1000000 of finding a collision

Let's say I can check for collisions of 100,000 instances of SHA-1(x) in a second. How long would I have to run these computations to have a probability of at least 1/1000000 of finding a collision. ...
2
votes
0answers
167 views

The hash collision probability approximation

I am comparing the actual probability of no collisions to the probability approximation formula of no collisions from the Understanding Cryptography text. The approximation is as follows: $$P(\...
2
votes
0answers
125 views

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 ...
0
votes
1answer
29 views

Scaling intersecting circles that are locked to individual rays

I have two circles that intersect and I need to find the scalar value where they are only touching at one point. Each circle is locked to a point on it's circumference and can only scale relative to ...
0
votes
0answers
770 views

Intersection of cubes in 3D space

There are two cubes cubeA and cubeB. cubeA has 8 points and cubeB has 8 points. How do I check if the cubes are intersecting. Cubes are not aligned along any axis and they have different rotations.
3
votes
1answer
207 views

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