Fat, SAT, This and That

Posted by DesertFox on March 10, 2010, 5 p.m.

On the plane back to New York, I got put next to a fat guy. I hate fat people on planes, because the tend to 'spill over' into your seat. Lucky for me, I changed planes in Detroit, and this time, I got set next to a midget! It was awesome! Midgets are awesome! Sitting next to a midget is awesome!

Anyhow, I got bored and decided to implement the Separating Axis Theorem in C#. Here's my awesome result:

The blue box collides with all of the other shapes, including the curves, and it responds exactly how you think it should - which is kickass considering how many collision systems feel fake.

If you don't know what the Separating Axis Theorem is, I suggest you go here. Its not complicated. Basically, it says that for any two non-colliding convex polygons, there is an axis between them on which the two shapes have no overlap. This may sound obvious, and it is! But how is this useful? That axis could be in any direction! Well, you can simplify it if you realize that you only need to check the axes that are normal to the polygon's edges, like so:

See? It gets more complex, but that's the basic idea. The advantage of this type of collision system is that it is fast, and that when two objects are interpenetrating (colliding) the SAT algorithm not only tells you that they are, but it also tells you EXACTLY how far to shove an object, and in EXACTLY what direction, to resolve the collision properly. Its pretty awesome. I may post the code sometime.

Lets see, what else have I been doing? Hmmm…

I've:

-Bought and read The Collected Stories of Arthur C. Clarke (1000 pages of glorious awesome!)

-Been playing Jet Car Stunts

-Been watching Farscape (for arns and arns!)

-HERE BE DRAGONS

-Gotten addicted to beef jerky

-Also eaten lots of Mexican food

-Lost my favorite pair of shorts

-MORE DRAGONS

-Painted a small office for 100$USD

-Drank a quart of delicious cranberry juice

-Decided that Zuppa Toscana is the best soup in the world

-NOT A DRAGON

-Started some new classes

Aside from that, I don't know what else, other than BLARGH!

Comments

Ferret 14 years, 9 months ago

I Love you