update: add help function

This commit is contained in:
2025-11-28 21:37:41 -05:00
parent 4d37621fc6
commit 2b4b36963d

View File

@@ -3,12 +3,20 @@
#include "common.h"
#include "init.h"
inline double xy_to_b(double x, double y) {
double tanpsi2 = x*x+y*y;
double cotpsi2 = 1/tanpsi2;
double b = R0/sqrt(f(R0)*(1+cotpsi2));
return b;
}
int MC_pixel_render(const System *system, int i, int j, const gsl_spline *spline, double *rgb, int pixel_render_max, double pixel_render_err){
double dw = (system->w)/(system->W); // width and hight of one pixel
double x_lu = i*dw - (system->w)/2;
double y_lu = -j*dw + (system->H)*dw/2;
//TODO: fill the MC intergral
// linear rgb = ∫ rgb(χ, ϕ) sin^2(χ) χ'(ψ) dx dy
return 0;
}