Computer Science Canada

something wrong with turing??

Author:  person [ Fri Feb 04, 2005 11:02 am ]
Post subject:  something wrong with turing??

something really odd in turing, maybe its something wrong with the language????....???

<Input>
drawfilloval (100, 100, 70, 70, 44)
put whatdotcolour (100, 100)

<Output>
14 and a yellow circle

Author:  Tony [ Fri Feb 04, 2005 11:10 am ]
Post subject: 

well what color is 14? Confused my guess that it's yellow

Author:  person [ Fri Feb 04, 2005 11:28 am ]
Post subject: 

yes...14 is yellow but as u can see...my circle's colour is 44

Author:  Flikerator [ Fri Feb 04, 2005 11:57 am ]
Post subject: 

It mixes it up on a phew different colours too. So its not just limited to 44. It seems that several colors are the same?

Author:  Neo [ Fri Feb 04, 2005 11:57 am ]
Post subject: 

44 and 14 are both the same colour, yellow. Just like 32 and 9 are blue.

Author:  Delos [ Fri Feb 04, 2005 12:10 pm ]
Post subject: 

Explanation:

Original Turing had just a few colours (prolly ~1-8). Then they added more. The first few colours are based on maxing out RGB values. So, you've got Red, where:
R:1.0, G:0.0, B:0.0
And somewhere Purple:
R:1.0, G:0.0, B:1.0
and so on and so forth. This was fine for the limited graphics you could get in Classic Turing.

Once the switch to OOT was made, 256 colours came into being. This started at around colour 17 or so, and was based on adding fractions to RGB instead of wholes so as to get a lot more colours.
This meant that at some point, you'd get R:1.0, G:0.0, B:0.0 and such. Thus the duplication.
Of course, they could've been clever and have reset the entire scheme so that it made sense...and they could've supported more than just freggin' 256 colours...but well, it's Holt and we don't question them (much).
Now, of course, RGB has been implemented in a very limited fashion. Sure you can make new colours, but try load in a .jpg and read the colours at any point using whatdotcolour(). You'll only ever get values that read in the 0-255 range. Why? For some odd reason, OOT cannot take a pixel and return its true specific RGB values...only the ones it wants to believe they are...[sigh].

Anyhow, this can pose quite a problem for you if you're working w/ more than ~16 colours, and using whatdotcolour() as has just been demonstrated.

Author:  Tony [ Fri Feb 04, 2005 12:11 pm ]
Post subject: 

Turing's pallet has no reason to it.

First 32 colors or so are various colours that were used in older turing versions (DOS and such). This way it allows for a some degree of capability between versions.

It is followed by a black to white gradient

Then a short rainbow gradient repeated 3 times with various intensities.

get your Turing colours straight Wink
and whatever Delos said


: