Sign in to follow this  
rafalkozik

Separating Axis Theorem for moving circles

Recommended Posts

Hi, I'm developing small physics engine based on http://uk.geocities.com/olivier_rebellion/Polycolly.zip . Now I have completed part 3 from this tutorial for polygon-polygon and polygon-circle based on SAT, but when I tried the same method with circle-circle I end up with something like this: http://img206.imageshack.us/img206/179/problemrn8.png I'm testing only two axis - one conecting circle centers and one for velocity. Is there any way to make it to work properly for two circles? Maybe by trying some more axis? I would be greatful for any help.

Share this post


Link to post
Share on other sites
you can't really do that with circles. Imagine a circle as a polygon wioth lots of faces. Then you would end up doing hundreds of tests. There is an infinity of axes you will have to test. Instead, solve the equations between the two cricles, it's a lot easier and faster.

EDIT : God, I gotta fix that zip... There are much better algos for CD between polygons.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this