nice code i will try to use it in opengl to produre nice effects