Transferring the code structure from Processing.