留学生辅导 #include “image.h”

#include “image.h”

void write_image(const char *path, vec3 *image, int image_width, int image_height)
f = fopen(path, “w”);

Copyright By PowCoder代写 加微信 powcoder

fprintf(f, “P3\n%d %d\n%d\n”, image_width, image_height, 255);
for (i = 0; i < image_width * image_height; i++) fprintf(f,"%d %d %d ", to_rgb(image[i].x), to_rgb(image[i].y), to_rgb(image[i].z)); fclose(f); 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com