Using filters to aid logic calculations
With the introduction of flash 8 we had the ability to manipulate bitmaps with filters. Flash player 9 optimises the calculations of these filters and flash player 10 promises to preform these calculations on the clients graphics hardware. I believe that there are many non-graphic applications of these technologies such as path finding.
In the example below I have investigated using a simple convolution filter to expand the area of colour by one pixel. Repetitively applying this filter allowed me to fill a maze like pouring a can of paint in a mouse maze. Once the destination is reached it is a simple process to back track and evaluate the route taken. This route will be the fastest possible.
Tags: AS3, BitmapData, convolutionFilter, maze
February 27th, 2008 at 11:11 am
I like your maze. Written in AS3? Maybe we should think of some cool use for it.
February 27th, 2008 at 11:14 am
but the calculation of the shortest way seems to be a bit weird though! the green goes everywhere
February 27th, 2008 at 11:57 am
The final image seen represents all the points that could be reached in the same time as the destination point. This is akin to pouring green paint into the maze and then stop pouring when the destination has been covered.