i could keyframe it but i think it would be possible and easier to script it, i'm just not sure how
You would just end up doing exactly that, keyfreming in script. Possibly using a expresssion. But basically the same thing. Just instead of a curve you draw and repeat you would use a mathematical function that does the same.
Snce theres relly no difference from your point fo view its all the same to you. its actually less work to keyframe if you need to change things later.
Scripting is the exact same thing you would do monually, just computer doing it for you.
PS: dont double post.