Пример #1
0
void JuliaImageSequential::refreshAll(const DomaineMaths& domainNew){
    int w = getW();
    int h = getH();

    float dx = (float) (domainNew.dx / (float) w);
    float dy = (float) (domainNew.dy / (float) h);
    float y = domainNew.y0;

    for(int i = 1; i <= h; ++i){
	float x = domainNew.x0;

	for(int j = 1; j <= w; ++j){
	    float h = julia(x, y);

	    //setFloatRGBA(i, j, h, h, h);
	    if(h == 0){
		setHSB(i, j, 0, 0, 0);
	    } else {
		setHSB(i, j, h, 1.0, 1.0);
	    }

	    x += dx;
	}

	y += dy;
    }
}
Пример #2
0
//--------------------------------------------------------------
void testApp::update(){
    setHSB();
    timeCounter = timeCounter + D;
    if (timeCounter > 1){
        tick = true;
        timeCounter = D;
    }
}
Пример #3
0
void LightEvent::setHSBBrightness(byte brightness)
{
  setHSB(m_hue, brightness);
}
Пример #4
0
void LightEvent::setHSB(byte red, byte green, byte blue, byte brightness)
{
  setHSB(mapHue(red|green<<2|blue<<4), mapBrightness(brightness));
}
Пример #5
0
void LightEvent::setHSBColor(byte red, byte green, byte blue)
{
  setHSB(red, green, blue, m_brightness);
}