compute Jacobian in segment frame