I have attached a spreadsheet that demonstrates how the factorisation works in the previous diagrams, for any semi prime. I have also added a list of primes on the 2nd worksheet so that you may pick and enter any 2 primes into cells a3 and b3. The diagrams I attached before are equivalent to row 19 on this spreadsheet (which is already set to 87). You might have to wait a few minutes for all the values to change, after changing a factor, depending on the speed of your computer. I have added a macro button that reduces the amount of cells for semi primes to speed things up for the user investigating smaller semi primes.
Because this is a digital simulation of how the analogue equivalent works, the result becomes hit or miss with semi primes over 30000. You would have to increase the amount of rows even further to accommodate larger semi primes.
Could this be simulated with a ray and would it work ? I'm not familiar with the limitations of lenses and whether they can be applied to this solution ? I can not relate the angle going out of Box1 to the angle going into Box 2 because they relate to the equation for Tan. The length of the 'opposite' is squared but the angle isn't. ??? I think the graduation on the initial calibration would have to be non-linear.