VE Map Case Study
Here is my completed map project for Virtual Entertainment:
The goal of the project was a large print with enough detail that it was still interesting when enlarged:

The project started out with attempts to import map files into Processing.
After overcoming this hurdle. I created a class for vehicles that “drive” around on the lines that represent roads on an image. As the vehicles analyze pixels rather than vectors, this actually meant that I could import any black and white image to use for a map, and that the use of .e00 files or shapefiles was not essential (although I still ended up using them).

However, these vehicles followed the lines of the map so precisely, that the resulting image was simple the original map, but in different colors. In order to introduce more variation into the equation, I used these “Follow Points” as the targets for a seeking behavior, and then built a tolerance into the seeking behavior. What this means is, the new vehicles would try to point to the Follow Points, but would stop changing the direction if they within a certain range. This produced a great variety in lines, simulating a street where vehicles could drive on any section of the road they wanted, as long as they stayed inside the boundaries of the road.
I decided the top-down view wasn’t as interesting as I wanted, so I moved the entire thing over to 3D. Before, I had simply had every vehicle leave a trail behind it by never clearing the background. However, I wanted to be able to rotate the image in 3D. To do this, I gave every vehicle a history array that would keep track of where it had been, so its entire light trail could be drawn every frame. The p3D renderer in Processing really started to struggle here, so I switched over to OpenGl, which is much faster. Rendering the map in 3D did add some visual interest:
At this point, I also set the project up so that it would render the entire project out as a PDF, meaning I could print it at any size. This looked fine when it wasn’t enlarged, but when I rasterized the images at a large size in Photoshop, the strokes began to appear dotted, as apparently Processing doesn’t export strokes as being continously connected, but instead saves them as separate line segments:
pdf = (PGraphicsPDF) beginRaw(PDF, “pdf_lines.pdf”);
pdf.strokeWeight(0.25);
To remedy this, I set the pdf’s stroke settings in a way that Photoshop and Illustrator would render more nicely. The following settings:
pdf = (PGraphicsPDF) beginRaw(PDF, “pdf_lines.pdf”);
pdf.strokeJoin(MITER);
pdf.strokeCap(SQUARE);
pdf.strokeWeight(0.25);
resulted in an image that was far less objectionable, unless zoomed to a very high level.
To make the map even more interesting, I created a simulation that tracked how often vehicles drove by a certain area, thereby creating a map of traffic density, which I figured I could roughly correlate to population in my simulation.
My eventual goal was to use this as a way of generating “cities” to match the “roads” that the simulation already created. I successfully created a series of dots representing cities, with the size varying by population:
However, this, when combined with the lines from the roads, became too visually busy. In fact, I liked the initial rendering with the vertical lines better. This led me to try a number of other visualizations,a ll of which ended up looking terrible. I eventually decided that I liked the original version with just the traffic lines better. Thomas Edison said he didn’t fail a thousand times while trying to make a lightbulb, he instead discovered a thousand ways not to make a lightbulb. Similarly, I could say I wasted a lot of time trying things out and then coming back to the original, but I’ll try to look at it as discovering ways not to make a map look good. Actually, even when I put it that way it still sounds like kind of a waste of time.
So I decided to refine the original lines image to make it more intersting. To add a bit more variety, I rendered out several versions with different line settings. I then combined several of these so that there would be lots of “detail” lines forming the major shapes of the roads, but several thicker and brighter “accent” lines would add visual interest. I ended up sing three different line weights, which gave a visual variety that I was happy with.
I even ended up using the population circles as a way of varying the lighting on the thinnest lines, creating an interesting effect, and ensuring that my work on the population simulation did not completely go to waste.
A few more post production tweaks, and I ended up with my final print.
I’ll post the source code once I clean it up a bit. I realize I’ve said that in several posts and have yet to post any of my code, but I also realize that probably nobody cares.
















