chickadee » aima » plot-tessellation

plot-tessellation tessellation path title filenameprocedure

Plot the tessellation with its start and end nodes, as well as the path taken from start to end.

tessellation
The tessellation to plot
path
A list of nodes
title
Title for the graph
filename
The PNG to which to write
(define (plot-tessellation tessellation path title filename)
  (let ((title (make-title title (length path) (node-path-cost (car path)))))
    (let ((start (tessellation-start tessellation))
          (end (tessellation-end tessellation)))
      (R (plot.voronoi
           ,(tessellation-R-object tessellation)
           ,(list->vector (path-x path))
           ,(list->vector (path-y path))
           ,(point-x start)
           ,(point-y start)
           ,(point-x end)
           ,(point-y end)
           ,filename
           ,title)))))