1/**
2 * Mandelbulber v2, a 3D fractal generator  _%}}i*<.        ____                _______
3 * Copyright (C) 2017 Mandelbulber Team   _>]|=||i=i<,     / __ \___  ___ ___  / ___/ /
4 *                                        \><||i|=>>%)    / /_/ / _ \/ -_) _ \/ /__/ /__
5 * This file is part of Mandelbulber.     )<=i=]=|=i<>    \____/ .__/\__/_//_/\___/____/
6 * The project is licensed under GPLv3,   -<>>=|><|||`        /_/
7 * see also COPYING file in this folder.    ~+{i%+++
8 *
9 * quadratic iteration in imaginary scator algebra
10 * @reference
11 * http://www.fractalforums.com/new-theories-and-research/
12 * ix-possibly-the-holy-grail-fractal-%28in-fff-lore%29
13 * https://luz.izt.uam.mx/drupal/en/fractals/ix
14 * @author Manuel Fernandez-Guasti
15
16 * This file has been autogenerated by tools/populateUiInformation.php
17 * from the function "ImaginaryScatorPower2Iteration" in the file fractal_formulas.cpp
18 * D O    N O T    E D I T    T H I S    F I L E !
19 */
20
21REAL4 ImaginaryScatorPower2Iteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux)
22{
23	Q_UNUSED(fractal);
24	Q_UNUSED(aux);
25
26	REAL x2 = z.x * z.x; //+ 1e-030f
27	REAL y2 = z.y * z.y;
28	REAL z2 = z.z * z.z;
29
30	REAL newx = x2 - y2 - z2 + native_divide((y2 * z2), x2);
31	REAL newy = 2.0f * z.x * z.y * (1.0f - native_divide(z2, x2));
32	REAL newz = 2.0f * z.x * z.z * (1.0f - native_divide(y2, x2));
33
34	z.x = newx;
35	z.y = newy;
36	z.z = newz;
37	return z;
38}