My Work On Collision

Working Example of Collision Elimination

This documentation is used to make solve the harsh problem on collision on the data expansion.

Cases

We dicussed multiple possibilities on collision, and the result shows no more than these three: (note that we’re in the plan view.)

cases

For one box we have the information below:

boxInfo

For two boxes we have the aggregated information below:

2boxInfo

Consequently, the three possibilities can be represented as:

quantifiedCases

Now we claim that, only when both situtaion hold, we have collisions. There are 3 conjugated cases, but all with similar form:

rigidCases

In rigid form we represent the 4 cases as: $$ \begin{equation} \begin{aligned} \Rightarrow {\ {x_{2,min}<x_{1,max}} \land {y_{2,min}<y_{2,max} }\ } \ \lor{\ {x_{2,min}<x_{1,max}} \land {y_{2,max}>y_{1,min} } \ } \ \lor{\ {x_{2,max}>x_{1,min}} \land {y_{2,mmin}<y_{2,max} } \ } \ \lor{\ {x_{2,max}>x_{1,min}} \land {y_{2,max}>y_{1,min} } \ } \end{aligned} \end{equation} $$

Otherwise, we can use the vertices to complete the same functionality. The detailed code is shown on GitHub, so no documentation here is provided.

Shift Vector

The important part is the shift vector. The method to judge the shift vector is decided into different cases

shiftCases

Hao (Jack) BAI
Hao (Jack) BAI
CS M.S. Candidate

Learn and think.