I remember those calculations from the time I spent much of my free time tinkering with Turbo Pascal (it was a long time ago, don't judge meeee!).
I messed about a bit with your code, and got this:
http://www.willhostforfood.com/access.php?fileid=66043
I made the star graphic alpha channel a bit smoother, added calculations to make the star bigger as it gets closer to the viewer, and added a size variable to the star, so that the stars can now be of various sizes.
Starfields are nice to tinker with.