Tagspline

Cubic Bézier spline

C

In the previous post we had a look at what Bézier curves are and how they can form a spline. In this post we will have a look at how the code storing such a spline is going to work. For this part I will be using C# and making use of Unity’s Vector2 classes. As I mentioned before, I will only need open paths. Moreover, I will only need 2D (horizontal plane) paths as the height will be given...

Bézier curves and splines

B

I’m not going to go over the mathemathics of what a Bézier curve is, there’s plenty of resources explaining that online including a lengthgy Wikipedia page that can be found here. Main thing you need to know is that there’s multiple types of Bézier curves, differentiated by the equations that give them. For our needs we will use the Cubic Bézier curve, connecting them end to...