We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Red State, Blue State (American map simulator)
Page Index Toggle Pages: 1
Red State, Blue State (American map simulator) (Read 900 times)
Red State, Blue State (American map simulator)
Aug 24th, 2007, 3:13am
 
Here's a little project I've been working on for a week or so.

As a Canadian who's interested in American politics, I see a lot of American maps, but they have no direct personal meaning for me. Other than about a dozen or so states I recognize, most are just a jumble of roughly rectangular blocks scattered willy-nilly. So I decided to write some code to make new American maps that appear (to a non-American, at least), to be just as plausible. These maps are generated using purely physical laws, with no political or historical information at all.

http://quark.physics.uwo.ca/~sdevet/StatesSpring/

This is the same code, but with a coloring scheme that assigns states to the Democrats or the Republicans based purely on population density data (no political data is involved).

http://quark.physics.uwo.ca/~sdevet/RedBlue/

In both codes, you can click (and hold) the mouse to make the states dance around. You can try to get a configuration you prefer but beware - jerrymandering is harder than it looks.

This is still a work in progress - New England has fewer states than it should, the mid-west has more, and they're all a little too evenly spaced. Also, the west coast is voting Republican more than it should...
Re: Red State, Blue State (American map simulator)
Reply #1 - Aug 24th, 2007, 3:24pm
 
Can you provide links to the support file (pngs)?  I would like to play with offline as I can't get the online version to work.

Thanks!
Re: Red State, Blue State (American map simulator)
Reply #2 - Aug 24th, 2007, 4:19pm
 
It works on most computers, but not all, I've noticed. Maybe it's an OpenGL thing?

Here are the .png files used:
http://quark.physics.uwo.ca/~sdevet/StatesSpring/Outline1.png

http://quark.physics.uwo.ca/~sdevet/StatesSpring/Outline2.png

http://quark.physics.uwo.ca/~sdevet/StatesSpring/USdensity2.png

http://quark.physics.uwo.ca/~sdevet/StatesSpring/MapPic.png
Page Index Toggle Pages: 1