Every man should have an island

Every man (and woman) should have an island. Or at least that is what I think!
The idea came from a few places, first – at a modelling and simulation conference someone gave a talk about an island created by NATO to use with training simulations.

Second, I read about a game, The Wittness, that is set entirely on a single Island. Maybe games like Myst and Riven, My Min City and a bunch of others also had an influence.

And thirdly, the concept of procedurally generating terrain, islands and even complete planets and environments greatly intrigues me.

I started by playing around in blender and after some unsatisfying results I took a step back. Direct manipulation is nice, but I also want to create something generative.


isla-falta

I started by drawing a more map like island using Inkscape, below is the result:



isla-falta-map

After this I exported the map to gimp and played with the raster image a little:

isla-falta-hm-1024-918

This feels like it is getting somewhere. I can imagine seeing the map displayed somewhere and the height map looks nice, but the actual terrain is rather bland and when yo look at it closely it is very artificial.

falta-render

Next step, start writing code!

I decided to experiment with the diamond square algorithm. It can be used to generate terrains that are semi realistic and it is also possible to seed to algorithm to give some shape to the result! I implemented two flawed versions of the algorithm, one vanilla version and one seeded version. The image below shows the output from the different implementations. The code is written in python and lives in github.

combined-small

And this is where I’m at at the moment. The height map can be used to generate a 2.5D terrain that looks somewhat realistic. It still feels artificial, the peaks doesn’t look that great and the resolution of the height map is static, but it’s getting better!

falta-render-2

So what is next? I’m working on a WebGL version, just so that it can all happen in your browser. Creation of the seed image will still be up to you. Next I would like to consider implementing a dynamic level of detail (LOD) algorithm that can keep on generating realistic terrain when you get closer. Then there are texturing, foliage, etc.

And that’s all for now.

This year I will learn stuff!!

So, the year is 2013 and it will be remembered as the year I started dabbling with physical bits of tech! Things like this, this and this!

I want to learn the basics of electronics and some manufacturing techniques like mold making, casting, etc.

 

How I will learn

While I love reading and will probably read up a lot on the things mentioned above, I plan to learn mainly by doing. Doing short focused projects with tangible output. Some of the current ideas that I have are making a pinball machine, making a 3D scanner and making a wind driven marble machine!

I plan on using the internet a lot and open education resources as far as possible (I have one or two college textbooks lying around)! I also hope to get some advise from people that knows a lot about the things I want to learn.

I also intend to tell people what I'm busy with and what I have learned from completing a project and hopefully getting some constructive feedback.

 

Why am I telling you this, publicly, on the internet!?

Well, two reasons actually. One - I tend to struggle with follow through and saying this publicly gives me a little more incentive to get serious about it :)

And two, learning is way too important to rely on other people to map out what you learn. Education is something that you should do yourself. You know what you like, you know what you want to achieve and you know how, when and where you learn best. And if you don't know these things the solution is to find out, not to hand your education over to a government, university, company or even worse - no one!

Go forth and hack your own education!

Octasphere

A while back I played a bit with webgl and decided that I want to draw a sphere.

UV spheres have their problems, so I considered doing a icosphere. But to draw an icosphere you have to start with and icosahedron and then subdivide. Generating the initial coordinates for the icosahedron felt like too much work for the lazy me.

Instead I opted to start with an octahedron and subdivide from there. An octahedron has a modest 6 coordinates that you need to start with and they happen to lie on the primary axis!



I have no idea why octospheres aren't more popular? Until my experiment, I've never knowingly encountered one?

You can find the code on github!

Visualizing Lernanta's inter-dependancies

This project happened during a flight from Berlin to Durban on the 1st of October.

The data comes from a small project that I've done earlier, but the visualization using HTML5 canvas happened in transit!

Update: Forgot to say that the code is available on github

pi in a box

Yes, of course I'm talking about the raspberry pi! When I received my pi the first thing that I decided to do with it was to put it back in a box. But not its original box, a new and improved box that would allow me to use it!

So I got out a cutting board, a carpet knife and an old cereal box. Here is what happened:
Not yet folded
Folded, closed with some pi inside!
I made one mistake in my original box - I forgot to add a hole for the power adaptor.

Although this box works without any glue, it doesn't work that well. For my next pibox, I'm thinking of a way of keeping everything together without any glue! I didn't originally plan to go all hippie with the recycled material and the gluelessness, but the idea grew on my as I proceeded!