LitSimulate is a simulator which simulates what LitSpin will display. We developed the first versions with PyOpenGL and PyGame.

## Image Format

Each 3D image is represented by a classical image. If we note r the radial resolution (total number of columns), h the number of LEDs by column and n the number of steps by rotation, our image dimensions are rh x n. In our case r=20, h=32 and n=128. So we have 640×128. One line represents the n points one led will display. And each block of h lines represents the 360° image of a column from the outermost to the innermost (from 1 to r). Just below an example with r = 8.

## Examples of simulation

We made some simulations with r=10, h=10 and n=100

## Limitations

For now, we simulate an 8-bits-by-colour display and not a 9-bits-by-colour one. This is just because it is easier to create an 8-bits image on the internet rather than 8 bits. However, it will be very simple to change LitSimulate into a 9-bit simulator.

The main issue is a problem of memory. Indeed, the RAM is constantly filling up until the PC is completely blocked. So we can only use this first version of the simulator for a few seconds. Moreover, we can’t simulate with our real values of r, h and n because it takes too much memory to display the results. To deal with this issue there will be several steps:

- We will try to fix it by keeping Pygame et PyOpenGL
- If we can’t, we will try without PyGame and only use PyOpenGL (because PyGame is used to initialize OpenGL display). Maybe we would directly go to step 3
- If it is still too slow, we will make the simulator in C++
- If it is still too slow or too complicated, we will try the Point Cloud Library for C++

I don’t remember seeing 9-bits-by-colour mentioned before, so perhaps I missed the explanation, but:

Why use 9-bits-by-colours?

It sounds very high considering all the other requirements

We used 9-bits colours because the company we work with asked this precision for colours. Moreover, it is not very difficult to use thanks to the drivers we will use. They can handle 9 to 16 bits by colour.