new: test_png.c

This commit is contained in:
2025-12-07 05:30:24 -05:00
parent be941f6a4a
commit 1e1c38da4e

23
src/test_png.c Normal file
View File

@@ -0,0 +1,23 @@
#include <stdio.h>
#include "render.h"
#include "write_png.h"
int angle_to_pixel_white(double *angle, double *rgb) {
rgb[0] = 1.0;
rgb[1] = 1.0;
rgb[2] = 1.0;
return 0;
}
int main(){
int W = 1;
int H = 1;
double w = 1;
System system = {W, H, w, angle_to_pixel_white};
double buffer[W*H][3];
render(&system, buffer, 10000, 1.0/256, 1e-1);
write_png("test_white.png", buffer, W, H);
return 0;
}