May I pimp my own book about 3D rendering, covering both rasterization (including 3D projection) and ray tracing? There's a complete, free version at my website, https://gabrielgambetta.com/cgfs
I was just thinking of this book as a recommendation to the parent post, and here the author himself posts it. For what it's worth, I can totally recommend it. I had written rasterizers in the past but not ray tracers until I went through this one weekend.