Linked Questions
26 questions linked to/from Algorithm to detect intersection of two rectangles?
-3
votes
1
answer
282
views
JavaScript Object Collision With Squares [duplicate]
Hi i am trying to make the blue object collide with the green one, but I cannot get the whole area of the square, i only detect half....and down the entire Y + X axis's
if (blue.x >= green.x &...
416
votes
22
answers
370k
views
Determine if two rectangles overlap each other?
I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to ...
60
votes
8
answers
76k
views
Two Rectangles intersection
I have two rectangles characterized by 4 values each :
Left position X, top position Y, width W and height H:
X1, Y1, H1, W1
X2, Y2, H2, W2
Rectangles are not rotated, like so:
+-------------------...
15
votes
6
answers
16k
views
Intersection of N rectangles
I'm looking for an algorithm to solve this problem:
Given N rectangles on the Cartesian coordinate, find out if the intersection of those rectangles is empty or not. Each rectangle can lie in any ...
6
votes
5
answers
5k
views
How to find intersect between two ImageView when drag and drop?
I have two ImageView
One is fixed at a position
On Second I need to apply drag an drop functionality.
What I need:
Drag second ImageView to the another ImageView and when they intersect than I ...
6
votes
5
answers
11k
views
How do I test for collision of two moving 2d oriented bounding boxes?
The OBBs have a position(x,y), a velocity(x,y) and an orientation(Matrix). Given periodic updates, the OBBs must collide with each other, returning the fraction of the move that was deemed successful....
4
votes
2
answers
4k
views
Separating Axis Theorem and Python
This is what I am currently doing:
Creating 4 axis that are perpendicular to 4 edges of 2 rectangles. Since they are rectangles I do not need to generate an axis (normal) per edge.
I then loop over ...
10
votes
1
answer
2k
views
Objective-C check if subviews of rotated UIViews intersect?
I don't know where to start with this one. Obviously CGRectIntersectsRect will not work in this case, and you'll see why.
I have a subclass of UIView that has a UIImageView inside it that is placed ...
4
votes
2
answers
3k
views
Math/ Algorithm/ JS: How to determine if 2+ rectangles intersect, given the TopLeft(x0, y0) and Bottom-Right(x1, y1) of each rectangle
I come across this math problem which is needed to complete my application, so I'm asking for help.
Given 2 (or more, but basically for 2) rectangles with 2 known points for each: Top-left(x1, y1) ...
2
votes
1
answer
7k
views
Separating axis test, detecting if a rotated rectangle overlap an other flat rectangle
I read about intersection rectangles on:
Algorithm to detect intersection of two rectangles?
But i have trouble to implement it.
If R1 (A,B,C,D) is my rotated rectangle and R2(A',B',C',D') the ...
7
votes
3
answers
2k
views
Detect if two rotated divs collide using JQuery
I would like to detect if two rotated divs are colliding. I know how to do it if they're not rotated, but I don't know how to do it when they actually are.
I have tried some collision plugins such as ...
3
votes
2
answers
2k
views
Google Map Algorithm (Ajax, Tiles, etc)
I'm working on an app that displays a large image just about the same way as Google Maps. As the user drags the map, more images are loaded so that when a new part of the map is visible, the ...
0
votes
2
answers
1k
views
Check collision between rectangles AS3
What is quick way to check collision between 2 rectangles then you have rectangle coordinates like:
Red rectangle: A1(x1, y1), B1(x2, y2).
Blue rectangle: A2(x3, y3), B2(x4, y4).
1
vote
1
answer
2k
views
Detect intersection between two ImageView
I have two ImageViews and I want to detect the intersection between the two images. So I decided to find a solution online, I'm using getDrawingRect to draw a rectangle, wrapping with the ImageView. ...
3
votes
2
answers
1k
views
Rotated 2d rectangle intersecting points or area
Moving ahead from previous question.I have two rectangle and they look like this:
struct Rect
{
NSPoint topLeft;
NSPoint topRight;
NSPoint bottomLeft;
NSPoint bottomRight;
}
I use something ...