update: add help function
This commit is contained in:
@@ -3,12 +3,20 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "init.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){
|
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 dw = (system->w)/(system->W); // width and hight of one pixel
|
||||||
double x_lu = i*dw - (system->w)/2;
|
double x_lu = i*dw - (system->w)/2;
|
||||||
double y_lu = -j*dw + (system->H)*dw/2;
|
double y_lu = -j*dw + (system->H)*dw/2;
|
||||||
|
|
||||||
//TODO: fill the MC intergral
|
//TODO: fill the MC intergral
|
||||||
|
// linear rgb = ∫ rgb(χ, ϕ) sin^2(χ) χ'(ψ) dx dy
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user