%% Compute Lane Boundary
% Create a parabolicLaneBoundary object to model a lane boundary. Compute the positions of the lane along a set of x-axis locations.
% Specify the parabolic parameters and create a lane boundary model.

parabolicParams = [-0.005 0.15 0.55];
lb = parabolicLaneBoundary(parabolicParams);

% Compute the y-axis locations for given x-axis locations within the range of a camera sensor mounted to the front of a vehicle.

xWorld = 3:30; % in meters
yWorld = computeBoundaryModel(lb,xWorld);

%
% Plot the lane boundary points. To fit the coordinate system, flip the axis order and change the x-direction.

plot(yWorld,xWorld)
axis equal
set(gca,'XDir','reverse')

% Copyright 2012 The MathWorks, Inc.