Basic porting of processing code done

It goes faster in the browser than in the original processing! :o