There’s still problems with my code such as with fast-moving thin bodies & also with intersecting vertices where neither vertice is inside the other shape, which you’ll see in the next demo. I think I can only solve it by using intersections (as bleb prescribed), but I’ll apply the forces at each bodies’ vertices, not at the intersections themselves (this shouldn’t require too much extra work).
Until I solve this I think its best to keep your working code away from my buggy version. If you want to add my project on to google code and have the two going in parallel that’s fine.
Thanks for offering to integrate them. Hopefully I will be able to do most of it - at least the parts that only I understand. I’ll post the new demo & code soon.
Keith
PS: I haven’t changed too much except for what I said before: making the bounds a max radius from a centroid point.
The only other important change was using Point2D.Float class rather than Vector2f - but that’s not too much work to change.
I don’t really like Point2D.Float anyway since you can’t serialize it or extend it. Though I’d like to add some more methods to Vector2f if you don’t mind - like setX, setY, getPoint2DFloat() and let it implement Serializable.