0001
0002 function [positionRoad_no, node2, nodes, c_i_node2_j, markedRoad] = makeRoad(rj, roadPoints, point, positionRoad_no, crossingPoints, markedRoad)
0003
0004
0005
0006
0007
0008
0009 [c_i_node2_j, reachedCrossing, markedRoad2, nodes, endnode] = breadthFirst(roadPoints, [point 0], crossingPoints, markedRoad);
0010
0011
0012
0013 diffrence = [];
0014 [sx, sy] = size(markedRoad);
0015 for i = 1:sx
0016 for j = 1:sy
0017 if (markedRoad2(i,j) ~= markedRoad(i,j))
0018 if (i ~= endnode(1,1))||(j ~= endnode(1,2))
0019 diffrence = [diffrence; i j rj];
0020 end;
0021 end;
0022 end;
0023 end;
0024 node2 = endnode;
0025 positionRoad_no = [point(1,1) point(1,2) rj ; diffrence];
0026 markedRoad = markedRoad2;
0027
0028
0029