Blogs from friends

Arts and Photography at its Finest
  • Hello world!
    Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

The Escapist

The Escapist Forums : Threads
  • Is America evil?

    Why are you advocating genocide?

  • Trump's Foreign Policy

    Well, essentially, yes. Why should america care about conflicts that take place outside of its borders? When the states get involved, people complain. When they don't, people complain. I'm of the opinion that america shouldn't be involved in foreign affairs. That means no conflicts in the middle east, and no influx of refugees from that same region. Just don't get involved.

    I fail to see how its americas fault if other nations, such as israel and palestine, choose to resume conflicts. That's their business.

    The bottom line of why the USA cares about the rest of the world is that it's good for the USA. The USA wants to sell Coke and iPhones to the rest of the world, and buy in oil and so on. Unfriendly nations like trading less, and wars disrupt trade. Incidentally, US influence used to stop wars does wonders for decreasing refugees, because few things make people want to leave their country more than it being a war-torn hellhole. Some of it quid pro quo - so as Europeans have helped the USA, so does the USA help European countries (e.g. Libya).

    American isolationism is a valid standpoint. But it has to be recognised for what it is - global trade mandates involvement in global affairs. And if the USA does retreat from parts of the world, powers like China and Russia relatively hostile to the USA will expand their influence to fill the vacuum. That also starts to introduce the aspect of national security; partly through trade, but also general influence.

  • How the heck is Katniss a Mary Sue?

    Presumably because most people don't truly understand what a Mary Sue is so they apply the classification to any female character who seems remotely skilled, confident and able to get shit done.

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