Relativistic pendulum and invariant curves