Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 SuperColour
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TheZsterBunny




PostPosted: Wed Feb 25, 2004 5:54 am   Post subject: SuperColour

code:
var clr : int
var r, g, b : real
var rdiff, gdiff, bdiff := 0.005
r := 0
g := .5
b := 1
loop
    if r + rdiff > 1 or r + rdiff < 0 then
        rdiff := -rdiff
    end if
    r := r + rdiff
    if g + gdiff > 1 or g + gdiff < 0 then
        gdiff := -gdiff
    end if
    g := g + gdiff
    if b + bdiff > 1 or b + bdiff < 0 then
        bdiff := -bdiff
    end if
    b := b + bdiff
    clr := RGB.AddColor (r, g, b)
    colorback (clr)
    cls
    locate ((maxrow div 2) - 1, maxcol div 2)
    color (white)
    put whatdotcolor (5, 5)
    delay (50)
end loop


Now, I've never seen a colour code beyond 255 in turing before. What is my program doing?

-Bunny
Sponsor
Sponsor
Sponsor
sponsor
jonos




PostPosted: Wed Feb 25, 2004 4:50 pm   Post subject: (No subject)

i think you're just creating colours with RGB.AddColor. i think i remember cervantes saying something about there being 1024 colours that can be used or something.
Cervantes




PostPosted: Thu Feb 26, 2004 7:21 pm   Post subject: (No subject)

its not that hard to figure out what your prog is doing when you attach the code Razz

and yes you can use more than 256 colours in Turing jonos, maybe 1024, dunno, it wasn't me that said it Razz
TheZsterBunny




PostPosted: Fri Jun 11, 2004 5:26 am   Post subject: (No subject)

--note--
at the time of this post, i was experimenting with the RGB module. it seems to be left out.

-Z
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: