llllllllll / slider

Utilities for working with osu! files and data
https://llllllllll.github.io/slider/index.html
GNU Lesser General Public License v3.0
39 stars 16 forks source link

Catmull Curve Implementation #20

Closed NotMichaelChen closed 4 years ago

NotMichaelChen commented 7 years ago

If anyone's interested in implementing catmull curves for completion's sake, here's a webpage describing how to interpolate them: http://cubic.org/docs/hermite.htm (under the section "Catmull-Rom Splines")

Some additional notes on how they're implemented in osu:

llllllllll commented 7 years ago

Thanks for the resources, this is a big help! We haven't gotten around to this, mostly because these are only used in older beatmaps and most of the developers' time has been focused on handling more recent maps.

If you want to try to implement this I would love to walk you through how the curve code works now. If not, thanks for helping the next person that wants to tackle this!

NotMichaelChen commented 7 years ago

Totally agree with catmull curves being very low priority (I don't think any ranked catch-the-beat maps make use of catmull curves). Still, it's an interesting bit of functionality to implement.

Unfortunately I just started getting back into coding my osu tools and I have a lot of garbage to clean up in my own libraries. I guess this can be left as an exercise for the reader :P

tybug commented 4 years ago

I know this is an old issue but thank you very much for that hermite curve link @NotMichaelChen, was the main source I used to understand catmull sliders