Blogs from friends

bfish.xaedalus.net
Programming and Software Development Guru
  • A tech blog recommendation

    I recently came across this blog in my web travels. The guy is a self described C++ hater, but also a C++ (and many other languages) super-genius, being a developer of compilers and debuggers and stuff for embedded C and C++ developers in the automotive industry. His articles aren’t too focused...

  • Stay in Sync with GCal and Thunderbird.

    For a long time I have been looking for a rock solid calendaring system. I’ve gotten too used to working for companies who have Microsoft Exchange (or, God forbid, Scalix) installed which allow me to edit and update a calendar from multiple locations and even sync...

  • Software RAID 5 in Ubuntu with mdadm

    Software RAID in Linux is a great way to gain massive amounts of disk space which are required for storing digital media, with the added security of data redundancy incase one of the disks in the array fail. Many people still frown upon software RAID...

The Escapist

The Escapist Forums : Threads
  • Remember guys, Sargon of Akkad is on UKIP.

    I admit I enjoyed that one recent video they made from the EU summit or whatever it was where he and Dankula were like "we just wanted to play videogames Anita" XD.

    But yeah, I don't agree with everything this guy says as he has been becoming more and more conservative but I enjoy his content from time to time, especially the week in stupid stuff, that's always entertaining.

    But as I understand the situation with Ukip, now that brexit is accomplished they were basically dead in the water so these youtubers revitalized them and made them into something new. It may actually be a step up for the party even if they don't do all that well overall cause they were already going downhill anyways.

  • Poll: Magic vs Science: Which One Do You Root For In A Story?

    Whichever is the minority in the setting of the world usually. Gotta love an underdog

  • The Internet is Weird; Let me Introduce Bowsette, the new Hottest Waifu

    Worgen:
    snip

    Good, because I hated EVERYTHING I saw in this thread before this.

Voronoi tiling art PDF Print E-mail
Written by Mat   
Wednesday, 30 September 2009 20:23

These tessellations have all been generated by a very simple FreeBASIC program that I wrote.

I stumbled upon this algorithm while searching for a way to generate stochastic terrain heightmaps for a 3D strategy game, and realised that it could be made to produce pretty 2D pictures.

See: Voronoi diagram at Wikipedia.

The algorithm is as follows: start by placing a number of control points in random positions in the image, and assign each one a primary colour. Then for each pixel of the image, the colour of that pixel is set to the colour of its nearest control point, and the brightness of the pixel is set to the difference between the distance from the pixel to its nearest control point and the distance from the pixel to its next nearest control point.

Numerous variations on the algorithm exist: instead of using control points, other geometric objects can be used such as line segments or circles, which both result in curved edges. Also, instead of using Pythagoras to compute the distances, other methods can be used such as the Manhattan metric or the chessboard metric, and these result in more right angles.

It is possible to achieve a finer granularity in the spectrum of colours used, by mixing together two or more layers of tilings with various weights and numbers of control points.

Tiling Tiling Tiling
Tiling Tiling Tiling
Tiling Tiling Tiling

Last Updated on Thursday, 01 October 2009 20:12