Ejemplo n.º 1
0
//--------------------------------------------------------------
void testApp::update()
{
	
//////////////////Prod Section //////////////////
    makeNoise();
    runLights(br);
    ofLog() << ofGetFrameRate() ;  
}
Ejemplo n.º 2
0
//..............................................................................
float smoothNoise(float x, float y, int i)
{    
    float corners = (makeNoise(x-1, y-1, i)+makeNoise(x+1, y-1, i)+makeNoise(x-1, y+1, i)+makeNoise(x+1, y+1, i) ) / 16;
    float sides   = ( makeNoise(x-1, y, i)  +makeNoise(x+1, y, i)  +makeNoise(x, y-1, i)  +makeNoise(x, y+1, i) ) /  8;
    float center  =  makeNoise(x, y, i) / 4;
    return (corners + sides + center);    
}