Electronic structure and optical properties of twisted bilayer graphene calculated via time evolution of states in real space