new: test_png.c
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user