1/** 2 * Mandelbulber v2, a 3D fractal generator _%}}i*<. ____ _______ 3 * Copyright (C) 2020 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 * LkmitchIteration 10 * @reference http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/ 11 12 * This file has been autogenerated by tools/populateUiInformation.php 13 * from the file "fractal_lkmitch.cpp" in the folder formula/definition 14 * D O N O T E D I T T H I S F I L E ! 15 */ 16 17REAL4 LkmitchIteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux) 18{ 19 aux->DE = aux->DE * 2.0f * aux->r * fractal->analyticDE.scale1 + fractal->analyticDE.offset1; 20 21 REAL x2 = z.x * z.x; 22 REAL y2 = z.y * z.y; 23 REAL z2 = z.z * z.z; 24 REAL newx = x2 - 2.0f * z.y * z.z; 25 REAL newy = z2 + 2.0f * z.x * z.y; 26 REAL newz = y2 - 2.0f * z.x * z.z; 27 z.x = newx; 28 z.y = newy; 29 z.z = newz; 30 return z; 31}