The Poynting-Robertson effect and its generalisation to the case of an extended source in rotation