I followed a similar path with Computer Graphics from Scratch [0], somewhat accidentally. You'd be surprised about how much valuable feedback a publisher can give on such a technical topic! When No Starch Press approached me I thought "the content is almost finished, this will take a month or two". It took two years, and the book is significantly better after I went through the process with them.
[0] https://gabrielgambetta.com/computer-graphics-from-scratch/