update: add FLAT

This commit is contained in:
2025-12-07 13:13:50 -05:00
parent 41f24e88e9
commit 17165cca66

View File

@@ -5,16 +5,19 @@
#include <gsl/gsl_errno.h>
#include <math.h>
#define FLAT 0
#define PI 3.1415926535897932384626433832795028841971693993751058
#define Rs 1
#define M (0.5*Rs)
#define M (FLAT ? 0 : 0.5*Rs)
#define R0 (15*Rs)
#define f(r) ((1.0-Rs/((double)r)))
#define bmin (1.5*sqrt(3.0)+5e-10)
#define f(r) ((1.0-(2*M)/((double)r)))
#define bmin (FLAT ? 1e-10 : 1.5*sqrt(3.0)+5e-10)
#define cotpsi_max (sqrt(R0*R0/(bmin*bmin*f(R0)) - 1))
#define THETAERROR 100000
#define color_index(i,j,c) (j*W*3+i*3+c)
#define cutperc (FLAT ? 1.0 : 0.99)
typedef struct {
int W;
int H;