Skip to main content
GameDev.net gamedev.net
🔒 Locked

Please help with Minkowski Difference and the Origin

Started by blurmonk May 1, 2014 at 6:37 PM 7 replies 2.4k views
Original Post
blurmonk
blurmonk

Hi I have been reading about MD and all articles refer about the origin and distance to origin. And they generally state that if there is a collision the origin will be inside the MD space. Now I am not getting it sad.png How come the origin can be in the new shape if they are tiny objects and their merged or diffed shapes can contain origin? I realize there is an explanation to it but so far the articles I read were very implicit about the relationship between these shapes and the idea of origin when doing collision detection.

I even watch the video from https://mollyrocket.com/855.mp4 which was the best explanation but I still do not get the origin connection properly if the given shapes are small or other shapes and the merged shape is not even big enough.

Aressera
Aressera

The shapes are in collision if the origin of the Configuration Space is inside their Minkowski difference, not the coordinate system that the shapes themselves are defined in. You can think of the Minkowski difference as subtracting all of the points in shape B from all of the points in shape A. Therefore, if the shapes overlap, there should be some point in each original shape that corresponds to the origin (difference = 0) in configuration space.

Aardvajk
Aardvajk

The way to think about this (and I'm only repeating what Aressera has said really) is imagine you have two sets of normal numbers:

1 3 4 6 and 2 9 4 8

If we subtract every number in list one from every number in list two, and look at the result (too many to show), if there is a 0 in the result anywhere, it must mean the lists have at least one number in common. x - y = 0 must mean x = y when you think about it - what else can you subtract from x to get the result 0 apart from itself?

So vector subtraction (points in this case) works the same way, since it is just a per-component subtraction. So if you have the point (0, 0, 0) in your Minkowski Difference, that was the result of subtracting a point from another point, and the fact it is all zeros means that the points must have been equal.

Hope that helps.

blurmonk
blurmonk
Aressera and Aardvajk Thanks for your replies. They are most definitely very helpful contributions over what I have read so far. This stuff is a bit confusing because even when the author tries very hard to explain the useful bits, they always miss one crucial and sometimes most important issue. When I read about this stuff, they always show the MD shape just on the origin to demonstrate the point but they never showed how that shaped really moved to the origin if you will. So I really thank you for adding on top of what I read so far.
Aardvajk
Aardvajk

Much of the resources about GJK are very scholarly and hard to understand, as the chap in the MollyRocket video said. Its good you've found that video, it is indeed excellent.

I'd also recommend the CodeZealot pages on the subject if you haven't seen it already. Its another very clear explanation.

agleed
agleed

Much of the resources about GJK are very scholarly and hard to understand, as the chap in the MollyRocket video said. Its good you've found that video, it is indeed excellent.

I'd also recommend the CodeZealot pages on the subject if you haven't seen it already. Its another very clear explanation.

It's sad that scholarly implies hard to understand. Seems like writing something formal induces some type of "rigorous formalism rage" and people start to describe everything with math when some words are clearly the better choice. Doesn't help when most people seem to have different formalisms and references amount to "see [12 page paper for this tiny thing I'm using out of it]" biggrin.png I think the general rule applies to not read the original work, try to find the work of someone who had to work with the original work.

Aardvajk
Aardvajk




It's sad that scholarly implies hard to understand.

I guess it depends on your audience. Math guys probably find our articles with code snippets everywhere hard to read. I mean, it seems to me that scholarly articles are over-complex and trying to sound clever, but that's probably just my lack of education colouring my view.

Anyway, lets not go off-topic with this.

blurmonk
blurmonk
 

Much of the resources about GJK are very scholarly and hard to understand, as the chap in the MollyRocket video said. Its good you've found that video, it is indeed excellent.
 
I'd also recommend the CodeZealot pages on the subject if you haven't seen it already. Its another very clear explanation.

 

Aardvajk

Thanks I have not seen that page before. It is very helpful.
LennyLen
LennyLen




Seems like writing something formal induces some type of "rigorous formalism rage" and people start to describe everything with math when some words are clearly the better choice.

The meaning of words can be subjective, whereas math is absolute.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.