more procedural cities

(continued from here)

I’ve been tweaking the secondary road generation (adding things like crossroads), and now I’ve got cities that look like this:

Next up: start looking at tertiary roads and building generation.

I’d love to start having curved roads and rivers in there too, but they’ll have to wait!

was the weather this summer really that lame?

The weather in London this summer seems to have been spectacular in its mediocrity. After an exciting looking start with a really warm May, it turned cold and damp and seems to have stayed that way.

I felt cheated.

But! How bad was this summer in comparison to history? I couldn’t find out anything on the internets to tell me, but I did find tutiempo.net which seemed to have loads of historical weather data. So I cracked out Beautiful Soup and made me a scraper: climatescraper.py

The way I have it set up, it downloads all the weather data for London Heathrow from 1949 to now (excluding the years around the 60s as they all seem to be missing). It then saves the data to a little “database” (alright, it’s just a pickled python dictionary, but that’s because pickling is so easy!)

Now I have all this data, I can render it. For instance, here’s the average daily temperature for each day (this image brought to you by render.py):

As you can see, we haven’t been stiffed. The weather in London is just stunningly mediocre.

If you want to try this for another location, download these scripts and customise the sections at the top for your chosen location. You’ll probably want to tweak which years it downloads as well or you’ll end up with lots of unknown data… You’ll need Beautiful Soup for the scraper and the Python Imaging Library to render the images.

playing with procedural cities

Procedural worlds are awesome. I started playing with Processing and making some!

Unfortunately, Processing is based on Java which doesn’t have operator overloading. Ordinarily I’d be fine with that, but this is gonna get mathsy, so I switched to Cinder, which is C++. After a mercifully swift porting effort, we were back up:

It’s a promising start, but it’s way too rectilinear. I’m going to have to back up and look at generating a road network before anything’s going to look much better. After playing a bit, I found that a random Voronoi diagram seems to give me a nice starting point for the major zoning of a city:

Going beyond a voronoi diagram seems pretty gnarly though 🙁

I started collecting some reference: byjingo.tumblr.com. Now I have some ideas on what might work, I started playing:

There’s clearly still a lot of work to be done!

To be continued…

digital clock

I saw this cool clock by Jonas Damon in magma:

However, I didn’t like that the digits had wires between them. This is the 21st century etc. So I set out to make my own version where each digit was completely independent.

Cracking out the trusty Arduino, I soon had a single digit…

While I could have carried on and purchased another 3 Arduini, that would have been a bit flash, and these digits needed to be battery powered (or the no wires thing wouldn’t work). After some digging, I plumped for using the ATtiny2313V as they’re nice and low voltage (and crucially cheap). Using the Arduino to flash the firmware onto the new chip, I soon had my first independent digit!

Things got a bit Matrix and it went into replication…

Then I used some super-expensive circuit layout software to plan the schematic (I built it on Tri-Pad board, hence the groups of 3 connected holes). I also ventured into the realms of sticking stuff on the back of the board for the first time – that’s what the bits in red are.

With that, it was all done bar days of soldering and manufacturing.

The 8 rechargeable, Lithium Ion batteries (costing as much as the entire rest of the build) last about 2 months. It’s well worth the hassle of 6 recharges per year 🙂

The firmware is available here: avr-clock.c and Makefile