% plot_tree_path.m
% Given tree, verts and N, plot the tree 
% path from vertex N to the root

function plot_tree_path(tree,verts,N)
   k=N;
   while tree(k)>0
       x1=verts(k,1);
       y1=verts(k,2);
       x2=verts(tree(k),1);
       y2=verts(tree(k),2);      
       plot([x1;x2],[y1;y2],'r','LineWidth',4);
       k=tree(k);
   end % while 
   % plot endpoints of path
   scatter(verts(1,1),verts(1,2),'r','filled','MarkerEdgeColor','k');
   scatter(verts(N,1),verts(N,2),'r','filled','MarkerEdgeColor','k');
return
