function buckling_spring_theta ( l_num, theta_num )

%*****************************************************************************80
%
%% BUCKLING_SPRING_THETA plots LAMBDA(L,THETA) and MU(L,THETA) lines for fixed L.
%
%  Discussion:
%
%    This routine fixes L and plots LAMBDA and MU as functions of THETA.
%
%  Usage:
%
%    buckling_spring_theta ( l_num, theta_num )
%
%    * l_num is the number of L values along each THETA line;
%    * theta_num is the number of THETA lines to draw.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    30 October 2008
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer L_NUM, the number of values of L,
%    which controls the smoothness of each line.
%    A value of 101 is plenty.
%
%    Input, integer THETA_NUM, the number of values of THETA, 
%    which sets the number of lines to be drawn.
%    A value of 101 is plenty.
%
  l_lo = 0.25;
  l_hi = 1.75;

  theta_lo = - 3 * pi / 8;
  theta_hi = + 3 * pi / 8;

  for j = 1 : l_num

    if ( l_num == 1 )
      L = 0.5 * ( l_lo + l_hi );
    else
      L = ( ( l_num - j     ) * l_lo ...
          + (         j - 1 ) * l_hi ) ...
          / ( l_num     - 1 );
    end

    for i = 1 : theta_num

      if ( theta_num == 1 )
        theta = 0.5 * ( theta_lo + theta_hi );
      else
        theta = ( ( theta_num - i     ) * theta_lo ...
                + (             i - 1 ) * theta_hi ) ...
                / ( theta_num     - 1 );
      end

      lambda(i,j) = ( 1 - L ) * cos ( theta ) + theta * sin ( theta ) / 4 / L;
      mu(i,j) = - theta * cos ( theta ) / 2 / L + 2 * ( 1 - L ) * sin ( theta );

    end

  end

  plot ( lambda, mu )
%
%  Limit the plot range.
%  Suppress this command to see the whole plot.
%
  axis ( [ 0.1 0.9 -0.07 0.07 ] );
%
%  Label the plot.
%
  xlabel ( '\lambda(L,\theta)' );
  ylabel ( '\mu(L,\theta)' );
  title ( 'Each line is a fixed value of L' );

  return
end
