If you ever wondered how air to air photos which appear in aviation magazines are made, this video may be a clue which would provide an answer.
The photos were taken from C-27 Spartan plane. Note how hard it is for the MiG-29 pilot to keep up with the Spartan.
And here is a part of the final effect:
The images taken during the photoshoot were published on the Polish Lotnictwo magazine