...although I haven't found any explanation online why it works. This method has probably been known for over a century, so I suspect it may be in some old physics books.