Greetings my fellow Processing fans of all skills and involvements, I bring you good news and tidings of joy! Yes, you get the Christmas / Holiday seasonal reference because I feel like jolly old Saint Nick himself right now, sharing a rather curious gift with you. Here is the scenario (and bear with me, the tech follows soon):
For Christmas in March this year, we wake up with glee, anticipation and eyes filled with wonder and make our way to the dazzling tree under which lies many gifts including a curious little box wrapped with paper displaying many small polka dots of various colors. Exclaiming joy with a shout, we select this present to open first and bring it to our parents who are sleepily smiling after a long night of something that parents enjoy and children know not (heeee).
Quickly we unwrap this new toy, wondering what it may be. Inside the box we find a pair of translucent red casino dice, the six-sided variety naturally, and to our amazement we also find a tiny scroll, how unexpected this is! We examine the scroll, noticing that it is printed on thermal paper using a dot matrix print head, the style of which was once ubiquitous long before our time.
Slowly we unroll the scroll as our parents watch with knowing smiles, for they understand what they have given us. Upon it's medium brown, slightly smeared thermal printed surface we see code. In fact it is Processing code - we recognize it from watching our parents program Processing sketches in their home office on the second floor of our house. Eagerly seeking to know what this code might actually do, we read the comments at the top which tell us the following:
// Pointillism Video Streaming Algorithm Library for Processing
//
// concept by Inventor Alchemi
// code by several contributors from the processing.org forum
//
// This library implements the Pointillism Video Streaming Algorithm
// in a few of its more fundamental flavors including these versions:
// - Synchronized Pseudorandomly Generated Addressing
// - Delta Transmit Only Encoding
// - Motion Area Focus Technique
// - Pixel Size Variation Method
// - Verification and Troubleshooting Tools
//
// This library and the algorithm that it is based upon are freely given
// to the Processing community for distribution under the license of
// their choice.
//
By now you can probably take a pretty good guess at describing the algorithm implemented by the library that was printed on the scroll for the young programmer to explore under his or her parent's guidance. To be clear about it all, I will explain the algorithm that I imagineered approximately 48 hours ago on 8/20/2013 in the wee hours of the morning. First, however I will just quickly comment upon the originality of the algorithm.
When you create anything that is original, you "invent" it yourself. Often however as time unfolds and awareness of prior art increases, you discover the existence of prior art which to me makes your act of creation actually be properly named a "reinvention". Usually the reinvention has some unique, novel aspects to it because it really was your original idea albeit not the first ever, so you probably imagined it in a somewhat different way than shown in the prior art. This may or may not be enough for a patent or copyright, or intellectual property protection may not be an issue at all if you plan to just give away the idea as I am doing here.
So please allow me to state that whether this video streaming technique be invention, reinvention or whatever else, I give it freely to the Processing community as a thank-you gift for giving me the Processing language and related software. This does not mean that I give the Pointillism algorithm to the world freely, it means that the entity that represents the Processing community, whatever that legally is, now owns the intellectual property rights, be they of any value or originality or not.
That said, here is how Pointillism Video Streaming is intended to work:
The context is a client-server downstream video transmission such as a web page based client written in Processing and targeted to javascript which receives a continuous stream of data from the server, which is also written in Processing. The processing.net library is used to perform the client-server communications and other related functions, providing the transmit layer at and below Processing's positioning in the hierarchy of all programming and scripting language.
The operation of the algorithm within that context is that the server generates a psuedorandomly selected <X, Y> 2D vector which selects just one of all the pixels of the rendered Processing scene, then reads that pixel's color and sends the vector <X, Y, c>, where c is the color, downstream to the client. Receiving this Pseudorandom Pixel Stream, if we may call it that, the client Processing sketch immediately draws the transmitted color, c, at location <X, Y> on the screen. This repeats for pixel after pixel indefinitely.
So now the cat is out of the bag and surely you can think of some advantages and disadvantage of this Pointillism algorithm as well as some possible implementations as described by the acronyms made up in the scroll's comments above this writing. I rather fancy the use of synchronously seeded pseudorandom generators on the client and the server so that the <X, Y> vector need not be transmitted, and the delta, focus, and size algorithm modifications you can imagine from their acronyms.
Well my fellow Processing coders, I am tired now after a long night on the web and all this typing, so I will take my leave of you now and have a little nap in my comfy bed. I do hope that this post is of some value to someone somewhere, at the very least. Enjoy your imagineering, and thank you for reading my silly story.
Inventor Alchemi