On Thu, 8 Oct 1998, Dave VanHorn wrote: > I like the eight-colored ball idea best. Could it be read by > illuminating with red, green, and blue leds and measuring the > reflectance? That would also be visually cool, another plus point with > this type of thing. An eight-colored ball poses the indexing problem, i.e. where do you start reading ? Also, you don't need 8 colors, you need 7 unique tokens (since there is no way to establish an order), readable simultaneously (2^7 = 128). So it's more like representing 128 distinct colors on a surface. By using color alone, you need to resolve about 3 degrees in the color plane, and that's bad news. It is very hard to make ink that does that cheaply, and the detection is not fun, let alone printing. By using grayscale plus primary colors you can split off 4 levels of grayscale (including white and black), plus a white reference area. This cuts 2 bits off the 7, leaving 5 to be color coded. By giving each color 2 bits, you get 6 bits, one spare for parity/error checking (2+2+2+2=7+1), or... se below. This code can be represented by printing in 4-color print on the balls (this is not easy - i.e. not cheap), a pattern like this, several times - see below why and where: - white background - also white reference - the bare ball - a square or other shaped zone, printed with one of 4 gray levels, from white to black. Can also be some other shape, but its surface must equal the area of a zone (see below): - three groups of two zones each, printable with a primary color or black (or white) each. - all four zones must be printed such, that a whole zone is visible however you look at the ball, and no other zone is partially visible (at the corners of a circumscribing tetrahedron projected on the sphere). Because of the ambiguity such generated (when viewing from a point on a perpendiculary from a touch point) there is a need for a second set of patterns, with a code distinct from the 1st one's, printed on the touch point positions, and encoding the same information. The 8th available bit could be used for this (to encode the 2nd group). - This system requires 2 distinct color patterns printed 4 times each on each ball, at precise angles, there being 90 distinct combinations of these. Ouch. I make an educated guess by saying that this image can be converted into a useful signal by shooting the scene with a color TV camera such that a pattern fills at least 1/5 of the screen area, worst case, and all other colors in the scene are neutral. The white balance on the camera needs to be locked out, and the signal can be analyzed using either a semi-analog sample and hold and quantization method for Y and C yielding signals for A/D converters (yes, a PIC's A/Ds would be enough), or digitized by a computer frame grabber and analyzed in software (neater, but not a PIC project). Only one ball should be in the image at any one time. Or at least only one MOVING ball in the case of the digitizer. There remains to be found a printer who will print 90 different patterns, using 4-color printing, several times each, at relatively accurate angles, onto ping-pong balls, at reasonable cost. Double-ouch. So, a black/white pattern printed on each ball is a much better idea imho, using the same TV camera and digitzer method for readout. You can still paint the balls like easter eggs by dipping before or after printing, just use transparent paint for good contrast ;) Peter