I never knew the math behind it, thanks.
When Haley's Comet came through our solar system last, I was determined to capture it on film. There were no digital cameras then. I had a tripod, and did the same thing: snapped several pics from 1 - 10 second exposures. Getting the film developed was interesting. The clerk kept telling me there was nothing on the film. When I explained they were stars, he made some adjustments and got them visible.
You can't see the comet the way NASA photos show it. I had to take two sets of pictures. One was about a month earlier as a "control" when the comet was not close enough. Both sets were focused on Taurus (the constellation, not the Ford). Then, comparing the control with the other set, you can barely make out an extra star in the photo.
I brought my daughter with me. She was four years old at the time. She may live long enough for Haley's Comet to appear twice in her lifetime. I doubt she will remember freezing on a mountaintop in the middle of the night, but she was there!