On Tue, 17 Aug 1999, Maarten ter Huurne wrote:

> >Since we have 16 colors on the
> >original, the horizontal pixels can have 256 colors (16x16).
> Not exactly. Mixing color A and color B will create the same color as
> mixing color B and color A. So the maximum number of colors is actually 128.

        I little bit more than that I think. Let's do the math exactly
now: it's true that mix(A,B)=mix(B,A), but in the other hand we don't need
to count mix(A,A) twice. The total number of colors on the horizontal will
be h(n)=n*(n+1)/2 (see Knuth, "The Art of Computer Programming, vol.1")
where n is the original number of colors, and in the vertical this will be
v(n)=h(n)*(h(n)+1)/2.

        If we had 16 colors, then h(16)=136 and v(16)=9316, BUT the Parrot
engine can only be used in MSX-1 mode for the moment, and the MSX-1 has
only 15 colors. So the correct number of colors in the simple linear
interpolation will be h(15)=120 and v(15)=7260.

        This only accounts for the linear filter of Parrot. It also has a
non-linear filter that can remove dithering by applying a low-pass filter.
This low-pass filter is also of the form f(n)=n*(n+1)/2 so the final
number of colors will be h(f(15))=7260 and v(f(15))=26357430. Since the PC
can only display 32768 colors in the mode I'm using, what I said before
still applies.

----------------------------------------------------------------
Ricardo Bittencourt               http://www.lsi.usp.br/~ricardo
[EMAIL PROTECTED]  "Ricardo is subtle, but malicious he is not"
------------ Say NO to Coca-Cola. Drink Tubaina. ---------------


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to