Cell Conquest

After seeing SuperCoquillette’s post on r/cellular_automata (and his online version here) I had to have a go at experimenting with it myself. It reminded me immediately of a more advanced version of Wa-Tor.

I spent a few hours getting my own version going and doing some high res test runs. The example images in this post are all 4K size. Click the thumbnails to see them full size.

The basic setup includes four “factions” that use the same settings, ie

Cell Conquest

This sequence started from a block of 4 squares of factions in the middle of the screen and grew outwards from there. None of the cells die once born.

Cell Conquest

Cell Conquest

Cell Conquest

Cell Conquest

Cell Conquest

Cell Conquest

Cell Conquest

And finally after approximately 27,000 steps when my hard drive filled up and crashed the program when it could not save any more frames.

Cell Conquest

Here is the same setup settings started from a random soup of factions with single pixel sized cells after running for a few thousand steps. There is some clumping of factions.

Cell Conquest

There seems to also be a bias to later factions in the method used in the source code. The factions are processed in order (first faction 1, then 2, etc). This is OK when each faction is surrounded by empty space, but breaks down once factions meet. This means that (for example) faction 1 may fight and take over a faction 4 location, but then once the faction 4 cells are processed the same cell may be taken back negating the original win. Overall this leads to the later factions being given a slight bias to spread faster and further than earlier factions. Or maybe it is just my version of the source code. I need to think about this some more and make sure the moving/fighting is fair.

Here are a few other color methods I experimented with. Firstly, average each cell color from which factions have visited. Cells are 10×10 pixels this time.

Cell Conquest

And the same, but with histogram equalization to get a wider range of colors.

Cell Conquest

Different faction colors and 5×5 sized cells.

Cell Conquest

I have added Cell Conquest as a new mode in the latest version of Visions of Chaos.

Jason.

Video Feedback Simulation Version 3

Once again I have delved into simulating video feedback.

Here is a 4K resolution 60 fps movie with some samples of what the new simulations can do.

This third attempt is fairly close to second version but with a few changes I will explain here.

Visions of Chaos Video Feedback 3 Settings

The main change is being able to order the effects. This was the idea that got me programming version 3. A shuffle button is also provided that randomly orders the effects. Allowing the effect order to be customised gives a lot of new results compared to the first 2 video feedback simulation modes.

Here are some explanations for the various effects.

HSL Flow

Takes a pixel’s RGB values, converts them into HSL values and then uses the HSL values in formulas to select a new pixel color. For example if the pixel is red RGB(255,0,0), then this converts to HSL(0,1,0.5) assuming all HSL values range from 0 to 1. The length formula above is H*360 and the length formula is s*5. So in this case the new pixel value read would be 5 pixels away at the angle 0 degrees. Changing these formulas allows the image to “flow” depending on the colors.

Sharpen

Sharpens the image by blurring the image twice using different algorithms (in my case I use a QuickBlur (Box Blur) and a weighted convolution kernel). The second blur value is subtracted from the first and then using the following formula the target pixel value is found. newr=trunc(r1+amount*(r1-r2))

Blur

Uses a standard gaussian blur.

Blend

Combines the last “frame” and the current frame. Various blend options change how the layers are combined.

Contrast

Standard image contrast setting. Can also be set for negative contrasts. Uses the following formula for each of the RGB values r=r+trunc((r-128)*amount/100)

Brightness

Standard brightness. Increases or decreases the pixel color RGB values.

Noise

Adds a random value to each pixel. Adding a bit of noise can help stop a simulation dying out to a single color.

Rotate

Guess what this does?

Histogram

Uses a histogram of the image to auto-brightness. Can help the image from getting too dark or too light.

Stretch

Zooms the image. Various options determine the algorithm used to zoom the image.

Image Processing

Allows the various image processing functions in Visions of Chaos to be injected into the mix for even more variety.

As always, you can experiment with the new VF3 mode in the latest version of Visions of Chaos.

I would be interested in seeing any unique results you come up with.

For the next version 4 simulation I would like to chain various GLSL shaders together that make the blends, blurs etc. That will allow the user to fully customise the simulation and insert new effects that I did not even consider. Also GLSL for speed. Rendering the above movie frames took days at 4K resolution.

Jason.

3 Years Of Softologyblog

3rd year anniversary

Today marks the 3rd anniversary of this blog. Over that time I hope it has been interesting for those who happen to check in and read it from time to time. When I started I wasn’t sure what the contents would be, but once you get blogging it all seems to flow.

I do recommend everyone try blogging. Pick whatever topic(s) you have a passion for and blog away. I tend to use mine as a journal of my ongoing progress with Visions Of Chaos with some interesting info for fellow nerds. It is always great when someone takes some info here, extends it and lets me know about it. That is the true shared knowledge power of the Internet at work.

Jason.

Venus Transit footage from SDO

Here is an awesome movie showing the transit of Venus yesterday.

Watch in highest def possible full screen.

More info about the movie with higher resolution movies and images to download here.

Thanks to The Bad Astronomer for the link. I knew that Phil would find the best example of the transit after it was all over and he didn’t let us down.

Jason.

Shared Knowledge

I have been meaning to post about this for a long time.

In the past I used to keep my latest secrets secret. As a developer writing fractal software (or any other software) you want your application to have those “wow” features that no other app can duplicate.

That was a simple-minded and foolish belief. The entire evolution and progress of the human existance is based on people sharing their knowledge and discoveries.

Fractal Forums (actually there is only the one forum, so maybe it should be Fractal “Forum”) was one of the major things that changed my mind. Seeing people happily sharing ideas and developing them together that lead to incredible discoveries (outside the usual scientific community and peer-reviewed papers) was a welcome breath of fresh air. The original thread covering how the Mandelbulb was discovered shows this process.

Ever since then I have tried my best to share and explain ideas and it has been a very constructive and inspirational experience. Many a time I have shared a snippet of code with another chaos enthusiast who wanted to implement the same thing in their own code. The majority of the time they are very grateful and usually find a new twist to the code or idea I never would have had. This creates the feedback effect of leading to knew ideas that neither of us could have created before.

With this blog I have tried to change from making it an advert for a new release of Visions Of Chaos into a place I can hopefully help others understand the (relatively) simple maths behind chaos theory related ideas so they can enjoy and understand these principals themselves and (most importantly) come up with new ideas and advance the field.

Before the Internet was out there and when I was originally interested in fractals and chaos I only had books from the library to rely on to try and understand and learn how these ideas worked. The first real inspiration was Gleik’s Chaos that really got me into trying to code software to create those simple things like Mandelbrot Sets and Lorenz Attractors. Since the Internet that has all changed. The incredible result of shared knowledge is mind blowing. Whatever obscure topic you are interested in will be covered by someone else out there. You can usually find PDF versions of important papers on any topic. CiteSeer is an excellent resource when researching papers. If that doesn’t work a Google search for “paper name” pdf will usually find a cached copy somewhere. Sites like Open Processing.org are brilliant with source code to explain how an idea works.

All of this does lead to attribution. If you do share an idea then it can (and usually will) lead to someone using that idea and (in the worse case) calling it their own. This can be discouraging, but don’t let it get you down. I try my best to cite the original sources when I develop a new bit of code. Everyone likes to know that their knowledge and ideas were appreciated and repsected.

Another sig at Fractal Forums included “I beg of you to enrich others as you have been enriched” and I think that sums it up. Without the vast pool of knowledge out there I would have never been able to add all the features into Visions Of Chaos that I have so far and will into the future.

Share the knowledge.

Jason.

Dots Maker

The game of Dots and Boxes has been around for many years and no doubt most people played it as a kid.

I was recently having a few games with a mate of mine over some beers and we both realised how tedious the initial setup phase of the game is (initially drawing up the grid of dots and then filling in the random spots until you reach the “end game” of actually using some strategy to fill in the boxes). So after some hacking I wrote a simple app to generate and print game setups.

The first version makes a “perfect” setup in which every move is going to give the oponent a completed box.

That worked OK, but it came down filling in the single boxes, then the doubles, then the triples etc without any chance for a free move to be found.

If the Perfect checkbox is unchecked then after the initial perfect setup is generated there is a 1 in 4 chance of existing walls being removed. This allows a few free moves before the end game begins.

There has been some extensive analysis into the game and many strategies exist for good gameplay.

I had always played the rule that if you can complete a box you have to. Apparently this is the simpler version of the game and the real rules state you do not have to take a box unless you want to. Playing this version opens up many more strategies (see previous strategies link).

If you want to try the app, grab it here. Single exe, just download and run it. It detects the optimal grid size for your current printer when you start it up.

Jason.

Der Lauf der Dinge

Here is a great 30 minute “art” film by Peter Fischli and David Weiss. If you ever enjoyed Mousetrap as a kid or Rube Goldberg if you are a bit older then you will love this.

German title Der Lauf der Linge translates to “The Way Things Go” in English. I remember tracking this video down years ago and it was not easy. Thanks to YouTube it is out there for everyone to appreciate.

It may not be as perfected as the now classic 1 million pound Honda Cog ad, but it was 2 guys in a warehouse doing it for the love of doing it. Apparently Fischli and Weiss did get a bit stroppy and accused the Cog ad of plagarism. Sheesh!

Here is the original 2 minute cut of the Honda Cog ad.

Jason.