Swinging physics

Hello, I’m currently working on rope swinging physics for a 2d game, and I’ve got it to work somewhat but I can’t seem to get it to behave quite right. The player is affected by gravity and creates an arc as expected, but loses momentum just past the bottom of the arc. Thinking about it, it makes sense since gravity is still acting on the player, preventing more progress along the arc. But not once in all the articles I’ve read on implementing swinging physics was this mentioned, which makes me think this isn’t expected behavior.

I don’t expect the player to always be able to make a full semicircle (or more), but I’d like it to at least get significantly past the bottom of the swing with some ease. Here’s a pic to better show what I mean:

http://s32.postimg.org/3ua992zph/help.png

Here’s the relevant code:

private static final double FRICTION = 0.95d;
private static final double GRAVITY  = -9.8d;

private void applyForces()
{
    velX = (posX - prevPosX) * FRICTION;
    velY = (posY - prevPosY) * FRICTION;

    prevPosX = posX;
    prevPosY = posY;

    // currently, accX and accY increase only due to gravity or user input
    accY += GRAVITY;

    posX += velX + accX;
    posY += velY + accY;

    accX = 0.0d;
    accY = 0.0d;
}

private void enforceConstraints()
{
    // the anchor is the center point of the arc
    if (anchor != null)
    {
        double distX = posX - anchor.getPosX();
        double distY = posY - anchor.getPosY();
        double distSq = distX * distX + distY * distY;
        if (distSq > anchor.getMaxDistSq())
        {
            // is there a better way to pull the player back in? my math's pretty rusty
            double scale = anchor.getMaxDistSq() / distSq;
            posX = anchor.getPosX() + (distX * scale);
            posY = anchor.getPosY() + (distY * scale);
        }
    }
}

I’m using fixed time steps here, every update is a full step forward and there are no delta time values to be passed.

I’ve tried playing around with some values to get it right, but it’s never quite there. Changing the gravity doesn’t really do much; The player speeds up or slows down but still doesn’t make it to a full semicircle. Lessening the friction helps a bit, but the player ends up sliding around a lot once out of the swing. I think I’m missing some piece of code to make it behave as I want it to. Any tips would be appreciated.