This was one of the questions just now during the Rosetta press briefing. This video was shown during the presentation. The triangular trajectory are hyperbolic orbits with respect to the comet and they'll (also, among other tasks also mentioned in the image you're attaching) serve to establish its mass. In essence scientists will be looking at how the comet's gravity changes these "straight" legs of the triangular Rosetta's quasi-orbit around comet 67P and estimate its density / mass more precisely.
The trajectory changing maneuvers aren't all that costly to the Rosetta spacecraft, and it was mentioned (during the briefing) that we're talking of delta-v of only a few meters per second during each of these maneuvers. So in a sense, since the comet's own gravity isn't all that great and the probe was already successfully injected into comet's own heliocentric orbit, they're not expensive to Rosetta's own propellants and would be more alike to satellite station-keeping maneuvers, like say the ones that satellites in halo or Lissajous orbits at Lagrange points would be performing, also on a fairly regular basis.