How Do Rectangles Collide on an Orthogonal Plane with Given Velocities?

  • Thread starter r4nd0m
  • Start date
  • Tags
    Collision
In summary, the discussion is about solving a mathematical problem involving two rectangles moving with given velocity vectors in an orthogonal plane. The task is to determine the first collision between the two rectangles, if it will occur. Suggestions are given, including the possibility of using mathematical formulas, but it is noted that this may not be a precise method for determining collisions at corners. More work would be needed to solve the problem mathematically.
  • #1
r4nd0m
96
1
I wonder if somebody could help me with this problem I'm solving for my c language class (but it's more a mathematical problem I think).
So we have 2 different rectangles (ABCD and EFGH) in an ortogonal plane, their sides are parallel to the axes of the ortogonal system. Each of this rectangles is given a velocity vector. Now the task is to determine where the first collision will take place (where these two rectangles (their sides or corners) will meet the first time) if it will take place.
Any suggestions?
Can this problem be solved via mathematicl formulas?
thanks a lot
 
Physics news on Phys.org
  • #2
I would have to think more about this to solve it mathematically, but if you're talking about computing a bounding-box collision when it happens, what you do is check at every step to see if the two boxes have collided. This will happen if and only if the top or bottom line of one box is between the bottom line of the other box and the top line of the other box, AND the left or right line of one box is between the left and right lines of the other box.

This is not totally precise--you could miss a corner collision in between steps, if the steps are large enough and the collision is close enough to the corners. To do it mathematically would require more work.
 
  • #3


Hello,

This is an interesting problem that combines both mathematics and programming. To solve this problem, you can use mathematical formulas and principles such as distance, velocity, and time. First, you would need to determine the equations of motion for each rectangle based on their velocity vectors. Then, you can use these equations to calculate the positions of the rectangles at any given time.

To determine the collision point, you would need to find the intersection of the two rectangles. This can be done by finding the equations of the lines that make up the sides of each rectangle and then solving for the point of intersection. If the rectangles do not intersect, then there is no collision and you can simply continue to track their positions until they do intersect.

I suggest breaking down the problem into smaller steps and tackling each one systematically. Also, it would be helpful to create a visual representation of the problem to better understand the motion and potential collision points of the rectangles.

I hope this helps and good luck with your problem-solving!
 

1. What is a collision of rectangles in a scientific context?

A collision of rectangles refers to the event where two or more rectangular objects come into contact or overlap with each other in a given space.

2. How is the collision of rectangles studied and analyzed in science?

In science, the collision of rectangles is studied through various methods such as mathematical modeling, computer simulations, and physical experiments. These methods help scientists understand the behavior and consequences of such collisions.

3. What factors influence the outcome of a collision between two rectangles?

The outcome of a collision between two rectangles is influenced by factors such as the velocity, mass, and orientation of the objects, as well as the material properties of the objects and any external forces acting on them.

4. Can the collision of rectangles be predicted and controlled?

Through careful analysis and understanding of the factors involved in a collision of rectangles, scientists are able to predict and control the outcome to a certain extent. However, there are always variables and uncertainties that may affect the final result.

5. What are some real-life applications of studying the collision of rectangles?

Studying the collision of rectangles has many practical applications, such as in the design of car crashes to improve safety features, understanding the formation of planetary systems in space, and developing strategies to prevent collisions between moving objects in industries such as transportation and robotics.

Similar threads

Replies
32
Views
897
  • Introductory Physics Homework Help
Replies
34
Views
675
  • Introductory Physics Homework Help
Replies
2
Views
951
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Introductory Physics Homework Help
2
Replies
36
Views
2K
  • Introductory Physics Homework Help
Replies
12
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
18
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
689
Back
Top