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 * TransfDIFSEllipsoidIteration fragmentarium code, mdifs by knighty (jan 2012) 10 * and http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm 11 12 * This file has been autogenerated by tools/populateUiInformation.php 13 * from the file "fractal_transf_difs_ellipsoid.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 TransfDIFSEllipsoidIteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux) 18{ 19 REAL4 zc = z; 20 REAL4 rads4 = fractal->transformCommon.additionConstant111; 21 REAL3 rads3 = (REAL3){rads4.x, rads4.y, rads4.z}; 22 23 REAL3 rV = (REAL3){zc.x, zc.y, zc.z}; 24 rV /= rads3; 25 26 REAL3 rrV = rV; 27 rrV /= rads3; 28 29 REAL rd = length(rV); 30 REAL rrd = length(rrV); 31 REAL ellD = rd * (rd - 1.0f) / rrd; 32 aux->dist = min(aux->dist, ellD / (aux->DE + 1.0f)); 33 return z; 34}