@@ -460,22 +460,23 @@ struct complex complex_mul(struct complex a, struct complex b)
460
460
// First, let's define some properties for full-sized rendering. We assume that
461
461
// full-size is 1:1 to the window, and thus window size = full-size dimensions.
462
462
463
- #define WINDOW_WIDTH 900
464
- #define WINDOW_HEIGHT 600
463
+ #define WINDOW_WIDTH 1920
464
+ #define WINDOW_HEIGHT 1080
465
465
466
466
// Here, we also define reciprocals (1/x) of the width and height, as our big
467
467
// float implementation is currently unable to divide; only multiply. We will
468
468
// elaborate on the big float implementation later. Currently, this represents
469
469
// the raw hexadecimal value of the big float as converting from a decimal
470
470
// value is too difficult.
471
471
472
- #define WINDOW_WIDTH_RECIPROCAL (struct fp256){ SIGN_POS, { 0, 0x0048d159e26af37c, 0x048d159e26af37c0, 0x48d159e26af37c04 } }
473
- #define WINDOW_HEIGHT_RECIPROCAL (struct fp256){ SIGN_POS, { 0, 0x006d3a06d3a06d3a, 0x06d3a06d3a06d3a0, 0x6d3a06d3a06d3a06 } }
472
+ #define WINDOW_WIDTH_RECIPROCAL (struct fp256){ SIGN_POS, { 0, 0x0022222222222222, 0x2222222222222222, 0x2222222222222222 } }
473
+ #define WINDOW_HEIGHT_RECIPROCAL (struct fp256){ SIGN_POS, { 0, 0x003CAE759203CAE7, 0x59203CAE759203CA, 0xE759203CAE759203 } }
474
474
475
475
// This defines how many columns of pixels we draw before presenting a frame
476
476
// to the user. Doing this after too little columns results in slower rendering.
477
+ // This should be a factor of FULL_THREAD_X_SIZE below.
477
478
478
- #define FULL_SHOW_X_INTERVAL 5
479
+ #define FULL_SHOW_X_INTERVAL 10
479
480
480
481
// We are going to render multicore, and the simplest way to do so is to divide
481
482
// up fixed blocks of pixels for each core to render.
@@ -492,21 +493,24 @@ struct thread_block
492
493
493
494
const struct thread_block full_thread_blocks [THREADS ] =
494
495
{
495
- { 0 , 224 , 0 , 299 },
496
- { 225 , 449 , 0 , 299 },
497
- { 450 , 674 , 0 , 299 },
498
- { 675 , 899 , 0 , 299 },
499
- { 0 , 224 , 300 , 599 },
500
- { 225 , 449 , 300 , 599 },
501
- { 450 , 674 , 300 , 599 },
502
- { 675 , 899 , 300 , 599 },
496
+ { 0 , 479 , 0 , 539 },
497
+ { 480 , 959 , 0 , 539 },
498
+ { 960 , 1439 , 0 , 539 },
499
+ { 1440 , 1919 , 0 , 539 },
500
+ { 0 , 479 , 540 , 1079 },
501
+ { 480 , 959 , 540 , 1079 },
502
+ { 960 , 1439 , 540 , 1079 },
503
+ { 1440 , 1919 , 540 , 1079 },
503
504
};
504
505
505
506
// Since this is multicore, the program must be able to know how many columns
506
507
// it should render for each block; it can't just loop through the entire
507
508
// window.
509
+ //
510
+ // This must be the difference between x_start and x_end in full_thread_blocks.
511
+ // And yes, all of them must have the same width.
508
512
509
- #define FULL_THREAD_X_SIZE 225
513
+ #define FULL_THREAD_X_SIZE 480
510
514
511
515
// When switching from preview to full-mode rendering, the user might want to
512
516
// see a black screen so the progress of the render might be easier to see,
@@ -519,6 +523,7 @@ const struct thread_block full_thread_blocks[THREADS] =
519
523
// preview mode differs in that it is much smaller and faster to render, but
520
524
// is almost identical in every other way.
521
525
526
+ // TODO: Need new resolution
522
527
#define PREVIEW_WIDTH 240
523
528
#define PREVIEW_HEIGHT 160
524
529
#define PREVIEW_WIDTH_RECIPROCAL (struct fp256){ SIGN_POS, { 0, 0x0111111111111111, 0x1111111111111111, 0x1111111111111111 } }
@@ -579,7 +584,7 @@ const struct color gradient_stops[GRADIENT_STOP_COUNT + 1] =
579
584
#define INITIAL_CENTER_X (struct fp256){ SIGN_NEG, { 0, 0x8000000000000000, 0, 0 } } // -0.5
580
585
#define INITIAL_CENTER_Y (struct fp256){ SIGN_ZERO, {0} } // 0
581
586
#define INITIAL_SIZE (struct fp256){ SIGN_POS, { 2, 0, 0, 0 }} // 2
582
- #define SIZE_RATIO_X (struct fp256){ SIGN_POS, { 1, 0x8000000000000000, 0, 0 } } // 1.5
587
+ #define SIZE_RATIO_X (struct fp256){ SIGN_POS, { 1, 0xC71C71C71C71C71C, 0x71C71C71C71C71C7, 0x1C71C71C71C71C71 } } // 1920/1080
583
588
584
589
// The program uses a click-to-zoom mechanic, and thus we need to show the user
585
590
// an image so the user knows where they will be zooming into. As with all
@@ -603,11 +608,12 @@ const struct color gradient_stops[GRADIENT_STOP_COUNT + 1] =
603
608
#define ZOOM_IMAGE_SIZE_X 225
604
609
#define ZOOM_IMAGE_SIZE_Y 150
605
610
606
- #define MOVIE 1
611
+ #define MOVIE 0
607
612
#define MOVIE_FULL_SHOW_X_INTERVAL 75
608
- #define MOVIE_INITIAL_CENTER_X (struct fp256){ SIGN_NEG, { 1, 0xFFF1315BACAC51F1, 0xD039000000000000 } }
609
- #define MOVIE_INITIAL_CENTER_Y (struct fp256){ SIGN_NEG, { 0, 0x0000000E217005DA, 0x86D3000000000000 } }
610
- #define MOVIE_ZOOM_PER_FRAME (struct fp256){ SIGN_POS, { 0, 0x8000000000000000 } } // 0.5
613
+ // Coordinates from "Eye of the Universe"
614
+ #define MOVIE_INITIAL_CENTER_X (struct fp256){ SIGN_POS, { 0, 0x5C38B7BB42D6E499, 0x134BFE5798655AA0, 0xCB8925EC9853B954 } }
615
+ #define MOVIE_INITIAL_CENTER_Y (struct fp256){ SIGN_NEG, { 0, 0xA42D17BFC55EFB99, 0x9B8E8100EB7161E1, 0xCA1080A9F02EBC2A } }
616
+ #define MOVIE_ZOOM_PER_FRAME (struct fp256){ SIGN_POS, { 0, 0xFD0F413D0D9C5EF1, 0xDBE485CFBA44A80F, 0x30D9409A2D2212AF } } // 0.5 / 60
611
617
#define MOVIE_PREFIX "movie/frame"
612
618
#define MOVIE_PREFIX_LEN 11
613
619
0 commit comments