Searching for 3D Catmull Rom Spline algorithm (Java)

Discussion in 'Programming' started by Proxxo, Feb 21, 2020.

  1. Hello,

    I am looking for a catmull rom spline algorithm that handles points in 3d space. Does anyone know a good library that supports 3d splines?
    It actually does not need to be exactly catmull rom. Just picked it because it creates curves that hit the control points.
     
  2. what is catmull rom spline?
     
  3. It's about smoothing a path that is defined by a set of so called control points.
    I need this for my youtuber plugin. Players can fly around, record some key positions and after that automatically refly the path smoothly.

    There are articles about Catmull Rom algo for 2D space where it is mentioned that the principle can be extended to 3D space. But I rather do not want to reimplement this if there is a chance to find a library that can be used freely.
     
  4. Use a standard Catmull-Rom (1D by your terminology) algorithm, apply it independently for each dimension (x, y, z) and you'll get 3D Catmull-Rom. You can also find an example implementation in JavaScript here.
     
  5. Thanks, I didn't know that the dimensions can be handled independently. Works like a charm!
     
    • Like Like x 1