Drawing a Map of Our City

We’re finally ready to draw a map of our new city. We’re using a standard format for our graph data, so writing this function is a breeze:

(defun draw-city ()
  (ugraph->png "city" *congestion-city-nodes* *congestion-city-edges*))

We created the ugraph->png function in the previous chapter, as part of our graph library.

Now call (new-game) from the REPL, and open the city.dot.png picture in your web browser:

image with no caption


Since every city map created by our code is unique, your map will look completely different from the one in this picture.

Finally, we can marvel at the results of our urban planning!

Drawing a City from Partial Knowledge ...

Get Land of Lisp now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.