#include <cstdio>
#include <math.h>
static const int ITERATIONS = 30;
static const float PRECISION = 1.0f/ITERATIONS;
int main(int argc, char *argv[])
{
try {
af::Window myWindow(800, 800,
"3D Surface example: ArrayFire");
static float t=0;
while(!myWindow.
close()) {
t+=0.07;
Z = 10*x*-
abs(y) *
cos(x*x*(y+t))+
sin(y*(x+t))-1.5;
}
fprintf(stderr,
"%s\n", e.
what());
throw;
}
#ifdef WIN32 // pause in Windows
if (!(argc == 2 && argv[1][0] == '-')) {
printf("hit [enter]...");
fflush(stdout);
getchar();
}
#endif
return 0;
}