I had a problem recently where I needed to change the beam diameter of a laser at a point about 12 feet away, using lenses to modify beam divergence and make the beam smaller at that point (and also make the spot size adjustable).
I had always wanted to try my hand at a ray-tracing program, but thought the time involved learning it would be greater than the time saved using it, since it was rarely needed.
But I found a rather good online simulator which helped. No download is needed:
I might suggest looking at a short video first, to see how it works: