82 if (
display->frameStartTime < 0.)
106 double avg =
s.sum/
s.volume;
115 if (((
int)
cn.y) % 2)
cn.y++;
239 unsigned char *
ppm =
malloc (
sizeof(
unsigned char)*3*
cn.x*
cn.y);
243 for (
int i = 0;
i <
cn.y;
i++,
line -= len)
270#define output_ppm(...) do { \
271 static OutputPPMGPU _display = {0}; \
272 output_ppm_gpu (&_display, __VA_ARGS__); \
if TRASH define &&NewPid *& val(newpid, 0, 0, 0)) -> pid > 0) @else @ define is_newpid()(((NewPid *)&val(newpid, 0, 0, 0)) ->pid > 0) @endif Array *linear_tree(size_t size, scalar newpid)
static double interpolate_linear(Point point, scalar v, double xp=0., double yp=0., double zp=0.)
define m((k)==0 &&(l)==0 &&(m)==0) macro2 foreach_point(double _x=0.
void display(const char *commands, bool overwrite=false)
scalar f[]
The primary fields are:
define sysmalloc malloc define syscalloc calloc define sysrealloc realloc define sysfree free define systrdup strdup define file
trace bool box(bool notics=false, float lc[3]={0}, float lw=1.)
scalar scalar coord coord double double * coef
For non-degenerate cases, the gradient is obtained using either second- or third-order estimates.
#define glBindVertexArray
#define glEnableVertexAttribArray
#define glGenVertexArrays
#define glBindFramebuffer
#define glVertexAttribPointer
#define GL_COLOR_BUFFER_BIT
static struct @7 GPUContext
static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
void output_ppm_gpu(OutputPPMGPU *display, scalar f, FILE *fp=stdout, int n=N, char *file=NULL, float min=0, float max=0, float spread=5, double z=0, bool linear=false, coord box[2]={{X0, Y0}, {X0+L0, Y0+L0 *Dimensions.y/Dimensions.x}}, scalar mask={-1}, Colormap map=jet, char *opt=NULL, int fps=0)
FILE * open_image(const char *file, const char *options)
void(* Colormap)(double cmap[127][3])
void jet(double cmap[127][3])
void close_image(const char *file, FILE *fp)
The statsf() function returns the minimum, maximum, volume sum, standard deviation and volume for fie...