Using Bézier splines to connect given points
The previous methods may be too laborious when we want to create a more complex curve defined by many points. It’s hard enough to find the control points for a desired Bézier curve by trial and error. And if we need a series of Bézier curve segments, called splines, it could be a nightmare.
Luckily, there’s the spline
library. We can load it as follows:
\usetikzlibrary{spline}
Then we can specify end points as before and a spline through a set of coordinates that shall be passed through:
\draw[thick] (-3,-2.4) to[spline through={(-1.3,0.86)(1.3,-0.86)}] (3,2.4);
The library creates a path consisting of Bézier curve segments. It looks as follows, where I additionally plotted the used control points in gray:
Figure 12.8 – A curve with Bézier splines
Here, you can see that, for neighbor splines, the end and start control points are on a tangent...