I initially wanted to modify my GeoGebra applet on the converging lens ray diagram to include the case for infinitely far objects but thought I should give Claude.ai a try to generate one using javascript. It went very smooth. I merely took a screenshot of the original GeoGebra applet for reference, and used the following prompts: “Refer to this geogebra applet and make a html5 version. The user can change the focal length, the lens position and object height using mouse clicks or touchscreen drags. Keep the size responsive. Keep the buttons as overlays.” There were a few iterations after that but the first iteration was already good enough as a minimum-viable product.

This is the end product:
Access the full version here.