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

  • Thread starter Thread starter r4nd0m
  • Start date Start date
  • Tags Tags
    Collision
AI Thread Summary
To determine the first collision between two rectangles on an orthogonal plane with given velocities, one must calculate their equations of motion based on their velocity vectors. The collision occurs when the boundaries of the rectangles intersect, which can be assessed by checking if the sides of one rectangle fall within the bounds of the other. While a step-by-step computational approach can identify collisions, it may overlook corner collisions if the steps are too large. A more precise mathematical solution involves deriving the equations of the rectangle sides and finding their intersection points. Visualizing the problem can aid in understanding the motion and potential collision scenarios.
r4nd0m
Messages
96
Reaction score
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
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.
 


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!
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'Calculation of Tensile Forces in Piston-Type Water-Lifting Devices at Elevated Locations'
Figure 1 Overall Structure Diagram Figure 2: Top view of the piston when it is cylindrical A circular opening is created at a height of 5 meters above the water surface. Inside this opening is a sleeve-type piston with a cross-sectional area of 1 square meter. The piston is pulled to the right at a constant speed. The pulling force is(Figure 2): F = ρshg = 1000 × 1 × 5 × 10 = 50,000 N. Figure 3: Modifying the structure to incorporate a fixed internal piston When I modify the piston...
Thread 'Minimum mass of a block'
Here we know that if block B is going to move up or just be at the verge of moving up ##Mg \sin \theta ## will act downwards and maximum static friction will act downwards ## \mu Mg \cos \theta ## Now what im confused by is how will we know " how quickly" block B reaches its maximum static friction value without any numbers, the suggested solution says that when block A is at its maximum extension, then block B will start to move up but with a certain set of values couldn't block A reach...
Back
Top