Dec 03, 2005 13:32
I am programming something and came accross some math thinking. After solving my issue, I thought this might be a good puzzle:
The format of the following table is
abc
where a and b are 2 variables that resolve in c.
I will give you 4 sets of variables and their outcome (c).
332889
554815
10010096300
235315226545
At this point, I just asked my dad, he didn't even really try to solve it. So I need to provide more information where those values are coming from:
a and b represent coordinates on a web cam, that is 320x240 pixels resolution. In this case, a represents the Y-coordinate and b the X-coordinate.
Any further info might make this too easy, so you need to highlight it to see it:
More info:
All information about the entire picture frame coming from the cam is stored in 1 big array of type integer.
And more:
c is a single field in the arry, that gives me an integer value.
More again:
Every c value represents the red value of a pixel (0 to 255).
c+1 gives me the green and c+2 the blue. (c+3 is technically illegal as it would give me the red value of the next pixel)
Hmm, maybe I should give a view more sets just to be sure it's not impossible to solve, or for you to be sure that your math is right:
(I have hidden the c values in case you want to try it the hard way, otherwise highlight)
808077040
818178003
808177043
818078000
Ok, now whats my algorithm?