This program was designed to demonstrate the principles of structural colouration for a science festival exhibit. It allows the user to construct colours through the creation of an array of nanoscale cylinders which selectively transmit/reflect light according to (semi-)realistic simulations in Comsol. The user can use the designed colours to paint a butterfly image.
The CIE 1931 Colour Space is used to provide the mapping from the transmission/reflection vs wavelength simulation data to the displayed RGB colour.
To run the demonstration, run NanoPaint.py using Python 3. It requires PyQt4, OpenGL, Numpy and Scipy to run.
Comsol simulation data kindly provided by Dr Paloma Arroyo Huidobro.
Stephen.