An open API service indexing awesome lists of open source software.

https://github.com/andydevs/cudafractal

Fractal Generator using Nvidia's CUDA framework
https://github.com/andydevs/cudafractal

cplusplus cuda nvidia

Last synced: about 1 year ago
JSON representation

Fractal Generator using Nvidia's CUDA framework

Awesome Lists containing this project

README

          

_NOTE: README TO BE UPDATED_

# CudaFractal

Generates fractal images using Nvidia's CUDA framework.

![Julia Set (f(z) = z^2 - 0.4 + 0.6i)](flower.png)

## Usage

### Install

[REWRITE INSTALL]

### Command Line

The format is `> CudaFractal [options]` The options are as follows

| Option | Description | Default |
|:--------------:|:-------------------------------------------------------------------------------------------------------:|:-----------:|
| --help | Print help message (overrides all other options) | |
| --cmaps | Print list of available colormap presets (overrides all other options except help) | |
| --xml arg | Generate fractal images from an xml file (see below. overrides all other options except help and cmaps) | |
| --mbrot | Generate mandelbrot image (overrides cr and ci options) | |
| --cr arg | Set real component of complex constant to arg | -0.4 |
| --ci arg | Set omaginary component of complex constant to arg | 0.6 |
| --width arg | Set width of image to arg | 1920 |
| --height arg | Set height of image to arg | 1080 |
| --zoom arg | Zoom image by arg | 1.0 |
| --rotate arg | Rotate image by arg degrees | 0.0 |
| --transx arg | Translate image horizontally by arg | 0.0 |
| --transy arg | Translate image vertically by arg | 0.0 |
| --cmap arg | Set colormap preset being used to arg | nvidia |
| --file arg | Set filename being saved to to arg | fractal.png |
| --mnemonic arg | Set mnemonic to arg (best used by scripts to identify what fractal is being made) | fractal |
| --verbose | Print verbose messages in program | |

### XML File

Fractals can be specified in an xml file, and can be read in the program using `> CudaFractal --xml [xml file name]`

The XML file format is as follows:

```


[fractal specs...]

```

A list of fractal specs within the "fractals" tag.

Each spec has the following format:

```






[colormap spec...]

```

#### Colormaps

Colormaps can be specified in three ways. The default colormap is greyscale black to white.

##### Presets

Colormaps can be defined by preset as follows:

```

```

##### Gradient

Gradient colormaps can be defined as follows:

```


```

(see Colors section below)

##### Sinusoid

Sinusoid colormaps can be defined as follows

```


```

`alpha` defaults to `255`. `r`, `g`, `b`, values default to `0.0`

##### Colors

Colors can be defined by either using a `hex` (or `hexa` with alpha channel) value

```

```

`hex` and `hexa` values default to `0x0000000`

Or by the individual `rgb` (or `rgba` with alpha channel) values

```

```

`r`, `g`, `b`, and `a` values default to `0`