|
#include <complex.h>/**/ /*Oh,my_dear_friend.How_I've_missed_you.--C-3PO***/ |
|
#include <stdio.h> |
|
#include <time.h>/**** ****/ |
|
|
|
|
|
|
|
int *d; |
|
int D[9999]; |
|
int N = 20; |
|
int L = 4; |
|
int n; |
|
int pixel_index; |
|
int color_value; |
|
int a[3]; |
|
int i; |
|
|
|
char *p; |
|
char *q; |
|
char screen_buffer[2000] = "L@X-SGD-HNBBB-AD-VHSG-\ |
|
-XNT\x1b[2J\x1b[H"; |
|
char *s = screen_buffer; |
|
char *G = "r2zZX!.+@KBK^yh.!:%Bud!.+Jyh.!6.BHBhp!6.BHBh!:%Bu\ |
|
v{VT!.hBJ6p!042ljn!284b}`!.hR6Dp!.hp!h.T6p!h.p6!2/LilqP72!h.+@QB!~}lqP72/Lil!\ |
|
h.+@QBFp!:)0?F]nwf!,82v!.sv{6!.l6!,j<n8!.xN6t!&NvN*!.6hp"; |
|
typedef complex double(c); |
|
|
|
c (control_points)[3]; |
|
c point_value; |
|
c offset; |
|
c calculate_value(double t) { |
|
|
|
double s = 1 - t; |
|
double u; |
|
point_value = s * s * control_points[1] + 2 * s * t * *control_points + t * t * control_points[2] + offset; |
|
u = I * point_value; |
|
return +48 * ((s = point_value) + 48 * I) / (1 < u ? u : 1); |
|
} |
|
void evaluate_and_draw_interval(double t, double u) { |
|
double s = point_value = calculate_value(t) - calculate_value(u); |
|
(s = point_value * (2 * s - point_value)) < 1 ? pixel_index = point_value = calculate_value((t + u) / 2), color_value = -I * point_value, |
|
pixel_index > -41 &&pixel_index < 39 && 9 < color_value &&color_value < 48 |
|
? pixel_index += color_value / 2 * 80 + 73, |
|
screen_buffer[pixel_index] = screen_buffer[pixel_index] - 73 ? color_value % 2 ? screen_buffer[pixel_index] - 94 ? 95 : 73 |
|
: screen_buffer[pixel_index] - 95 ? 94 |
|
: 73 |
|
: 73 |
|
: 1 |
|
: (evaluate_and_draw_interval(t, (t + u) / 2), evaluate_and_draw_interval((t + u) / 2, u), 0); |
|
} |
|
int(main)(int(x), char **V) { |
|
; |
|
clock_t(c) = clock(); |
|
; |
|
; |
|
for (d = D; pixel_index < 26; pixel_index++, s++) |
|
*s > 63 ? *d++ = pixel_index % 7 * 16 - 7 * 8, *d++ = pixel_index / 7 * 25, *d++ = *s - 64 : 0; |
|
; |
|
if (V[1]) { |
|
; |
|
; |
|
; |
|
FILE *F = fopen(V[+1], "r"); |
|
for (d = D, L = N = pixel_index = 0; (x = fgetc(F)) > 0 || fclose(F);) |
|
if (x > 13 ? 64 < x &&x < 91 ? *d++ = pixel_index * 16, *d++ = L * 25, |
|
*d++ = x % 26 : 0, pixel_index++, 0 : 1) |
|
for (++L; d - D > N * 3 || (pixel_index = 0); N++) |
|
D[N * 3] -= pixel_index * 8; |
|
} |
|
for (; i < 200 + L * 25; i++) { |
|
for (n = 0, p = screen_buffer + 33; n<1920; *p++ = n++ % 80> 78 ? 10 : 32) { |
|
} |
|
for (*p = x = 0, d = D; x < N; x++, d += 3) { |
|
offset = (d[1] - i - 40) * I + *d; |
|
n = d[2]; |
|
p = G; |
|
for (; n--;) |
|
for (; *p++ > 33;) |
|
; |
|
*a = a[1] = *p++; |
|
for (; *p > 33; p++) |
|
if (*p % 2 ? *a = *p, 0 : 1) { |
|
a[2] = *p; |
|
for (pixel_index = 0; pixel_index < 3; pixel_index++) { |
|
color_value = a[pixel_index] / 2 - 18; |
|
q = "/&&&##%%##.+),A$$$$'&&'&&((%-((#'/#%%#&#\ |
|
&&#D&"; |
|
for (n = 2; color_value--;) |
|
n += *q++ - 34; |
|
control_points[pixel_index] = n % 13 + n / 13 * I; |
|
} |
|
evaluate_and_draw_interval(0, 1); |
|
*a = a[1] = *p; |
|
} |
|
} |
|
for (puts(s), s = screen_buffer + 30; (clock() - c) * 10 < i * CLOCKS_PER_SEC;) |
|
; |
|
} |
|
return 0; |
|
} |