Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int y = 0; y <= screen_size.height; y++) {
- if(yy==(screen_size.height/frame_buffer_parts)) {
- yy=0;
- esp_lcd_panel_draw_bitmap(panel_handle, 0, y-(screen_size.height/frame_buffer_parts), screen_size.width, y, frame_buffer.begin());
- if(y==screen_size.height) {
- break;
- }
- }
- posReal = startReal;
- for (int x = 0; x < screen_size.width; x++) {
- a = posReal;
- b = posImag;
- for (n = iterations; n > 0 ; n--) {
- a2 = (a * a) >> res_bits;
- b2 = (b * b) >> res_bits;
- if ((a2 + b2) >= (4 << res_bits))
- break;
- b = posImag + ((a * b) >> (res_bits - 1));
- a = posReal + a2 - b2;
- }
- frame_buffer_t::pixel_type px;
- px.native_value = (n * 29)<<8 | (n * 67);
- frame_buffer.point(point16(x,y%(screen_size.height/frame_buffer_parts)),px);
- posReal += incReal;
- }
- posImag -= incImag;
- ++yy;
- }
- elapsedTime = millis()-startTime;
- Serial.print("Took "); Serial.print(elapsedTime); Serial.println(" ms");
Add Comment
Please, Sign In to add comment