Practical sessions
Here are some ideas if you want to get a deeper insight into quaternions and splines:
- Join multiple Hermite splines in the
06_opengl_spline_quat
and/or12_vulkan_spline_quat
examples to create a bigger spline and interpolate the moving box from the last example code along all of the splines. To continuously join two Hermite splines, the end vertex of the first spline needs to be the starting vertex of the second spline, and the output tangent of the first spline needs to be the input tangent of the second spline. Switching between the different splines may be a bit tricky though. - Enhanced difficulty level: Assign different lengths of the overall interpolation range to the splines. This leads to different movement speeds of the box on the splines. One spline may take, say, 80% of the interpolation range, resulting in a slow-moving box along the path, while the others share the remaining 20%, and the box will move much faster along the path.
- Add some...