colorMode(3)???
              in 
             Programming Questions 
              •  
              3 years ago    
            
 
           
             Hello,
            
            
I came across this neat little sketch over at openprocessing: http://www.openprocessing.org/visuals/?visualID=3867
            
int i,j;
void draw(){
colorMode(3,250);
filter(11);
smooth();
for(j=0;j<25;j++){
fill(n(5),250,250);
ellipse(n(0),n(9),n(40)/6,n(40)/6);
}
i++;
}
float n(int k){
return noise(j+mouseX,k+mouseY,i*0.007)*350-15;
}
            
            
and I noticed that a couple of functions like colorMode() and filter() have numbers in their parameters. I thought these only worked if very specific parameters like 'RGB' or 'THRESHOLD' were used. What's going on here?
 
           
 
            
           I came across this neat little sketch over at openprocessing: http://www.openprocessing.org/visuals/?visualID=3867
int i,j;
void draw(){
colorMode(3,250);
filter(11);
smooth();
for(j=0;j<25;j++){
fill(n(5),250,250);
ellipse(n(0),n(9),n(40)/6,n(40)/6);
}
i++;
}
float n(int k){
return noise(j+mouseX,k+mouseY,i*0.007)*350-15;
}
and I noticed that a couple of functions like colorMode() and filter() have numbers in their parameters. I thought these only worked if very specific parameters like 'RGB' or 'THRESHOLD' were used. What's going on here?
 
              
              2  
            
 
            
 
 
           
 
            