# tf\_mandelbrot\*

Computes the [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set) over the complex domain \[`x_min`, `x_max`), \[`y_min`, `y_max`), discretizing the xy-space into an output of dimensions `x_pixels` X `y_pixels`. The output for each cell is the number of iterations needed to escape to infinity, up to and including the specified `max_iterations`.

* [tf\_mandelbrot](#tf_mandelbrot)
* [tf\_mandelbrot\_float](#tf_mandelbrot_cuda)
* [tf\_mandelbrot\_cuda](#tf_mandelbrot_cuda)
* [tf\_mandelbrot\_cuda\_float](#tf_mandelbrot_cuda_float)

## tf\_mandelbrot

```
SELECT * FROM TABLE(
  tf_mandelbrot( 
    x_pixels => <x_pixels>,
    y_pixels => <y_pixels>,
    x_min => <x_min>,
    x_max => <x_max>,
    y_min => <y_min>,
    y_max => <y_max>,
    max_iterations => <max_iterations>
  )
)  
```

<table><thead><tr><th width="231">Parameter</th><th>Data Type</th><th data-hidden>Description</th></tr></thead><tbody><tr><td><code>x_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>y_pixels</code></td><td>32-bit integer</td><td>\</td></tr><tr><td><code>x_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>x_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>max_iterations</code></td><td>32-bit integer</td><td></td></tr></tbody></table>

**Example**

<figure><img src="https://3405598576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpY5GhOriuTto2XMgqvwI%2Fuploads%2FU25CaNmZENVZUqMQt6oh%2Fheavy_mandelbrot.png?alt=media&#x26;token=4564d608-ce8f-4148-9cb1-3148ef246c59" alt=""><figcaption><p><strong>Computed Mandelbrot set using the HEAVY.AI Vega demo</strong></p></figcaption></figure>

## tf\_mandelbrot\_cuda

```
SELECT * FROM TABLE(
  tf_mandelbrot_cuda( <x_pixels>, <y_pixels>, <x_min>, <x_max>, <y_min>, <y_max>, <max_iterations>
  )
)
```

<table><thead><tr><th>Parameter</th><th>Data Type</th><th data-hidden>Description</th></tr></thead><tbody><tr><td><code>x_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>y_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>x_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>x_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>max_iterations</code></td><td>32-bit integer</td><td></td></tr></tbody></table>

## tf\_mandelbrot\_float

```
SELECT * FROM TABLE(
  tf_mandelbrot_float(<x_pixels>, <y_pixels>, <x_min>, <x_max>, <y_min>, <y_max>, <max_iterations>
  )
)
```

<table><thead><tr><th>Parameter</th><th>Data Type</th><th data-hidden>Description</th></tr></thead><tbody><tr><td><code>x_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>y_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>x_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>x_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>max_iterations</code></td><td>32-bit integer</td><td></td></tr></tbody></table>

## tf\_mandelbrot\_cuda\_float

```
SELECT * FROM TABLE(
  tf_mandelbrot_cuda_float( <x_pixels>, <y_pixels>, <x_min>, <x_max>, <y_min>, <y_max>, <max_iterations>
  )
)
```

<table><thead><tr><th width="260">Parameter</th><th>Data Type</th><th data-hidden>Description</th></tr></thead><tbody><tr><td><code>x_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>y_pixels</code></td><td>32-bit integer</td><td></td></tr><tr><td><code>x_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>x_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_min</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>y_max</code></td><td>DOUBLE</td><td></td></tr><tr><td><code>max_iterations</code></td><td>32-bit integer</td><td></td></tr></tbody></table>
