I couldn't figure out the math before. I somehow figured out a specific set of numbers that looked pretty decent, but Kyler said it should be better and he's not wrong. So I've been procrastinating, because it's really scary to come up to something I don't really understand (those numbers) and be told to rewrite it. I don't even know where to start. I stare at the numbers, try a few things, see how spectacularly they fail, stare some more, then decide to do something more fun with my time.
Today I had a minor breakthrough. I decided that rather than trying to change the numbers, what I needed was to create a system for easily changing the numbers, where the program would figure out how they all fit together. That meant lots of math, so I spent an hour or two working out the problems and then programmed my results. It didn't quite work. Somewhere in my long calculations, I must have put a minus instead of a plus, and some of it is running backwards. I don't understand how to fix that short of redoing all the math, but I think I see a way to make that part a bit simpler so that I'm less likely to make mistakes like that. That's what I'll do tomorrow. And then I'll solve the problem and move on.