Today I finished a first program to transform a shape stored into a 16x16x16 cube as I explained in a previous post.
The program written in C and using the MagickCore API a read a GIF file containing 16 frames of 16×16 pixels describing the cube and outputs a GIF of 32 frames containing what should be displayed by our matrix.
This first version contains a simple algorithm: for each value of height, it computes all the pixels, for that height, of each projection around the axis. It simply takes the values of the pixels that are at the position of the matrix. I made several tries with of without blending. Result are quite good on some cases even though this algorithm is not very realistic.
First example: HARP logo
Second example : Rainbow point
Next step is to implement the painter’s algorithm which shouldn’t be too difficult because I now have all the tools ready. I expect it to give better results. It should be able to fully describe the projection of shapes on a 16x16x16 definition.
This is not the most urgent for the project so I’m gonna help Pierre or Alexandre on their parts during the next few days and work on that when I have time. I also have a formation for three days so I don’t if I will manage to take some time for the project..