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

Username:   Password: 
 RegisterRegister   
 Tree
Index -> Programming, Turing -> Turing Submissions
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jodo Yodo




PostPosted: Sat Mar 06, 2004 10:26 pm   Post subject: (No subject)

Wow, that's a sweet tree.
Sponsor
Sponsor
Sponsor
sponsor
programer007




PostPosted: Sun Mar 07, 2004 4:51 pm   Post subject: (No subject)

that a Nice tree.... whats the Gradient command all about.....
and when do you get to learn all those advanced functions in class??? gr.10?? or 11? or 12?
Catalyst




PostPosted: Sun Mar 07, 2004 5:28 pm   Post subject: (No subject)

the AddGradient command just make a smooth blend from color1 to color2 in a certain number of steps
and you dont learn these functions in class
jonos




PostPosted: Sun Mar 07, 2004 6:38 pm   Post subject: (No subject)

it doesn't work unless i change the colour for the Draw.ThickLine, it says it can't make a colour over 290
Catalyst




PostPosted: Sun Mar 07, 2004 7:00 pm   Post subject: (No subject)

well turing is buggy so what works in one version doesnt always work in the next

for 4.05 try this instead of the original AddGradient

code:

var pos : int := 0
var colorTable : array 1 .. 255, 1 .. 3 of real
for i : 1 .. 255
    RGB.GetColor (i, colorTable (i, 1), colorTable (i, 2), colorTable (i, 3))
end for
proc AddGradient (c1, c2, n : int)
    var clr : int
    var r1, g1, b1, r2, g2, b2, p, p0 : real
    r1 := colorTable (c1, 1)
    g1 := colorTable (c1, 2)
    b1 := colorTable (c1, 3)
    r2 := colorTable (c2, 1)
    g2 := colorTable (c2, 2)
    b2 := colorTable (c2, 3)
    const a := 50
    for i : 1 .. n
        p := (i / n) * 100
        p0 := 100 - p
        RGB.SetColor (pos, (((r1 * p) + (r2 * p0)) / 2) / a, (((g1 * p) + (g2 * p0)) / 2) / a, (((b1 * p) + (b2 * p0)) / 2) / a)
        pos += 1
    end for
end AddGradient
WhatAmIDoing




PostPosted: Mon Mar 08, 2004 12:31 pm   Post subject: nice

ya thats a pretty cool program. and i know how stupid my class is
Atma Weapon




PostPosted: Wed Mar 24, 2004 5:39 am   Post subject: (No subject)

I'm glad for that bump, that's really freaking awesome.

Catalyst 4 Turing God in 2004.
valor




PostPosted: Thu Apr 01, 2004 9:54 pm   Post subject: (No subject)

nice. i like how it makes alot of diff branches
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 23 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: