This lab will introduce you to the usefulness of quaternions as a 3D-rotation representation. Today you will be exploring quaternions most useful feature, the ability to smoothly interpolate without ugly singularities. As with previous labs, you will need to download starter code. This code will provide you with a basic quaternion class to help you get started.
You will be required to implement the SLERP (spherical linear interpolation) function discussed in lab. Once you have implemented SLERP you should specify two rotations (must not be along the same rotation axis) in angle-axis format, convert them to quaternions, and then perform slerp for varying values of u (iterate across the interpolation parameter, u, from 0 to 1 in fixed step sizes). You will then take the provided plane model and draw it multiple times using rotations you sampled from the SLERP function. You should end up with an rendering that is similar to the image above.
BONUS: Make the plane fly! Interpolate the rotation of the plane in time using the real-time timer. Let each draw cycle update the position of the plane (assume a constant velocity) based upon the current forward facing direction. You can use the forward Euler numerical integration rule, x_{t+h} = x_{t} + h*v_{t}, (where x, v, and h are the position, velocity, and step size), to update the position of the plane each draw cycle.