One other thing, I found a very simple method for making tunnels and/or resource spawns during world generation. Instead of using complex math, I just made a few sprites in the shape of clumps of minerals, and a few more in the shape of tunnels (you can make a few variations and/or use rotation or scaling to make it more randomized). Then:
1) Generate world as usual using method in this thread
2) Place X number of each mineral/tunnel sprites in randomized positions in the world
3) Do a hit check against all of the already spawned ground blocks
4) Any ground blocks overlapping mineral sprites get converted to mineral blocks of appropriate type, then update block arrays accordingly
5) Any ground blocks overlapping tunnel sprites get deleted, update array
6) Delete all mineral and tunnel sprites
7) Explore your world full of gold and silver deposits, and caves <img src="smileys/smiley17.gif" border="0" align="middle" />
I also plan to use this method for creating pre-fab rooms and caves with spawned objects/props inside. Since you can add multiple registration points to sprites, you can use them to specify the spawn points for props before deleting the world creation sprites.