Thread: Color Cycle
View Single Post
  #6  
Old 05-14-2008, 06:59 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Some more examples:

This example will generate your own color table.
PHP Code:
//#CLIENTSIDE
for (temp.i = 0; temp.i < 115; temp.i ++) {
  
showpoly(300 + i, {p[0] + i, p[1], p[0] + 1 + i, p[1] + 100});
  
changeimgvis(300 + i, 4);
  
temp.color = ColorCycle(i);
  
changeimgcolors(300 + i, color[0], color[1], color[2], 1);
} 
This will generate another color table with a triangular shape:
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
temp.w = 115;
  
temp.h = 10;
  for (
temp.i = 0; temp.i < w * h; temp.i ++) {
    
temp.color = ColorCycle(i);
    
showpoly(300 + i, {p[0] + ((p[0] + i) % w), p[1] + int(i / w), (p[0] + i / 23 + 1), p[1] + int(i / w * h) + 1, (p[0] + 1)});
    
changeimgcolors(300 + i, color[0], color[1], color[2], 1 - (int(i / w)) / 100);
    
changeimgvis(300 + i, 4);
  }
} 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote