Ticket #4502: logosession.lg

File logosession.lg, 2.0 KB (added by walter, 11 years ago)
Line 
1window
2to tasetpalette :i :r :g :b :myshade make "s ((:myshade - 50) / 50) ifelse lessp :s 0 [ make "s (1 + (:s *0.8)) make "r (:r * :s) make "g (:g * :s) make "b (:b * :s) ] [ make "s (:s * 0.9) make "r (:r + ((99-:r) * :s)) make "g (:g + ((99-:g) * :s)) make "b (:b + ((99-:b) * :s)) ] setpalette :i (list :r :g :b) end to rgb :myi :mycolors :myshade make "myr first :mycolors make "mycolors butfirst :mycolors make "myg first :mycolors make "mycolors butfirst :mycolors make "myb first :mycolors make "mycolors butfirst :mycolors tasetpalette :myi :myr :myg :myb :myshade output :mycolors end to processcolor :mycolors :myshade if emptyp :mycolors [stop] make "i :i + 1 processcolor (rgb :i :mycolors :myshade) :myshade end to tasetshade :shade make "myshade modulo :shade 200 if greaterp :myshade 99 [make "myshade (199-:myshade)] make "i 7 make "mycolors :colors processcolor :mycolors :myshade end to tasetpencolor :c make "color (modulo (round :c) 100) setpencolor :color + 8 end make "colors [ 99  0  0 99  5  0 99 10  0 99 15  0 99 20  0 99 25  0 99 30  0 99 35  0 99 40  0 99 45  0 99 50  0 99 55  0 99 60  0 99 65  0 99 70  0 99 75  0 99 80  0 99 85  0 99 90  0 99 95  0 99 99  0 90 99  0 80 99  0 70 99  0 60 99  0 50 99  0 40 99  0 30 99  0 20 99  0 10 99  0  0 99  0  0 99  5  0 99 10  0 99 15  0 99 20  0 99 25  0 99 30  0 99 35  0 99 40  0 99 45  0 99 50  0 99 55  0 99 60  0 99 65  0 99 70  0 99 75  0 99 80  0 99 85  0 99 90  0 99 95  0 99 99  0 95 99  0 90 99  0 85 99  0 80 99  0 75 99  0 70 99  0 65 99  0 60 99  0 55 99  0 50 99  0 45 99  0 40 99  0 35 99  0 30 99  0 25 99  0 20 99  0 15 99  0 10 99  0  5 99  0  0 99  5  0 99 10  0 99 15  0 99 20  0 99 25  0 99 30  0 99 35  0 99 40  0 99 45  0 99 50  0 99 55  0 99 60  0 99 65  0 99 70  0 99 75  0 99 80  0 99 85  0 99 90  0 99 95  0 99 99  0 99 99  0 90 99  0 80 99  0 70 99  0 60 99  0 50 99  0 40 99  0 30 99  0 20 99  0 10] make "shade  50 tasetshade :shade to turtleblocks_0
3to start  tasetpencolor _green
4end