Most of you have probably had this happen to you, you have a nifty physics sim that you want in an animation, but when you bake it it creates millions of points.

here’s an example:

ugh, horrible right? I’ve had blendfiles be a full gig before!

well, we could reduce to just these points:

and if we used these control points:

we’d get a nearly identicle line:

so, I’m hopefully going to make a script to do this, but I’ll need help.

Here’s what I’ve got figured out:

the points we need to keep are at the ‘peaks’, these can be found by checking if both the point before and after are above, or if both are below.

We also need a point at the very start, and one at the end.

and that’s all I have math and knowledge to figure out. So, you experienced python users, I need alittle help figuring out how to take those points, and curve-fit them to the complex mash that it starts out as. There’s got to be a simple way… The best I could come up with is guess-and-check, and that’d be horribly slow. We sould at least strive for an educated guess.

so, please post here if you’ve got ideas or want to help. As I said, I don’t mind coding it all, I just don’t have the math for it…