Well… I’ve got something.
It’s not exactly what I wanted it to do, and I have absolutely no idea why it isn’t working right, but this is what I’ve got:

At least I can actually get something on the screen without the program crashing, unlike last time.