Separating Axis Theorem for moving circles

Started by
3 comments, last by oliii 17 years, 6 months ago
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.
Advertisement
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.

Everything is better with Metal.

See if this is helpful.

http://www.harveycartel.org/metanet/tutorials/tutorialA.html
Quote:Original post by oliii
EDIT : God, I gotta fix that zip... There are much better algos for CD between polygons.


Could you point me to some of it?



Quote:Original post by shurcool
See if this is helpful.

http://www.harveycartel.org/metanet/tutorials/tutorialA.html


It's for poly-circle, not for circle-circle.
Even Poly-Circle would not work perfectly, as the speed increases, it gets less and less accurate, but it is quite close.

It would be the same for sphere-sphere, but it's easier just to do the second order equation thing.

as for other docs on polygon collisions, ...

http://members.gamedev.net/oliii/satpost/DXInputs.cpp
http://members.gamedev.net/oliii/satpost/DXInputs.h
http://members.gamedev.net/oliii/PolyColly3.zip
http://members.gamedev.net/oliii/PolyColly4.zip
http://members.gamedev.net/oliii/sweptsphere.zip
http://members.gamedev.net/oliii/satpost/3DBoxPolygonCollision.cpp
http://members.gamedev.net/oliii/satpost/3DDDA.cpp
http://members.gamedev.net/oliii/satpost/3DSpherePolygonCollision.cpp
http://members.gamedev.net/oliii/satpost/BoxBoxCollision2.cpp
http://members.gamedev.net/oliii/satpost/BoxBoxIntersect.cpp
http://members.gamedev.net/oliii/satpost/BoxBoxMTD.cpp
http://members.gamedev.net/oliii/satpost/ConvexPolygonCollision.cpp
http://members.gamedev.net/oliii/satpost/OrientatedBoxesCollision.cpp
http://members.gamedev.net/oliii/satpost/SpherePolygonCollision.cpp
http://members.gamedev.net/oliii/satpost/verletparticlecollision.zip
http://uk.geocities.com/olivier_rebellion/Cube3D.zip
http://www.gamedev.net/community/forums/topic.asp?topic_id=346956

Everything is better with Metal.

This topic is closed to new replies.

Advertisement