function demo_angles_VM
%DEMO_ANGLES_VM Demo of the von Mises distribution.

% Get test points
angles = -pi:pi/100:pi; % In radians

figure, hold all;

% Get the probabilities then plot the result for different values of kappa
for kappa = [16 32 64 128 256]
  probabilities = getPdf_VM(angles, 0, kappa);
  plot(rad2deg(angles), probabilities, 'b-');
  %plot(rad2deg(angles), 1 - (probabilities / max(probabilities)), 'b-');

  cutoffAngle = abs(angles(find(probabilities > 0.05 * max(probabilities), 1)));
  displayVerticalBar2D(rad2deg(-cutoffAngle));
  displayVerticalBar2D(rad2deg(+cutoffAngle));

  printf('Kappa = %3u \t cutoff (density < 5pc) at %.2f deg\n', kappa, rad2deg(cutoffAngle));
end

% Evaluate the integral of the PDF on [-pi,pi]
integral = quad(@(x) getPdf_VM(x, 0, 64), ...
           -pi, pi)
