B-Spline for any number of control points

I am currently working on a soft body system using numeric spring physics and I have finally got that working. My issue is that everything is currently in straight lines.

I am aiming to replicate something similar to the game “The floor is Jelly” and everything work except the smooth corners and deformation which currently are straight and angular.

I have tried using Cubic Bezier equations but that just means every 3 nodes I have a new curve. Is there an equation for Bezier splines that take in n number of control points that will work with loop of vec2’s (so node[0] is the first and last control point).

Sorry I don’t any code to show for this but i’m completely stumped and googling is bringing up nothing.



Please signup or login to answer this question.

Signup for an account and start participating in our site today!

Social Signup

You can also login with your Facebook, Twitter or Linkedin account

Log in with Facebook