All very good responses, I appreciate them.
Quote: "Best to try to be lean with what resources you are using.
--baxslash"
Yes, this makes sense. The trouble I anticipate is that being maximally lean might make object-oriented programming (which I am new to) more difficult. (Really it just means I need to think about what I'm doing more carefully.
Quote: "What I would avoid is overusing insert and remove. It is often better to allocate the whole thing at the start.
--paulrobson"
That's something I had considered and was uncertain about -- whether the overhead of declaring and un-declaring variables would exceed the overhead of declaring lots of variables that ended up unused.
You made good suggestions. In this particular case I've already implemented suggestions (1) and (3). I split the extra variables into their own type, Destination, leaving Coordinates as X and Y only, and I reduced coordinate-collection to four times per second.
Suggestion (2) is clever, but I hope I won't ever have to go to quite *that* length. The idea (4) of tracking the error as I go is a good one, and may be necessary, I'll have to see.
Quote: "So 8064 bytes, give or take. That's assuming a packed array, some implementations use pointers to type data. Which would add another 4 bytes per cell. ... about 100,800 bytes, which is nothing to really worry about.
--Kevin Picone"
Thanks, I'll make a note of the size definitions and computations. How and when allocation happens is something I plan to learn more about (in part because I don't want to end up being one of those careless coders paulrobson was talking about).
Quote: "Are you bothered about the time element of this, or just the position?
--Batvink"
Goooooooood question. It's not something I ever thought to consider.
It is, as I envision it, a timed objective: stay between the inner circle bound and the outer circle bound, with the two boundary circles coming closer together as time passes. (I should mention I am having a terribly difficult time attempting to implement this.)
Regardless, I'm not sure if that means I need to store the traced path's coordinates by time. And even if I do, maybe I could just store timer() alongside X and Y.
In addition to this animation, I had originally intended to have the traced path's width depend upon the speed of the pointer motion, so that if someone paused or slowed their movement it would thicken. But that might not be feasible anyway.
Quote: "I recorded a new point every time it was 5 pixels from the previous one, then drew a line between the two. Visually, I didn't lose any fidelity, it looked just fine. In fact it looks better than recording every pixel, which can look like a 2-year-olds scrawl."
This is ingenious. I was working on "smoothing out" the minor kinks and such from the path, but this would pre-emptively smooth the path.
---
Thanks everybody!
It's mean time. *averages*