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 * scale 3d. Scale each axis individually 10 */ 11 12 #include "all_fractal_definitions.h" 13 cFractalTransfScale3d()14cFractalTransfScale3d::cFractalTransfScale3d() : cAbstractFractal() 15 { 16 nameInComboBox = "T>Scale 3D"; 17 internalName = "transf_scale3d"; 18 internalID = fractal::transfScale3d; 19 DEType = analyticDEType; 20 DEFunctionType = withoutDEFunction; 21 cpixelAddition = cpixelDisabledByDefault; 22 defaultBailout = 100.0; 23 DEAnalyticFunction = analyticFunctionNone; 24 coloringFunction = coloringFunctionDefault; 25 } 26 FormulaCode(CVector4 & z,const sFractal * fractal,sExtendedAux & aux)27void cFractalTransfScale3d::FormulaCode(CVector4 &z, const sFractal *fractal, sExtendedAux &aux) 28 { 29 z *= fractal->transformCommon.scale3D111; 30 31 if (!fractal->analyticDE.enabledFalse) 32 aux.DE = aux.DE * z.Length() / aux.r + 1.0; 33 else 34 aux.DE = aux.DE * z.Length() / aux.r * fractal->analyticDE.scale1 + fractal->analyticDE.offset1; 35 } 36