Text this: Beam-Wave Interaction in Periodic and Quasi-Periodic Structures