spinning voxels in Flash

Give it time to load, the hosting site is really slow

Haxe is a great tool for making Flash programs in.  One thing that Haxe supports is special op-codes for raw memory access.
  • allocate the buffer using will.basicMemoryManager
  • we let the object container do the rotation and such
  • for each frame, we regenerate the image that we're spinning
  • the voxels look like columns, but are actually streaks on a flat image
  • in this example we take an aerial view of London and use edge-detection to give us some heights; you could obviously create a better height-map
  • we only have to calculate the offsets for the pixels in the line using Bresenham for each rotation once, and can put this into the memory
  • we can then walk this list of offsets for each voxel stack
  • it's important we start walking from the right edge in the right direction to z-order problems
  • we can pre-calculate if voxels are never visible and skip them

Comments