A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arrayfire.org/docs/graphics_2surface_8cpp-example.htm below:

ArrayFire: graphics/surface.cpp

#include <math.h>

#include <cstdio>

static const int M = 30;

static const int N = 2 * M;

int main(int, char**) {

try {

af::Window

myWindow(800, 800,

"3D Surface example: ArrayFire"

);

static float t = 0;

while

(!myWindow.

close

()) {

t += 0.07;

array

z = 10 * x * -abs(y) * cos(x * x * (y + t)) +

sin(y * (x + t)) - 1.5;

}

fprintf(stderr,

"%s\n"

, e.

what

());

throw;

}

return 0;

}

Window object to render af::arrays.

A multi dimensional data container.

Generic object that represents size and shape.

An ArrayFire exception class.

virtual const char * what() const

Returns an error message for the exception in a string format.

void surface(const array &S, const char *const title=NULL)

Renders the input arrays as a 3D surface plot to the window.

bool close()

Check if window is marked for close.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4