IIPrompt

Write Code. With Style.

The flexibility of Python. The power of .Net.

Learn more »

News

Overriding Python's property

7 June 2014 07:06 PM

Sometimes I want to track property changes inside my Python classes. I wanted maximum simplicity and so chose to use Python's decorators. This isn't the most complex code but it can be used in many places.

Python Clouds with Perlin Noise

24 May 2014 05:59 PM

I was watching a friend creating random clouds, by creating 4 random circles and offsetting them by a random amount. Sometimes this worked, but often it didn't. So I chose to write my own.

Using Perlin Noise to get generate the alpha map these clouds do take a long time to generate, around 1 second for a 100 * 50 grid. However the results are impressive.

Cloud generation works by passing the X and Y co-ordinates of one pixel to the Perlin Noise function and then using it as the alpha level. We also divide the alpha by the distance from the central Y axis of the cloud in order to fade the clouds out at the edges. This method generates a continuous, wooly clouds which, once rendered, do look stunning.

About Us

SquidDevI started SquidDev and BD&D because I love code. This site is a collection of my ramblings and my code. Some of my code is on GitHub if you want to check it out.

SquidDev on GitHub