From 013208e3ee969c498a01b4160f834ad20f2a2f13 Mon Sep 17 00:00:00 2001 From: Bernardo Martelli Date: Tue, 4 Oct 2016 17:05:21 +0200 Subject: [PATCH] Italian UI updated --- mandelbulber2/language/qt_data_it.qm | Bin 0 -> 1361020 bytes mandelbulber2/language/qt_data_it.ts | 12746 +++++++++++++++++++++++++ 2 files changed, 12746 insertions(+) create mode 100644 mandelbulber2/language/qt_data_it.qm create mode 100755 mandelbulber2/language/qt_data_it.ts diff --git a/mandelbulber2/language/qt_data_it.qm b/mandelbulber2/language/qt_data_it.qm new file mode 100644 index 0000000000000000000000000000000000000000..07da1cd0977d48108242cfcc55d5a65a97e0a8b1 GIT binary patch literal 1361020 zcmeEv33waTweaBu?Trfq>%}96N@jBtRTON!iBI$QIFtB*#k#TY<87 z0m=?#ZGn~tU1$rGQcBD6UZH&j3Y1cK-Ck)QuPuePJbw7knbEx($#<^qj3rr)m3+zA z(w%e9J^MNL%$@GRX*C*iWh3l{2s=@W2aP<*VKOe5caBYPvz^GpbS3g`~Y{i+xz5QjlMu~f@4X!b` zu7_(Jt^lLzUYPGLxIPTmkKp<&aep}k*H?-AzK02^cERuP{fS?P@#hk928{b`IU&Jw ziTh@l`y3pm!7mUk%q^kdhxw z5O?`or2LEDBJR@b;rb9QvT8v#QpIHNX3pL0gszVr3Ub> z{2E+g{wtq_>#K161F4+!5cjA5N-8h;khrh#lgdlahU-P7^77l@`U6sV7r_0(S4q{2 zaQ{6=!WHhn=fB|!_uqFjafKU5<%vHfwYNuz+x-@){qahmYFp z5!{O$zt4K&-g+Pz{NW^VFZm1ETsn`q_j`t%=-mu_dWW2N0bIv+BcFWcN#fqTiJWxZ z!Nh&yn`G;}ONsmRon-4nFn{zrWb2PwiTl>?lcCB{SWi3AhVO*+??-%%mk{^vkC2f= z-z4tK{zOK;0(f3=2N`)5=Dp%Wvdt9&{#{45eGTA!_8}6ypab|=L#|tR2XSBcOLEH= zz{~dua_`O$N%a>`Cy#A=fXsjQa`MjwTD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Kl6O8fIJEckvDY@~V-OXJGlJNM;{2fSb&GQx#}J z@xknYDwXgJ&-*Z5TgpD}5@BLgHK9kvYu60E(ryCFg9mFHE=O;@+JQ6RGcxJqY1%M{ zD!u7&C@5);Lwg;j-Z3uNWB43;9u}pm8#SfQb+KWFU0V*;!G6>#ZIqANiF@x+Q{1RV zz3$S_9@UiWsYkuaJo{0r4p9Q&)gitQl(M@b*-oq7X6eFH$WX(Ud~Z7fhmb#c<^rvP zEjMh#Jh1XMW}ySU$@g7+rfOnj77HS`TyFX4Gy5yR;(JibrZVAJ0c|{}eNfA0d^o63 z#q9jP!^aNzKXo$y&R0L%&)-gf?+&eXd+#0Ejpdy0e##7au%A2RPnp>c4s)+hdQ%7J z82e$14#&(mkWB}k%~Fk+XjCuH=0YfaK70tDg$kw__4lF7SK`EZ*!on?3s0bLV85v$ zR+B>%ntd-pv4#V7xG4P)wBTstArjHz`Z6T60~ay8Ve%TxFZ4X+ks3R z%9_Z@G*K_$aCec}zO3!mx-KtV&4LxGVo?5D?0|t9>&rdZw;5~_VF|HVFVWlx8Hh$N zazxADwfw2`6(I3lpvNj851SFG>Ul(G8|Y*xap7=PBwMh%4h2^2Igih#;B~||;vO9a zB(Hnq#tih@;i~M$CVSC);~*ewg@CN(0OGLi&kh~w^1sVfv_CsMu+-w;19pD;lb`(m D@xAUf literal 0 HcmV?d00001 diff --git a/mandelbulber2/language/qt_data_it.ts b/mandelbulber2/language/qt_data_it.ts new file mode 100755 index 000000000..c82b24a9e --- /dev/null +++ b/mandelbulber2/language/qt_data_it.ts @@ -0,0 +1,12746 @@ + + + + + Form + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + + + FoldM z: + + + + + Fold : + Folding: + + + + + + + Scale Vary : + Varia Scala: + + + + FoldM y: + + + + + FoldM x: + + + + + + + + + + + + + + + + + + + + + + + + &Information + &Informazioni + + + + <p>ABoxMod1, a formula from Mandelbulb3D.<br>Inspired from a 2D formula proposed by Kali at Fractal Forums<br>This formula has a c.x c.y SWAP</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/kaliset-plus-boxfold-nice-new-2d-fractal/msg33670/#new">http://www.fractalforums.com/new-theories-and-research/kaliset-plus-boxfold-nice-new-2d-fractal/msg33670/#new<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AboxMod1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">=</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>scaleVary <span style="color:#d0d0d0">* (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) -</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> rr <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (rr &lt; 1e-21) rr = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> m<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR0<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (sqrtMinR &lt; 1e-21 &amp;&amp; sqrtMinR &gt; -1e-21) sqrtMinR = (sqrtMinR &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">/</span> sqrtMinR<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">/</span> rr<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> m<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + c add + aggiungi c + + + + <p>Aexion's Quadray Sets from FractalForums</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/the-3d-mandelbulb/quadray-sets/msg31458/#msg31458">http://www.fractalforums.com/the-3d-mandelbulb/quadray-sets/msg31458/#msg31458<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AexionIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">double</span> <span style="color:#d0d0d0">&amp;</span>w<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">==</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> cx <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> cy <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(-</span>aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> cz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(-</span>aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> cw <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> cx<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> cy<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> cz<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>cw <span style="color:#d0d0d0">=</span> cw<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempx <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempy <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(-</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(-</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempw <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>aexion<span style="color:#d0d0d0">.</span>cadd<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempz<span style="color:#d0d0d0">;</span> + w <span style="color:#d0d0d0">=</span> tempw<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> tempx <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> w <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempy <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> w <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempz <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> w <span style="color:#d0d0d0">*</span> w <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempw <span style="color:#d0d0d0">=</span> w <span style="color:#d0d0d0">*</span> w <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> aux<span style="color:#d0d0d0">.</span>cw<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempz<span style="color:#d0d0d0">;</span> + w <span style="color:#d0d0d0">=</span> tempw<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + + + + + + + + + + + + No parameters + Non ci sono parametri + + + + <p>Formula invented by Benesi</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/index.php?action=profile;u=1170">http://www.fractalforums.com/index.php?action=profile;u=1170<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BenesiIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> r1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span> <span style="color:#d0d0d0">||</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>r1<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + newx <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> r1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + newx <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> r1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + r1 <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>r1<span style="color:#d0d0d0">) *</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + is the link ok or not? + + + + + Z scale: + Scala z: + + + + Box fold: + + + + + <p>Hybrid of Mandelbox and Mandelbulb power 2 with scaling of z axis</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BoxFoldBulbPow2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>foldfactor <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + + <span style="color:#f09479; font-weight:bold">double</span> fR2_2 <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> mR2_2 <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0.25</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> r2_2 <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor1_2 <span style="color:#d0d0d0">=</span> fR2_2 <span style="color:#d0d0d0">/</span> mR2_2<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2_2 <span style="color:#d0d0d0">&lt;</span> mR2_2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> tglad_factor1_2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2_2 <span style="color:#d0d0d0">&lt;</span> fR2_2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2_2 <span style="color:#d0d0d0">=</span> fR2_2 <span style="color:#d0d0d0">/</span> r2_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> tglad_factor2_2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z2 <span style="color:#d0d0d0">/ (</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + CVector3 zTemp<span style="color:#d0d0d0">;</span> + zTemp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>x2 <span style="color:#d0d0d0">-</span> y2<span style="color:#d0d0d0">) *</span> temp<span style="color:#d0d0d0">;</span> + zTemp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">;</span> + zTemp<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> zTemp<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldingIntPow<span style="color:#d0d0d0">.</span>zFactor<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// INFO remark: changed sequence of operation.</span> + <span style="color:#d0d0a0">// adding of C constant was before multiplying by z-factor</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Presets + Preset + + + + + Dodecahedron + Dodecaedro + + + + + Icosahedron + Icosaedro + + + + + Octahedron + Ottaedro + + + + Menger Sponge + Spugna di Menger + + + + Reset + + + + + + + + Main parameters + Parametri principali + + + + abs (x) + + + + + abs (z) + + + + + vector offset: + offset vettori: + + + + &Box folding + + + + + + + + + + + + + alpha: + alfa: + + + + #4 + + + + + + + + + + + + + gamma: + + + + + + + + + + + + + beta: + + + + + #3 + + + + + #8 + + + + + #6 + + + + + #2 + + + + + #5 + + + + + <p>Kaleidoscopic Iterated Function Systems (IFS)</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/ifs-iterated-function-systems/kaleidoscopic-(escape-time-ifs)/">http://www.fractalforums.com/ifs-iterated-function-systems/kaleidoscopic-(escape-time-ifs)/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">KaleidoscopicIFSIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>absX<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>absY<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>absZ<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span><span style="color:#f09479; font-weight:bold">int</span> i <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> i <span style="color:#d0d0d0">&lt;</span> IFS_VECTOR_COUNT<span style="color:#d0d0d0">;</span> i<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>enabled<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">])</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> length <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>direction<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>length <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>distance<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">])</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>direction<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]</span> + <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">* (</span>length <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>distance<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>intensity<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>edge<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>mengerSpongeMode<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.5</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">))</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>IFS<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + z: + + + + + Box Fold offsets + Offset Folding Box + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + y: + + + + + OctCube + + + + + Box6 + + + + + Box5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + x: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Scale: + Scala: + + + + abs (y) + + + + + Menger Sponge mode + Modo spugna di Menger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + beta + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + alpha + alfa + + + + + Offset: + + + + + &z.z box fold scale, for normal use make offset z: (above) = 0.00 + &z.z scala box fold, per l'uso normale utilizzare z: (maggiore) = 0.00 + + + + + + + + + + + z.z scale: + scala z.z: + + + + Swap z.x z.z + Scambia z.x z.z + + + + Addition Constant - Offset + Aggiunta Costante - Offset + + + + + + + + + + + + + + + + <html><head/><body><p>Cpixel is CVector3 c = ( c.x, c.y, c.z). It is each original point (pixel) in 3D space where the iteration starts from, ( c = original z for each point .) It is commonly found in formula structures z = f(z) + c.</p><p>The Cpixel multiplier effectively scales this point &quot;c&quot;.</p><p>This transform allows the swapping of the order of the &quot;CVector3 c&quot; components before being multiplied by &quot;CVector3 z&quot; components.</p></body></html> + <html><head/><body><p>Cpixel è formato da CVector3 c = ( c.x, c.y, c.z). Questo è formato da ciascun punto originale (pixel) nello spazio 3D, da cui ha inizio l'iterazione ( c = origine z per ogni punto) normalmente si trova nella struttura delle formule z = f(z) + c.</p><p>Il moltiplicatore Cpixel scala effettivamente questo punto &quot;c&quot;.</p><p>Questa trasformazione permette lo scambio di ordine dei componenti di &quot;CVector3 c&quot; prima di venir moltiplicati per i componenti di &quot;CVector3 z&quot;.</p></body></html> + + + + + + addCpi&xel Axis Swap ConstantMultiplier + addCpi&xel scambio assi ConstantMultiplier + + + + + + + + + + + + + alternate swap + scambio alternato + + + + + + + + + + + + + + function order of c.x, c.y and c.z: + ordine funzione di c.x, c.y e c.z: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + c.x: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + c.y: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + c.z: + + + + + + + + + + + + + + + + + + Cpixel Multiplier + + + + + &Rotation; + &Rotazione + + + + + + + + Stop Rotation at iteration: + Ferma Rotazione all'iterazione: + + + + + + + + + + + + Start Rotation at iteration : + Ferma Rotazione all'iterazione: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gamma + + + + + + + + Initial Color Min: + Colore Min iniziale: + + + + + + + Orbit trap component + Componente orbit trap + + + + + + <html><head/><body><p>Hint: change coloring algorithm from Standard in the Material Editor</p></body></html> + <html><head/><body><p>Consiglio: cambiare algoritmo colore in Standard nell'editor materiali</p></body></html> + + + + + + + Absolute value of z component + Valore assoluto del componente z + + + + + + Coloring components (beta version only, does not work in hybrid mode) + Componenti colorazione (solo versione beta, non funziona in modalità ibridi) + + + + <p>ABoxModKaliEiffie, a formula from Mandelbulb3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/aboxmodkali-the-2d-version/">http://www.fractalforums.com/new-theories-and-research/aboxmodkali-the-2d-version/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AboxModKaliEiffieIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// box fold z.z</span> + <span style="color:#d0d0d0">{</span> + + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">/*else</span> +<span style="color:#d0d0a0"> {</span> +<span style="color:#d0d0a0"> z.z = fabs(z.z + fractal-&gt;transformCommon.additionConstant111.z)</span> +<span style="color:#d0d0a0"> - fabs(z.z - fractal-&gt;transformCommon.additionConstant111.z) - z.z;</span> +<span style="color:#d0d0a0"> z.z *= fractal-&gt;transformCommon.scale1;</span> +<span style="color:#d0d0a0"> }*/</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// swap</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// conditional</span> + + <span style="color:#f09479; font-weight:bold">double</span> rr <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if(rr &lt; 1e-21) rr = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> MinR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (MinR &lt; -1e-21 &amp;&amp; MinR &lt; 1e-21) MinR = (MinR &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> m<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> MinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale015 <span style="color:#d0d0d0">/</span> MinR<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale015 <span style="color:#d0d0d0">/</span> rr<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale015<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> m<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>foldFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compFold0<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// fold group weight</span> + aux<span style="color:#d0d0d0">.</span>minRFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compMinR<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// orbit trap weight</span> + + <span style="color:#f09479; font-weight:bold">double</span> scaleColor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>colorMin <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// scaleColor += fabs(fractal-&gt;mandelbox.scale);</span> + aux<span style="color:#d0d0d0">.</span>scaleFactor <span style="color:#d0d0d0">=</span> scaleColor <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compScale<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + edge: + margine: + + + + Vectors + Vettori + + + + + + + + + + + + intens. + + + + + #1 + + + + + + + + + + + + + dist. + + + + + enable: + abilita: + + + + direction: + direzione: + + + + #9 + + + + + #7 + + + + + + + Scale and fold influence: + Scala e influenza su FoldIng: + + + + + + Force Cylindrical Fold + Forza Folding cilindrico + + + + addCpi&xel ConstantMultiplier c.x c.y swap + addCpi&xel ConstantMultiplier scambio c.x c.y + + + + + + Rotation + Rotazione + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Info&rmation + Info&rmazione + + + + <p>amazing surf from Mandelbulber3D. Formula proposed by Kali, with features added by Darkbeam</p><table> +<tr><th>Reference</th><td><a href="????">????<br> +<a href="This formula has a c.x c.y SWAP">This formula has a c.x c.y SWAP<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AmazingSurfIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">=</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>scaleVary <span style="color:#d0d0d0">* (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) -</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// no z fold</span> + + <span style="color:#f09479; font-weight:bold">double</span> r2<span style="color:#d0d0d0">;</span> + r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// force cylinder fold</span> + r2 <span style="color:#d0d0d0">-=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21)</span> + <span style="color:#d0d0a0">// r2 = 1e-21;</span> + + <span style="color:#f09479; font-weight:bold">double</span> m<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (sqrtMinR &lt; 1e-21 &amp;&amp; sqrtMinR &gt; -1e-21)</span> + <span style="color:#d0d0a0">// sqrtMinR = (sqrtMinR &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">/</span> sqrtMinR<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">*=</span> m <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + mistake on <a href="This formula has a c.x c.y SWAP"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Start at iteration : + Inizia all'iterazione: + + + + + + + + + Stop at Iteration: + Ferma all'iterazione: + + + + + + + + + + + + + Box folding value: + Valore di Box folding: + + + + Fold Type 2 + Folding tipo 2 + + + + Fold Type 3 + Folding tipo 3 + + + + Fold Type 4 + Folding tipo 4 + + + + Fold Types + Tipi Folding + + + + Fold Type 1 + Folding tipo 1 + + + + Fold Parameters + Parametri di Folding + + + + Fold Type 5 + Folding tipo 5 + + + + + + + + type 1 + tipo 1 + + + + + + + + type 2 + tipo 2 + + + + + + + + type 3 + tipo 3 + + + + + + + + type 4 + tipo 4 + + + + + + + + type 5 + tipo 5 + + + + + Slot 4 + + + + + order of Fold Types + ordine tipi di Folding + + + + + Slot 3 + + + + + + Slot 5 + + + + + + Slot 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stop at iteration: + Ferma all'iterazione: + + + + + Enable slot sequence: + Abilita sequenza slot: + + + + Slot , Fold Type and Iteration controls + Slot, Tipo Folding e controlli Iterazioni + + + + + Slot 1 + + + + + z.z Fold Value + Valore di folding z.z + + + + enable z.z scale + abilita scala z.z + + + + z.z Fold Limit + Limite folding z.z + + + + Standard &Functions Enabled + &Funzioni standard abilitate + + + + + Start Fold at iteration : + Inizia Folding all'iterazione: + + + + + Stop Fold at iteration: + Ferma Folding all'iterazione: + + + + Abox spherical folding : + Folding sferico Abox: + + + + Mbox spherical folding : + Folding sferico Mbox: + + + + Stop Scale at iteration: + Ferma scala all'iterazione: + + + + Start Scale at iteration : + Inizia Scala all'iterazione: + + + + Scale : + Scala: + + + + + + + + + &Main rotation + Rotazione &principale + + + + <p>Amazing Surface Multi<br>Based on Amazing Surf Mod 1 from Mandelbulber3D, a formula proposed by Kali, with features added<br>by Darkbeam</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AmazingSurfMultiIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">bool</span> functionEnabledN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledByFalse<span style="color:#d0d0d0">};</span> + <span style="color:#f09479; font-weight:bold">int</span> startIterationN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsE<span style="color:#d0d0d0">};</span> + <span style="color:#f09479; font-weight:bold">int</span> stopIterationN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsD<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsE<span style="color:#d0d0d0">};</span> + sFractalSurfFolds<span style="color:#d0d0d0">::</span>multi_orderOfFolds foldN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>surfFolds<span style="color:#d0d0d0">.</span>orderOfFolds1<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>surfFolds<span style="color:#d0d0d0">.</span>orderOfFolds2<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>surfFolds<span style="color:#d0d0d0">.</span>orderOfFolds3<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>surfFolds<span style="color:#d0d0d0">.</span>orderOfFolds4<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>surfFolds<span style="color:#d0d0d0">.</span>orderOfFolds5<span style="color:#d0d0d0">};</span> + + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span><span style="color:#f09479; font-weight:bold">int</span> f <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> f <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">5</span><span style="color:#d0d0d0">;</span> f<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>functionEnabledN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">] &amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> startIterationN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">] &amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> stopIterationN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">])</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>foldN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">])</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSurfFolds<span style="color:#d0d0d0">::</span>type1<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSurfFolds<span style="color:#d0d0d0">::</span>type2<span style="color:#d0d0d0">:</span> <span style="color:#d0d0a0">// z = fold - fabs( fabs(z) - fold)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSurfFolds<span style="color:#d0d0d0">::</span>type3<span style="color:#d0d0d0">:</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSurfFolds<span style="color:#d0d0d0">::</span>type4<span style="color:#d0d0d0">:</span> + <span style="color:#d0d0a0">// if z &gt; limit) z = Value -z, else if z &lt; limit) z = - Value - z,</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.x;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.x;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.y;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.y;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSurfFolds<span style="color:#d0d0d0">::</span>type5<span style="color:#d0d0d0">:</span> + <span style="color:#d0d0a0">// z = fold2 - fabs( fabs(z + fold) - fold2) - fabs(fold)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// enable z scale</span> + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>foldingLimit <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// standard functions</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2<span style="color:#d0d0d0">;</span> + r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// force cylinder fold</span> + r2 <span style="color:#d0d0d0">-=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// fold weight ;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsT + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsT<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// Abox Spherical fold</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>sqtR<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// Mandelbox Spherical fold</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledzFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsM + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsM<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// r2 = z.Dot(z);</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// mR2 = minR^2</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// fR2/mR2</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsS + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsS<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// scale</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1 + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsR + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsR<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + aux<span style="color:#d0d0d0">.</span>foldFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compFold0<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// fold group weight</span> + aux<span style="color:#d0d0d0">.</span>minRFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compMinR<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// orbit trap weight</span> + + <span style="color:#f09479; font-weight:bold">double</span> scaleColor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>colorMin <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// scaleColor += fabs(fractal-&gt;mandelbox.scale);</span> + aux<span style="color:#d0d0d0">.</span>scaleFactor <span style="color:#d0d0d0">=</span> scaleColor <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compScale<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Fold x: + + + + + Fold y: + + + + + + + + + + + + Fixed Radius: + Raggio fisso: + + + + Enable internal addCpixel constant / Julia constant swap + Abilita scambio interno tra le costanti addCpixel/Julia + + + + Single Formula addCpixel Constant Multiplier + Formula singola - Moltiplicatore costante addCpixel + + + + Single Formula Julia mode + Formula singola - modo Julia + + + + + Julia constant + Costante di Julia + + + + <p>ABoxVS_icen1, a formula from Mandelbulb3D. Inspired from a 2D formula proposed by Kali at<br>Fractal Forums</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/kaliset-plus-boxfold-nice-new-2d-fractal/msg33670/#new">http://www.fractalforums.com/new-theories-and-research/kaliset-plus-boxfold-nice-new-2d-fractal/msg33670/#new<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AboxVSIcen1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">=</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>scaleVary <span style="color:#d0d0d0">* (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) -</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaMode<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21 &amp;&amp; r2 &gt; -1e-21)</span> + <span style="color:#d0d0a0">// r2 = (r2 &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaMode<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC <span style="color:#d0d0d0">-</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111 <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + + + + + + + + + + + + Minimum Radius: + Raggio minimo: + + + + + Start at iteration: + Inizia all'iterazione: + + + + Fold Box Mod1 z = fabs(z + Const.F1) - fabs(z - Const.F2) - (z * Const.F3) + + + + + + fabs(z - Const.F2) + + + + + + fabs(z + Const.F1) + + + + + + Const.F3 + + + + + &Box Fold + Folding &Box + + + + + Spherical Fold; + Folding Sferico: + + + + + + + + + + Scale + Scala + + + + &Rotation + &Rotazione + + + + + + + + + + + + + + + + + + + + + Infor&mation + Infor&mazione + + + + <p>Modified Mandelbox (ABox) formula</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">FoldBoxMod1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> <span style="color:#d0d0d0">&amp;</span>i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempA<span style="color:#d0d0d0">,</span> tempB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// box fold</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// spherical fold</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21 &amp;&amp; r2 &gt; -1e-21)</span> + <span style="color:#d0d0a0">// r2 = (r2 &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Offset x: + + + + + <p>ABoxModKali, a formula from Mandelbulb3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/aboxmodkali-the-2d-version/">http://www.fractalforums.com/new-theories-and-research/aboxmodkali-the-2d-version/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AboxModKaliIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0555 <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> rr <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if(rr &lt; 1e-21) rr = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> MinR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR06<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (MinR &gt; -1e-21 &amp;&amp; MinR &lt; 1e-21) MinR = (MinR &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> m<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt; (</span>MinR<span style="color:#d0d0d0">))</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale015 <span style="color:#d0d0d0">/ (</span>MinR<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale015 <span style="color:#d0d0d0">/</span> rr<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale015<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> m<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + Offset Radius: + Raggio Offset: + + + + Offset. Use in normal mode or use it to fine tune in Julia mode + Offset. Da usare normalmente o per mettere a punto le configurazioni dei parametri relativi alla modalità Julia + + + + A&nalytic Logrithmic DE adjustment + "Logrithmic" missing an "a" + Modifica DE A&naltico logaritmica + + + + + + + + + + + + + Analytic Logrithmic DE multiplier: + Moltiplicatore DE analtico logaritmico: + + + + addCpixel Symmetrical Constant Multiplier + addCpixel -Moltiplicatore simmetrico costanti + + + + <p>MsltoeJuliaBulb Eiffie. Refer post by Eiffie Reply #69 on: January 27, 2015</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/60/">http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/60/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">EiffieMsltoeIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> psi <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fmod</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) +</span> M_PI <span style="color:#d0d0d0">+</span> M_PI_8<span style="color:#d0d0d0">,</span> M_PI_4<span style="color:#d0d0d0">) -</span> M_PI_8<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthYZ <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>psi<span style="color:#d0d0d0">) *</span> lengthYZ<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>psi<span style="color:#d0d0d0">) *</span> lengthYZ<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + CVector3 z2 <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> rr <span style="color:#d0d0d0">=</span> z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> m <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> rr<span style="color:#d0d0d0">;</span> + CVector3 newz<span style="color:#d0d0d0">;</span> + newz<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> m<span style="color:#d0d0d0">;</span> + newz<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> m <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// scaling y;;</span> + newz<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> newz <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21) lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.r_dz *= fabs(fractal-&gt;transformCommon.scale1);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// analytic log DE adjustment</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Offset y: + + + + + Offset z: + + + + + + + zA after itr.: + zA dopo itr.: + + + + + + Constant Z: + Constante Z: + + + + + + Constant A: + Constante A: + + + + Menger Mod1 + + + + + Multiplier + Moltiplicatore + + + + &Box Offset + Offset &Box + + + + Stop Offset at iteration: + Ferma Offset all'iterazione: + + + + Start Offset at iteration : + Inizia Offset all'iterazione: + + + + Box Offset: + Offset Box: + + + + + <html><head/><body><p>Can sometimes improve render quality when using analytic DE</p></body></html> + <html><head/><body><p>A volte può migliorare la qualità di renering usando la DE analitica</p></body></html> + + + + + Analytic DE calculation + Calcolo DE analitica + + + + I&teration Weight.; z = ( z * const.Z) + ( zA * const.A) + ( zB * const.B) + Peso I&terazione z = (z * const.Z) + (zA * const.A) + (zB * const.B) + + + + + + zB after itr.: + zB dopo itr.: + + + + + + Normal use : Constants A & B are negative numbers, Constant Z remains at 1.0 + Uso normale : Le costanti A e B sono numeri negativi, la costante Z rimane 1.0 + + + + <p>Menger Sponge formula modified by Mclarekin</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MengerMod1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// box offset</span> + <span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 zA <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> + CVector3 zB <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">==</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>intA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zA <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">==</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>intB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zB <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">= (</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) + (</span>zA <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+ (</span>zB <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + Constant B: + Costante B: + + + + + + Spherical folding +fixed radius: + Raggio fisso +Folding sferico: + + + + + + + + + + + + + Box folding limit: + Limite box Folding: + + + + + + Spherical folding +min radius: + Raggio minimo +Folding sferico: + + + + + + + + + + + Spherical folding +offset: + Offset Folding +Sferico: + + + + &Rotation of separate planes + &Rotazione piani separati + + + + + + X Axis + Asse X + + + + + + + + + + + + Positive plane + Piano positivo + + + + + + + + + + + + Negative plane + Piano negativo + + + + + + Y Axis + Asse Y + + + + + + Z Axis + Asse Z + + + + <p>Mandelbox fractal known as AmazingBox or ABox, invented by Tom Lowe in 2010</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/ifs-iterated-function-systems/amazing-fractal/msg12467/#msg12467">http://www.fractalforums.com/ifs-iterated-function-systems/amazing-fractal/msg12467/#msg12467<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelboxIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotationsEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 zRot<span style="color:#d0d0d0">;</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRotationEnabled<span style="color:#d0d0d0">)</span> z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Solid: + Solido: + + + + Box type: + Tipo Box: + + + + Melt: + Sciogli: + + + + + + + Coloring parameters + Parametri colorazione + + + + <p>GeneralizedFoldBoxIteration - Quaternion fractal with extended controls</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/generalized-box-fold/">http://www.fractalforums.com/new-theories-and-research/generalized-box-fold/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">GeneralizedFoldBoxIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">const</span> CVector3 <span style="color:#d0d0d0">*</span>Nv<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">int</span> sides<span style="color:#d0d0d0">;</span> + + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_tet<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_tet<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldCube<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_cube<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_cube<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldOct<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_oct<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_oct<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldDodeca<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_dodeca<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_dodeca<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldOctCube<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_oct_cube<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_oct_cube<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldIcosa<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_icosa<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_icosa<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldBox6<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_box6<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_box6<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>type <span style="color:#d0d0d0">==</span> foldBox5<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + Nv <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>Nv_box5<span style="color:#d0d0d0">;</span> + sides <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>genFoldBox<span style="color:#d0d0d0">.</span>sides_box5<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> melt <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>melt<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> solid <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>solid<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// Find the closest cutting plane if any that cuts the line between the origin and z.</span> + <span style="color:#d0d0a0">// Line is parameterized as X = Y + L*a;</span> + <span style="color:#d0d0a0">// Cutting plane is X.Dot(Nv) = Solid.</span> + <span style="color:#d0d0a0">// (Y + L*a).Dot(Nv) = solid.</span> + <span style="color:#d0d0a0">// a = (solid - Y.Dot(Nv))/L.Dot(Nv) = b/c</span> + CVector3 L <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> a <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">;</span> + CVector3 Y<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// Y is the origin in this case.</span> + <span style="color:#f09479; font-weight:bold">int</span> side <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> b<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> i <span style="color:#d0d0d0">&lt;</span> sides<span style="color:#d0d0d0">;</span> i<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + b <span style="color:#d0d0d0">=</span> solid<span style="color:#d0d0d0">;</span> + c <span style="color:#d0d0d0">=</span> L<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>Nv<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + <span style="color:#d0d0a0">// A bit subtle here. a_r must be positive and I want to avoid divide by zero.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">((</span>c <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">) &amp;&amp; ((</span>a <span style="color:#d0d0d0">*</span> c<span style="color:#d0d0d0">) &gt;</span> b<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + side <span style="color:#d0d0d0">=</span> i<span style="color:#d0d0d0">;</span> + a <span style="color:#d0d0d0">=</span> b <span style="color:#d0d0d0">/</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// If z is above the foldingValue we may have to fold. Else early out.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>side <span style="color:#d0d0d0">!= -</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// mirror check</span> + <span style="color:#f09479; font-weight:bold">int</span> side_m <span style="color:#d0d0d0">=</span> side<span style="color:#d0d0d0">;</span> + CVector3 Nv_m <span style="color:#d0d0d0">=</span> Nv<span style="color:#d0d0d0">[</span>side_m<span style="color:#d0d0d0">];</span> + CVector3 X_m <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> Nv_m <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>Nv_m<span style="color:#d0d0d0">) -</span> solid<span style="color:#d0d0d0">);</span> + + <span style="color:#d0d0a0">// Find any plane (Nv_r) closest to X_m that cuts the line between Nv_m and X_m.</span> + <span style="color:#d0d0a0">// Nv_m cross Nv_r will define a possible rotation axis.</span> + <span style="color:#d0d0a0">// a = (solid - Y.Dot(Nv)/L.Dot(Nv) = b/c.</span> + L <span style="color:#d0d0d0">=</span> X_m <span style="color:#d0d0d0">-</span> Nv_m<span style="color:#d0d0d0">;</span> + Y <span style="color:#d0d0d0">=</span> Nv_m<span style="color:#d0d0d0">;</span> + a <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">;</span> + side <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> i <span style="color:#d0d0d0">&lt;</span> sides<span style="color:#d0d0d0">;</span> i<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">!=</span> side_m<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + b <span style="color:#d0d0d0">=</span> solid <span style="color:#d0d0d0">-</span> Y<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>Nv<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + c <span style="color:#d0d0d0">=</span> L<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>Nv<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + <span style="color:#d0d0a0">// A bit subtle here. a_r must be positive and I want to avoid divide by zero.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">((</span>c <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">) &amp;&amp; ((</span>a <span style="color:#d0d0d0">*</span> c<span style="color:#d0d0d0">) &gt;</span> b<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + side <span style="color:#d0d0d0">=</span> i<span style="color:#d0d0d0">;</span> + a <span style="color:#d0d0d0">=</span> b <span style="color:#d0d0d0">/</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// Was a cutting plane found?</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>side <span style="color:#d0d0d0">!= -</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// rotation check</span> + CVector3 Xmr_intersect <span style="color:#d0d0d0">=</span> Y <span style="color:#d0d0d0">+</span> L <span style="color:#d0d0d0">*</span> a<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">int</span> side_r <span style="color:#d0d0d0">=</span> side<span style="color:#d0d0d0">;</span> + CVector3 Nv_r <span style="color:#d0d0d0">=</span> Nv<span style="color:#d0d0d0">[</span>side_r<span style="color:#d0d0d0">];</span> + <span style="color:#d0d0a0">// The axis of rotation is define by the cross product of Nv_m and Nv_r and</span> + <span style="color:#d0d0a0">// the intersection of the line between Nv_m and Nv_r and Xmr_intersect.</span> + CVector3 L_r <span style="color:#d0d0d0">=</span> Nv_m<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Cross</span><span style="color:#d0d0d0">(</span>Nv_r<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// The closest point between z and the line of rotation can be found by minimizing</span> + <span style="color:#d0d0a0">// the square of the distance (D) between z and the line</span> + <span style="color:#d0d0a0">// X = Xmr_intersect + L_r * a_rmin.</span> + <span style="color:#d0d0a0">// Setting dD/da_rmin equal to zero and solving for a_rmin.</span> + <span style="color:#f09479; font-weight:bold">double</span> a_rmin <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>L_r<span style="color:#d0d0d0">) -</span> Xmr_intersect<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>L_r<span style="color:#d0d0d0">)) / (</span>L_r<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>L_r<span style="color:#d0d0d0">));</span> + + <span style="color:#d0d0a0">// force a_rmin to be positive. I think I made an even number of sign errors here.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>a_rmin <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + a_rmin <span style="color:#d0d0d0">= -</span>a_rmin<span style="color:#d0d0d0">;</span> + L_r <span style="color:#d0d0d0">=</span> L_r <span style="color:#d0d0d0">* (-</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + CVector3 X_r <span style="color:#d0d0d0">=</span> Xmr_intersect <span style="color:#d0d0d0">+</span> L_r <span style="color:#d0d0d0">*</span> a_rmin<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// Find any plane (Nv_i) closest to Xmr_intersect that cuts the line between</span> + <span style="color:#d0d0a0">// Xmr_intersect and X_r. This will define a possible inversion point.</span> + <span style="color:#d0d0a0">// a = (solid - Y.Dot(Nv)/L.Dot(Nv) = b/c.</span> + L <span style="color:#d0d0d0">=</span> X_r <span style="color:#d0d0d0">-</span> Xmr_intersect<span style="color:#d0d0d0">;</span> + Y <span style="color:#d0d0d0">=</span> Xmr_intersect<span style="color:#d0d0d0">;</span> + a <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">;</span> + side <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> i <span style="color:#d0d0d0">&lt;</span> sides<span style="color:#d0d0d0">;</span> i<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">((</span>i <span style="color:#d0d0d0">!=</span> side_m<span style="color:#d0d0d0">) &amp;&amp; (</span>i <span style="color:#d0d0d0">!=</span> side_r<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + b <span style="color:#d0d0d0">=</span> solid <span style="color:#d0d0d0">-</span> Y<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>Nv<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + c <span style="color:#d0d0d0">=</span> L<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>Nv<span style="color:#d0d0d0">[</span>i<span style="color:#d0d0d0">]);</span> + <span style="color:#d0d0a0">// A bit subtile here. a must be positive and I want to avoid divide by zero.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">((</span>c <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">) &amp;&amp; ((</span>a <span style="color:#d0d0d0">*</span> c<span style="color:#d0d0d0">) &gt;</span> b<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + side <span style="color:#d0d0d0">=</span> i<span style="color:#d0d0d0">;</span> + a <span style="color:#d0d0d0">=</span> b <span style="color:#d0d0d0">/</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>side <span style="color:#d0d0d0">!= -</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// inversion check</span> + <span style="color:#d0d0a0">// Only inversion point possible but still need to check for melt.</span> + + CVector3 X_i <span style="color:#d0d0d0">=</span> Y <span style="color:#d0d0d0">+</span> L <span style="color:#d0d0d0">*</span> a<span style="color:#d0d0d0">;</span> + CVector3 z2X <span style="color:#d0d0d0">=</span> X_i <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// Is z above the melt layer.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z2X<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z2X<span style="color:#d0d0d0">) &gt; (</span>melt <span style="color:#d0d0d0">*</span> melt<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> z2X_mag <span style="color:#d0d0d0">=</span> z2X<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">+</span> z2X <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">* (</span>z2X_mag <span style="color:#d0d0d0">-</span> melt<span style="color:#d0d0d0">) / (</span>z2X_mag <span style="color:#d0d0d0">+</span> <span style="color:#87df71">.00000001</span><span style="color:#d0d0d0">));</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// Only rotation line possible but still need to check for melt.</span> + <span style="color:#d0d0a0">// Is z above the melt layer.</span> + CVector3 z2X <span style="color:#d0d0d0">=</span> X_r <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z2X<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z2X<span style="color:#d0d0d0">) &gt; (</span>melt <span style="color:#d0d0d0">*</span> melt<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> z2X_mag <span style="color:#d0d0d0">=</span> z2X<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">+</span> z2X <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">* (</span>z2X_mag <span style="color:#d0d0d0">-</span> melt<span style="color:#d0d0d0">) / (</span>z2X_mag <span style="color:#d0d0d0">+</span> <span style="color:#87df71">.00000001</span><span style="color:#d0d0d0">));</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// Only mirror plane possible but still need to check for melt.</span> + CVector3 z2X <span style="color:#d0d0d0">=</span> X_m <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z2X<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z2X<span style="color:#d0d0d0">) &gt; (</span>melt <span style="color:#d0d0d0">*</span> melt<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> z2X_mag <span style="color:#d0d0d0">=</span> z2X<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">+</span> z2X <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">* (</span>z2X_mag <span style="color:#d0d0d0">-</span> melt<span style="color:#d0d0d0">) / (</span>z2X_mag <span style="color:#d0d0d0">+</span> <span style="color:#87df71">.00000001</span><span style="color:#d0d0d0">));</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> <span style="color:#d0d0a0">// outside solid</span> + + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> r<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + + Min radius component: + Componente raggio Min: + + + + + + + Fold component + Componente Folding + + + + + + + Fold function components -group weight: + Componenti funzione Fold -peso gruppo: + + + + + + Scale component + Componente Scala + + + + + + + + + + + Y plane component: + Componente piano Y: + + + + + + + + + + + X plane component: + Componente piano Y: + + + + Power Variable: + Variabile Potenza: + + + + + + + + + + Finish varying at iteration: + Ferma variazione all'iterazione: + + + + + + + + + + Start varying at iteration : + Inizia variazione all'iterazione: + + + + <p>mandelbulb vary scaleV1</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbVaryPowerV1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempVC <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant to be varied</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">&amp;&amp; (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">!=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0 <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (aux.r &lt; 1e-21)</span> + <span style="color:#d0d0a0">// aux.r = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> tempVC <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> th <span style="color:#d0d0d0">=</span> th0 <span style="color:#d0d0d0">*</span> tempVC<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph <span style="color:#d0d0d0">=</span> ph0 <span style="color:#d0d0d0">*</span> tempVC<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> cth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> tempVC <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + rp <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>cth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> cth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">)) *</span> rp<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + Enable sine mode (disable cosine mode) + Abilita modo seno (disabilita modo coseno) + + + + + Polar to Cartesian - Cosine Mode z.z = cos(th); + Da Polare a Cartesiano - Modo coseno z.z = cos(th); + + + + Rotate about z axis: + Ruota attorno all'asse z: + + + + Enable seperate &trig control of second function + Sbilita controllo &trig separato della seconda funzione + + + + + + + acos + + + + + + + + asin + + + + + ph0 function2: + funzione2 ph0: + + + + th0 function2: + funzione2 th0: + + + + Phi Scale: + Scala Phi: + + + + + + ph0 function: + Funzione ph0: + + + + + + + + addCpi&xel Axis Swap ConstantMultiplier + addCpi&xel Scambia Assi ConstantMultiplier + + + + <p>based on mandelbulb Kali multi</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/mandelbulb-variant/">http://www.fractalforums.com/theory/mandelbulb-variant/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbKaliMultiIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> costh<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sinth<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> v1<span style="color:#d0d0d0">,</span> v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>acosOrasin <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>acos<span style="color:#d0d0d0">)</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>atanOratan2 <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>atan<span style="color:#d0d0d0">)</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>v2 <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">);</span> + + th0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + costh <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>costh <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> costh<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// cosine mode default</span> + sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>acosOrasinA <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>acos<span style="color:#d0d0d0">)</span> + th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>atanOratan2A <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>atan<span style="color:#d0d0d0">)</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>v2 <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>acosOrasin <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>acos<span style="color:#d0d0d0">)</span> + th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>atanOratan2 <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>atan<span style="color:#d0d0d0">)</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>v2 <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + ph0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1 <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// 0.5 retain</span> + <span style="color:#f09479; font-weight:bold">double</span> zp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledzFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// sine mode</span> + costh <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> zp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>costh <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> costh<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// cosine mode default</span> + sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> zp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// analytic log DE adjustment</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">) *</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scale1 + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> <span style="color:#d0d0a0">// default, i.e. scale1 &amp; offset1 &amp; offset2 = 1.0</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierC111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + function order of x, y and z: + ordine funzione x,y e z: + + + + + + + + + + + + + + + + + + + xyz + + + + + + + + + + + + + + + + + + + + xzy + + + + + + + + + + + + + + + + + + + + yxz + + + + + + + + + + + + + + + + + + + + yzx + + + + + + + + + + + + + + + + + + + + zxy + + + + + + + + + + + + + + + + + + + + zyx + + + + + + + + atan + + + + + + + + atan2 + + + + + + + th0 function: + funzione th0: + + + + + + + + + + + Z plane component: + componente piano Z: + + + + + + + Absolute value of z: + Valore assoluto di z: + + + + + + + + + + + Fixed radius component: + Componente raggio fisso: + + + + Tetrahedron + Tetraedro + + + + Cube + Cubo + + + + Spherical fold size: + Dimensioni Folding sferico: + + + + R power: + Potenza R: + + + + Box fold size: + Dimensioni Folding Box: + + + + Vary scale: + Varia Scala: + + + + w-axis constant: + Costante asse -w: + + + + <p>Formula based on Mandelbox (ABox). Extended to 4 dimensions and with variable scale parameter.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelboxVaryScale4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">=</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>scaleVary <span style="color:#d0d0d0">* (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) -</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + CVector4 oldz <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">) -</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">) -</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">) -</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">) -</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>fold<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">!=</span> oldz<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">!=</span> oldz<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">!=</span> oldz<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">!=</span> oldz<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">)</span> aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> rr <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span> + z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>rPower<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>minR <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>minR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>minR <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>minR<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">/</span> rr<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z4D <span style="color:#d0d0d0">*=</span> m<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>wadd<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + Alpha angle offset: + Offset angolo Alfa: + + + + <p>Classic Mandelbulb fractal.</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// if (aux.r &lt; 1e-21) aux.r = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> th <span style="color:#d0d0d0">=</span> th0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph <span style="color:#d0d0d0">=</span> ph0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> cth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + rp <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>cth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> cth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">)) *</span> rp<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + Power: + Potenza: + + + + zAngle Power: + Angolo z Potenza: + + + + <p>IQ-Bulb from Mandelbulb 3D and Inigo Quilez</p><table> +<tr><th>Reference</th><td><a href="http://iquilezles.org/www/articles/mandelbulb/mandelbulb.htm">http://iquilezles.org/www/articles/mandelbulb/mandelbulb.htm<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">IQbulbIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// extract polar coordinates</span> + <span style="color:#f09479; font-weight:bold">double</span> wr <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (wr &lt; 1e-21)</span> + <span style="color:#d0d0a0">// wr = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> wo <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> wr<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> wi <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#d0d0a0">// scale and rotate the point</span> + wr <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>wr<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> wr <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + wr <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + wo <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">;</span> + wi <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8a<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// convert back to cartesian coordinates</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>wo<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>wi<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>wo<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>wo<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>wi<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">*=</span> wr<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// then add Cpixel constant</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + Beta angle offset: + Offset angolo Beta: + + + + Gamma angle offset: + Offset angolo Gamma: + + + + <p>Fractal formula created by Buddhi</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Mandelbulb4Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> angZ <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> angY <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> angX <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>gammaAngleOffset<span style="color:#d0d0d0">;</span> + + CRotationMatrix rotM<span style="color:#d0d0d0">;</span> + rotM<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateX</span><span style="color:#d0d0d0">(</span>angX <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">));</span> + rotM<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateY</span><span style="color:#d0d0d0">(</span>angY <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">));</span> + rotM<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateZ</span><span style="color:#d0d0d0">(</span>angZ <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">));</span> + + z <span style="color:#d0d0d0">=</span> rotM<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> rp<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Sharpness: + Dettaglio angoli: + + + + <p>Smooth Mandelbox created by Buddhi</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/mandelbox-with-'smooth'-conditions/">http://www.fractalforums.com/3d-fractal-generation/mandelbox-with-'smooth'-conditions/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">SmoothMandelboxIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> sm <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>sharpness<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> zk1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionAGreaterB</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> zk2 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionALessB</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">, -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> zk1<span style="color:#d0d0d0">) + (</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> zk1<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> zk2<span style="color:#d0d0d0">) + (-</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> zk2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+= (</span>zk1 <span style="color:#d0d0d0">+</span> zk2<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> zk3 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionAGreaterB</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> zk4 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionALessB</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">, -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> zk3<span style="color:#d0d0d0">) + (</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> zk3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> zk4<span style="color:#d0d0d0">) + (-</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> zk4<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+= (</span>zk3 <span style="color:#d0d0d0">+</span> zk4<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> zk5 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionAGreaterB</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> zk6 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionALessB</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">, -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> zk5<span style="color:#d0d0d0">) + (</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) *</span> zk5<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> zk6<span style="color:#d0d0d0">) + (-</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) *</span> zk6<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+= (</span>zk5 <span style="color:#d0d0d0">+</span> zk6<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> rk1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionALessB</span><span style="color:#d0d0d0">(</span>r2<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> rk2 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">SmoothConditionALessB</span><span style="color:#d0d0d0">(</span>r2<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">,</span> sm<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> rk21 <span style="color:#d0d0d0">= (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> rk1<span style="color:#d0d0d0">) *</span> rk2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> rk1<span style="color:#d0d0d0">) +</span> z <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1 <span style="color:#d0d0d0">*</span> rk1<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> rk21<span style="color:#d0d0d0">) +</span> z <span style="color:#d0d0d0">* (</span>tglad_factor2 <span style="color:#d0d0d0">*</span> rk21<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> rk1<span style="color:#d0d0d0">) +</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">* (</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1 <span style="color:#d0d0d0">*</span> rk1<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> rk21<span style="color:#d0d0d0">) +</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">* (</span>tglad_factor2 <span style="color:#d0d0d0">*</span> rk21<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> rk1 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> rk21 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + + + + Y-axis rotation: + Rotazione asse Y: + + + + + + + + + + + + X-axis rotation: + Rotazione asse X: + + + + + + + + + + + + Position: + Posizione: + + + + rounding: + arrotondamento: + + + + Size: + Dimensioni: + + + + + depth (y): + profondità (y): + + + + + + height (z): + altezza (y): + + + + + + + + + + + + Z-axis rotation: + Rotazione asse Z: + + + + + width (x): + Larghezza (x): + + + + + + + + + + + + Material: + Materiale: + + + + + + + + + + Empty inside + Vuoto all'interno + + + + + + + + Repeat + Ripetere + + + + + + radius (x-y plane): + raggio (piano x-y): + + + + + Caps + Tappi + + + + Radius: + Raggio: + + + + Torus radius: + Raggio Toro: + + + + Tube radius: + Raggio tubo: + + + + Wave speed (anim.): + Velocità onda (anim.): + + + + Wave amplitude: + Ampiezza onda: + + + + Wave length: + Lunghezza onda: + + + + Iterations: + Iterazioni: + + + + + PreAbs(x) + + + + + PreAbs(y) + + + + + Abs(x) + + + + + Abs(y) + + + + + Abs(z) + + + + + Positive Z component + Componente Z positivo + + + + <p>Buffalo fractal</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BuffaloIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>preabsx<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>preabsy<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>preabsz<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z2 <span style="color:#d0d0d0">/ (</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">= (</span>x2 <span style="color:#d0d0d0">-</span> y2<span style="color:#d0d0d0">) *</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newz<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>posz<span style="color:#d0d0d0">)</span> + newz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + newz <span style="color:#d0d0d0">= -</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>absx<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>newx<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>absy<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>newy<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>buffalo<span style="color:#d0d0d0">.</span>absz<span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>newz<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + Y scale: + Scala y: + + + + Quaternion Scales + Scale Quaternione + + + + + + w: + + + + + z.w : + + + + + <p>Quaternion4D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Quaternion4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z4D <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector4</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">,</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> + z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">);</span> + z4D <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier1220<span style="color:#d0d0d0">;</span> + z4D <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + w + + + + + + Addition Constant + Aggiunta Costante + + + + <p>Adds c constant to z vector 4D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAdditionConstant4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z4D <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Frequency: + Frequenza: + + + + Amplitude: + Ampiezza: + + + + Rho Mul: + + + + + <p>platonic solid</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/platonic-dimensions/msg36528/#msg36528">http://www.fractalforums.com/3d-fractal-generation/platonic-dimensions/msg36528/#msg36528<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformPlatonicSolidIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> rho <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">());</span> <span style="color:#d0d0a0">// the radius</span> + <span style="color:#f09479; font-weight:bold">double</span> theta <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>frequency <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>frequency <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>frequency <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>frequency <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>frequency <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>frequency <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> theta <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>amplitude <span style="color:#d0d0d0">+</span> rho <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>platonicSolid<span style="color:#d0d0d0">.</span>rhoMul<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> r<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + Fold x: + Fold x: + + + + Cylinder Half Size + Dimensioni Metà Cilindro + + + + + Fold z: + Fold z: + + + + + Fold y: + Fold y: + + + + + + + + + + + + + I&nformation + I&nformazione + + + + <p>ABoxMod2, Based on a formula from Mandelbulb3D. Inspired from a 2D formula proposed by Kali at<br>Fractal Forums</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/kaliset-plus-boxfold-nice-new-2d-fractal/msg33670/#new">http://www.fractalforums.com/new-theories-and-research/kaliset-plus-boxfold-nice-new-2d-fractal/msg33670/#new<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AboxMod2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// should be default 1.5</span> + <span style="color:#f09479; font-weight:bold">double</span> tem <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset05<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> rr<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>tem <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + rr <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// on top &amp; bottom of cyl</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + rr <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// on cyl body</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// if (rr &lt; 1e-21) rr = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> m<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (sqrtMinR &lt; 1e-21 &amp;&amp; sqrtMinR &gt; -1e-21) sqrtMinR = (sqrtMinR &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">/</span> sqrtMinR<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rr <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">/</span> rr<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> m<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + Offset. Use in normal mode or use to fine tune in Julia mode + Offset. Da usare normalmente o per completare modalità Julia + + + + + + + + Internal &Rotation; + ";" should be removed, maybe? + &Rotazione Interna + + + + + + + + + + + + + + + + + + + + + + + + + + + Offset + + + + + Enable fabs(z. x) + Abilita fabs(z.x) + + + + Enable fabs( z.z) + Abilita fabs( z.z) + + + + Enable fabs (z.y) + Abilita fabs( z.y) + + + + XY multiplier: + moltiplicatore XY: + + + + Sqr Multiplier : + Moltiplicatore Sqr: + + + + + + + + + + <html><head/><body><p>Cpixel is CVector3 c = ( c.x, c.y, c.z). It is each original point (pixel) in 3D space where the iteration starts from, ( c = original z for each point .) It is commonly found in formula structures z = f(z) + c.</p><p>The Cpixel multiplier effectively scales this point &quot;c&quot; towards the origin.</p><p>This transform allows the addition or subtraction of Cpixel, dependent on whether z is postive or negative.</p><p>e.g if <span style=" font-style:italic;">z.x</span> is positive then <span style=" font-style:italic;">fabs(c.x)</span> is added, if <span style=" font-style:italic;">z.x</span> is negative then <span style=" font-style:italic;">fabs(c)</span> is subtracted. </p><p>Also try negative addCpixel constant multipliers.</p><p>If checkBoxes are disabled then Cpixel remains signed.</p><p><br/></p></body></html> + doubts over "signed" + <html><head/><body><p>Cpixel è formato da CVector3 c = ( c.x, c.y, c.z). Questo è formato da ciascun punto originale (pixel) nello spazio 3D, da cui ha inizio l'iterazione ( c = origine z per ogni punto) normalmente si trova nella struttura delle formule z = f(z) + c.</p><p>Il moltiplicatore Cpixel scala effettivamente questo punto &quot;c&quot;.</p><p>Questa trasformazione permette l'aggiunta o la sottrazione di Cpixel, dipendente da z, se positiva o negativa.</p><p>e.g se <span style=" font-style:italic;">z.x</span> è positiva, allora <span style=" font-style:italic;">fabs(c.x)</span>viene aggiunta, se <span style=" font-style:italic;">z.x</span> iè negativa, allora <span style=" font-style:italic;">fabs(c)</span> viene sottratta. </p><p>Provare anche ad assegnare valori negativi ai moltiplicatori di costante addCpixel.</p><p>Se la casella di controllo non è spuntata, allora Cpixel rimane segnata.</p><p><br/></p></body></html> + + + + addCpi&xel Symmetrical Constant Multiplier + addCpi&xel Moltiplicatore Costante Simmetrico + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fABS + + + + + + + + + + + + Cpixel Multiplier + Moltiplicatore Cpixel + + + + <p>aexion octopus. Based on Aex_Octo from Mandelbulber3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/mandelbulb-3d/custom-formulas-and-transforms-release-t17106/">http://www.fractalforums.com/mandelbulb-3d/custom-formulas-and-transforms-release-t17106/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AexionOctopusModIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempN<span style="color:#d0d0d0">;</span> + tempN<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + tempN<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + tempN<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> tempN<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempN<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> tempN<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempN<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> tempN<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempN<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> tempN<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + Type 1 + Tipo 1 + + + + + + Fold z.x: + + + + + + + if ( z > Fold) z = Value -z, else if( z <Fold) z = - Value - z, + if ( z > Fold) z = Value -z, else if( z <Fold) z = - Value - z, + + + + + Type 2 + Tipo 2 + + + + + + z = fabs(z + fold) + + + + + + + z = fabs(z + fold) - fabs(z - fold) -z + + + + + + + Type 4 Fold Value + Tipo 4 Valore di Fold + + + + Fold Type + Tipo Fold + + + + + + Type 5 Fold2 Value + Tipo 5 Valore di Fold + + + + + + z = fold2 - fabs( fabs(z + fold) - fold2) - fabs(fold) + + + + + + Type 3 + Tpo 3 + + + + + Type 5 + Tipo 5 + + + + + + z = fold - fabs( fabs(z) - fold) + + + + + + Type 4 + Tipo 4 + + + + + + Fold z.y: + + + + + Parameters + Parametri + + + + + + + + Offset : + + + + + Sqrt Minimum Radius : + Minimo Raggio Sqrt: + + + + <p>Based on Amazing Surf Mod 1 from Mandelbulber3D, a formula proposed by Kali,<br>with features added by Darkbeam</p><table> +<tr><th>Reference</th><td><a href="????">????<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AmazingSurfMod1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">=</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>scaleVary <span style="color:#d0d0d0">* (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) -</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// z = fold - fabs( fabs(z) - fold)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// if z &gt; limit) z = Value -z, else if z &lt; limit) z = - Value - z,</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.x;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.x;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.y;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.y;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// z = fold2 - fabs( fabs(z + fold) - fold2) - fabs(fold)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledyFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> r2<span style="color:#d0d0d0">;</span> + r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// force cylinder fold</span> + r2 <span style="color:#d0d0d0">-=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21)</span> + <span style="color:#d0d0a0">// r2 = 1e-21;</span> + + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>sqtR<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1 + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + aux<span style="color:#d0d0d0">.</span>foldFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compFold0<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// fold group weight</span> + aux<span style="color:#d0d0d0">.</span>minRFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compMinR<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// orbit trap weight</span> + + <span style="color:#f09479; font-weight:bold">double</span> scaleColor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>colorMin <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// scaleColor += fabs(fractal-&gt;mandelbox.scale);</span> + aux<span style="color:#d0d0d0">.</span>scaleFactor <span style="color:#d0d0d0">=</span> scaleColor <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compScale<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + Change Mandelbulber3D + <p>Formula basata sulla formula Amazing Surf Mod 1 proveniente da Mandelbulb3D, formula proposta da Kali,<br>con funzionalità aggiunte da Darkbeam</p><table> +<tr><th>Reference</th><td><a href="????">????<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">AmazingSurfMod1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">=</span> + aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelboxVary4D<span style="color:#d0d0d0">.</span>scaleVary <span style="color:#d0d0d0">* (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) -</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// z = fold - fabs( fabs(z) - fold)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// if z &gt; limit) z = Value -z, else if z &lt; limit) z = - Value - z,</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.x;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.x;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.y;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.color += fractal-&gt;mandelbox.color.factor.y;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// z = fold2 - fabs( fabs(z + fold) - fold2) - fabs(fold)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledyFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> r2<span style="color:#d0d0d0">;</span> + r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// force cylinder fold</span> + r2 <span style="color:#d0d0d0">-=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21)</span> + <span style="color:#d0d0a0">// r2 = 1e-21;</span> + + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>sqtR<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>actualScale <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1 + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>actualScale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + aux<span style="color:#d0d0d0">.</span>foldFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compFold0<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// fold group weight</span> + aux<span style="color:#d0d0d0">.</span>minRFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compMinR<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// orbit trap weight</span> + + <span style="color:#f09479; font-weight:bold">double</span> scaleColor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>colorMin <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// scaleColor += fabs(fractal-&gt;mandelbox.scale);</span> + aux<span style="color:#d0d0d0">.</span>scaleFactor <span style="color:#d0d0d0">=</span> scaleColor <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compScale<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + This formula does not use the global addCpixel constant multiplier (on Options tab) + Questa formula non usa il moltiplicatore di costante a livello globale (su scheda Opzioni) + + + + + + Mag Transform T&1 + Trasformazione Mag T&1 + + + + + + + + + Stop T1 at iteration: + Ferma T1 all'iterazione: + + + + + + + + + Start T1 at iteration : + Inizia T1 all'iterazione: + + + + + + + + + + + + + + + Scale + Scala + + + + + + Mag Transform &T1 Internal Rotation; + Trasformazione Mag &T1 Rotazione Interna + + + + + + + + + <html><head/><body><p>Cpixel is CVector3 c = ( c.x, c.y, c.z). It is each original point (pixel) in 3D space where the iteration starts from, ( c = original z for each point .) It is commonly found in formula structures z = f(z) + c.</p><p>The Cpixel multiplier effectively scales this point &quot;c&quot;.</p><p>In this formula the c.y and c.z components of &quot;CVector3 c&quot; are swapped before being multiplied by &quot;CVector3 z&quot; components.<br/></p></body></html> + <html><head/><body><p>Cpixel è formato da CVector3 c = ( c.x, c.y, c.z). Questo è formato da ciascun punto originale (pixel) nello spazio 3D, da cui ha inizio l'iterazione ( c = origine z per ogni punto) normalmente si trova nella struttura delle formule z = f(z) + c.</p><p>Il moltiplicatore Cpixel scala effettivamente questo punto &quot;c&quot;.</p><p>Questa trasformazione permette lo scambio di ordine dei componenti di &quot;CVector3 c&quot; prima di venir moltiplicati per i componenti di &quot;CVector3 z&quot;.</p></body></html> + + + + + Pine T&ree addCpixel ConstantMultiplier ( c.y c.z Swap) + Pino Moltiplicatore Costante addCpixel (Scambia c.y c.z) + + + + + + Stop PT at iteration: + Ferma PT all'iterazione: + + + + + + Start PT at iteration : + Inizia PT all'iterazione: + + + + + alternate c.y c.z swap + Alterna scambio c.y c.z + + + + + + + Cpixel Multiplier + Moltiplicatore Cpixel + + + + + cx: + + + + + + In&verse_Cylindrical + + + + + + + z.y Multiplier:: + Moltiplicatore z.y + + + + + + z scale: + scala z: + + + + + Post Off&set + + + + + + Offset: + + + + + <p>benesiT1PineTree 3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/">http://www.fractalforums.com/new-theories-and-research/<br> +<a href="do-m3d-formula-have-to-be-distance-estimation-formulas/">do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BenesiT1PineTreeIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>benesiT1Enabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + t <span style="color:#d0d0d0">=</span> t <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> tempC<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>t <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)) +</span> tempC<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> t <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> tempC<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsD<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">),</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">),</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleC1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// * fractal-&gt;transformCommon.scaleB1;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaMode<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Mag Transform &T1 Rotation + Trasformazione Mag Rotazione &T1 + + + + Try both Linear and Logarithmic DelatDE distance estimation functions, to find which works best. + Provare entrambe le funzioni DE, Lineare Logaritmica e DeltaDE per trovare quale funziona meglio. + + + + + + + + + T1 + + + + + + + + + T1mod + + + + + + + + + + T2 + + + + + + + + + + T3 + + + + + + + + + + T4 + + + + + + + + + + T5b + + + + + Transform: + Trasformazione: + + + + Slot , Mag Transform Type and Iteration controls for additional transforms + Slot, Tipo Trasformazione Mag e controllo Iterazioni per trasformazioni addizionali + + + + Mag Transform Parameters. + Parametri Trasformazione Mag + + + + Offset z.z + + + + + T5b + + + + + power B.z + potenza B.z + + + + power B.x + potenza B.x + + + + power B.y + potenza B.y + + + + power A.z + potenza A.z + + + + Scale z.y + Scala z.y + + + + power A.x + potenza A.x + + + + Offset z.x + + + + + power A.y + potenza A.y + + + + Scale z.z + Scala z.z + + + + Scale z.x + Scala z.x + + + + Offset z.y + + + + + T1Mod + + + + + <p>benesiMagTransforms</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/">http://www.fractalforums.com/new-theories-and-research/<br> +<a href="do-m3d-formula-have-to-be-distance-estimation-formulas/">do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BenesiMagTransformsIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>benesiT1Enabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsT + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsT<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + t <span style="color:#d0d0d0">=</span> t <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> tempC<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>t <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)) +</span> tempC<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> t <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> tempC<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaMode<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// additional transform slot controls</span> + <span style="color:#f09479; font-weight:bold">bool</span> functionEnabledN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledByFalse<span style="color:#d0d0d0">};</span> + <span style="color:#f09479; font-weight:bold">int</span> startIterationN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsE<span style="color:#d0d0d0">};</span> + <span style="color:#f09479; font-weight:bold">int</span> stopIterationN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsD<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsE<span style="color:#d0d0d0">};</span> + + sFractalMagTransforms<span style="color:#d0d0d0">::</span>multi_orderOfTransf transfN<span style="color:#d0d0d0">[</span><span style="color:#87df71">5</span><span style="color:#d0d0d0">] = {</span>fractal<span style="color:#d0d0d0">-&gt;</span>magTransf<span style="color:#d0d0d0">.</span>orderOfTransf1<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>magTransf<span style="color:#d0d0d0">.</span>orderOfTransf2<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>magTransf<span style="color:#d0d0d0">.</span>orderOfTransf3<span style="color:#d0d0d0">,</span> + fractal<span style="color:#d0d0d0">-&gt;</span>magTransf<span style="color:#d0d0d0">.</span>orderOfTransf4<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>magTransf<span style="color:#d0d0d0">.</span>orderOfTransf5<span style="color:#d0d0d0">};</span> + + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span><span style="color:#f09479; font-weight:bold">int</span> f <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> f <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">5</span><span style="color:#d0d0d0">;</span> f<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>functionEnabledN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">] &amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> startIterationN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">] &amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> stopIterationN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">])</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL<span style="color:#d0d0d0">;</span> + CVector3 temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale<span style="color:#d0d0d0">;</span> + CVector3 tempV2<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>transfN<span style="color:#d0d0d0">[</span>f<span style="color:#d0d0d0">])</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMagTransforms<span style="color:#d0d0d0">::</span>typeT1<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3Da222<span style="color:#d0d0d0">;</span> + tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA200<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMagTransforms<span style="color:#d0d0d0">::</span>typeT1Mod<span style="color:#d0d0d0">:</span> + tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D333<span style="color:#d0d0d0">;</span> + tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset111<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset111<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">);</span> + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMagTransforms<span style="color:#d0d0d0">::</span>typeT2<span style="color:#d0d0d0">:</span> + tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// switching, squared, sqrt</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA111<span style="color:#d0d0d0">);</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D444<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMagTransforms<span style="color:#d0d0d0">::</span>typeT3<span style="color:#d0d0d0">:</span> + tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// switching</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset222<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3Db222<span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMagTransforms<span style="color:#d0d0d0">::</span>typeT4<span style="color:#d0d0d0">:</span> + tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// switching, squared,</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetB111<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3Dc222<span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMagTransforms<span style="color:#d0d0d0">::</span>typeT5b<span style="color:#d0d0d0">:</span> + tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (z.x &gt; -1e-21 &amp;&amp; z.x &lt; 1e-21)</span> + <span style="color:#d0d0a0">// z.x = (z.x &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#d0d0a0">// if (z.y &gt; -1e-21 &amp;&amp; z.y &lt; 1e-21)</span> + <span style="color:#d0d0a0">// z.y = (z.y &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#d0d0a0">// if (z.z &gt; -1e-21 &amp;&amp; z.z &lt; 1e-21)</span> + <span style="color:#d0d0a0">// z.z = (z.z &gt; 0) ? 1e-21 : -1e-21;</span> + tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span> + <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8X<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8X<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>power025<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">));</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span> + <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Y<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Y<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>power025<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">));</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span> + <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Z<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Z<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>power025<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">));</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetC111<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3Dd222<span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Pine Tree addCpixel ConstantMultiplier ( c.y c.z Swap) + Pino Moltiplicatore Costanti addCpixel (scambia c.y c.z) + + + + Cpixel Multiplier + Moltiplicatore Cpixel + + + + <p>benesiFastPwr2PineTree 3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/">http://www.fractalforums.com/new-theories-and-research/<br> +<a href="do-m3d-formula-have-to-be-distance-estimation-formulas/">do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BenesiPineTreeIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + t <span style="color:#d0d0d0">=</span> t <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>t <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)) +</span> c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> t <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> c<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + Pr&ism Shape + Forma a Pr&isma + + + + + + + + + + + Stop at iteration : + Ferma all'iterazione: + + + + + + + + + + + + + + + + + Note: Default = 1 + Nota: Default = 1 + + + + + + + + + + Dot scale: + Prodotto scala: + + + + + + + + + + Shift/offset scale: + Scambia/offset scala: + + + + Benesi& Pwr2 (Original) addCpixel ConstantMultiplier + + + + + Stop Pwr2 at iteration: + Ferma Pwr2 all'iterazione: + + + + Start Pwr2 at iteration : + Inizia Pwr2 all'iterazione: + + + + Pine T&ree Pwr2 addCpixel ConstantMultiplier ( c.y c.z Swap) + really not clear, "pine..." + Pino Pwr2 addCpixel ConstantMultiplier (Scambia c.y c.z) + + + + <p>benesiPwr2 mandelbulbs</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/">http://www.fractalforums.com/new-theories-and-research/<br> +<a href="do-m3d-formula-have-to-be-distance-estimation-formulas/">do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BenesiPwr2sIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#d0d0d0">{</span> + CVector3 gap <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0,0,0</span> + <span style="color:#f09479; font-weight:bold">double</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dot1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledPFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsP <span style="color:#d0d0a0">// default 0.0</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsP1<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// default 1.0</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>SQRT_3_4 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 1</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>SQRT_3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> gap <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>SQRT_3_4<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// z was pos, now some points neg (ie neg shift)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>benesiT1Enabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// rotation inside T1</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsF + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsF<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// Bensei origional pwr2</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> <span style="color:#d0d0a0">// needed when alternating pwr2s</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> r1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + CVector3 newZ <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span> <span style="color:#d0d0d0">||</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>r1<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + newZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> r1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + newZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> r1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + r1 <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>r1<span style="color:#d0d0d0">) *</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + newZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + newZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> newZ <span style="color:#d0d0d0">+ (</span>c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA100<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// pine tree</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> <span style="color:#d0d0a0">// needed when alternating pwr2s</span> + z <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + t <span style="color:#d0d0d0">=</span> t <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> tempC<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>t <span style="color:#d0d0d0">* (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)) +</span> tempC<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> t <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> tempC<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsD<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">),</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">),</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleC1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// * fractal-&gt;transformCommon.scaleB1;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaMode<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Bristorbrot formula</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/bristorbrot-3d/">http://www.fractalforums.com/theory/bristorbrot-3d/<br> +<a href="by Doug Bristor">by Doug Bristor<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">BristorbrotIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Bristorbrot formula 4D</p><table> +<tr><th>Reference</th><td><a href="https://code.google.com/archive/p/fractaldimension/">https://code.google.com/archive/p/fractaldimension/<br> +<a href="by Doug Bristor">by Doug Bristor<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Bristorbrot4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> neww <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">* (</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> + z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">=</span> neww<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>CollatzIteration formula</p><table> +<tr><th>Reference</th><td><a href="https://mathr.co.uk/blog/2016-04-10_collatz_fractal.html">https://mathr.co.uk/blog/2016-04-10_collatz_fractal.html<br> +<a href="https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_real_or_complex_numbers">https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_real_or_complex_numbers<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">CollatzIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + + CVector3 <span style="color:#e47eed">xV</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> xV <span style="color:#d0d0d0">+</span> <span style="color:#87df71">4.0</span> <span style="color:#d0d0d0">*</span> z <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>xV <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">) *</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span>xV<span style="color:#d0d0d0">,</span> M_PI<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">/=</span> <span style="color:#87df71">4.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#87df71">4.0</span> <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Analytic Linear DE adjustment factor: + Fattore controllo DE analitica lineare: + + + + Final Scale: + Scala Finale: + + + + + + Scale A: + Scala A: + + + + Vector B: + Vettore B: + + + + + + Scale B: + Scala B: + + + + PI Scale: + Scala PI: + + + + PART B + PARTE B + + + + PART A + PARTE A + + + + + + Vector A: + Vettore A: + + + + addCpi&xel c.x c.z Swap ConstantMultiplier + + + + + <p>CollatzModIteration formula</p><table> +<tr><th>Reference</th><td><a href="https://mathr.co.uk/blog/2016-04-10_collatz_fractal.html">https://mathr.co.uk/blog/2016-04-10_collatz_fractal.html<br> +<a href="https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_real_or_complex_numbers">https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_real_or_complex_numbers<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">CollatzModIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierB111 <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale4 <span style="color:#d0d0d0">*</span> z + <span style="color:#d0d0d0">- (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111 <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale2 <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">,</span> + M_PI <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// * cPI ;</span> + + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale025<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#87df71">4.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scaleLin <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + enable Base Shape + Abilita Forma Base + + + + + Prism Shape + Forma a Prisma + + + + gap + + + + + Stop Menger at iteration: + Stop Menger all'iterazione: + + + + Start Menger at iteration : + Inizia Menger all'iterazione: + + + + enable CrossMengerTrick + abilita CrossMengerTrick + + + + Stop KIFS at iteration: + Stop KIFS all'iterazione: + + + + Start KIFS at iteration : + Inizia KIFS all'iterazione: + + + + enable CrossMengerKIFS + abilita CrossMengerKIFS + + + + Prism Temp. DE factor + "Prism Temp. DE factor"? + Fattore De Prisma Temp. + + + + + <p>Cross Menger<br>from code by Knighty<br>FYI, The base shape is not really necessary if you use a lot of iterations.<br>It is there only for low iteration. One can replace it with a sphere as usual.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">CrossMengerIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 <span style="color:#d0d0d0">&amp;</span>c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux +<span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 s <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// find out where s comes from</span> + <span style="color:#f09479; font-weight:bold">double</span> gap <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span><span style="color:#d0d0a0">// slider[0.,1.,1.]</span> + <span style="color:#f09479; font-weight:bold">double</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqr3 <span style="color:#d0d0d0">=</span> SQRT_3<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqr305 <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0.86602540378443864676372317075294</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dot1<span style="color:#d0d0d0">;</span> + + + + + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// bool switch</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// CrossMengerTrick(CVector3 z){//use Msltoe's method. Gives correct result but the DE is</span> +discontinuous + <span style="color:#f09479; font-weight:bold">double</span> dd <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// aux.DE intially set at 1.0</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>sqr305 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>sqr3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> sqr305<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// can include z.x above</span> + + <span style="color:#d0d0a0">//Choose nearest corner/edge --&gt; to get translation symmetry (all y &amp; z code)</span> + <span style="color:#f09479; font-weight:bold">double</span> dy <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.5</span> <span style="color:#d0d0d0">&amp;&amp;</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// if both y &amp; z &gt; 0.5 then =1.5</span> + <span style="color:#d0d0d0">{</span> + dy <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">;</span> + dz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span><span style="color:#d0d0d0">((</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">) +</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+ (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + dy <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// and dz is unchanged</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> dz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">;</span><span style="color:#d0d0a0">// and dy is unchanged</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> dy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> dz<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">3.0</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// menger scale, possible parameter and DE</span> + dd <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">0.333333333333333333333333</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant * DE</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> dy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> dz<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> sqr305<span style="color:#d0d0d0">;</span> + gap <span style="color:#d0d0d0">=</span> dd <span style="color:#d0d0d0">*</span> gap<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> dd <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">//</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#87df71">3.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">//return dd * baseshape(z,Gap); //</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">//}</span> + <span style="color:#d0d0a0">//void CrossMengerKIFS(vec3 z)</span> + <span style="color:#d0d0a0">//{//Pure KIFS... almost correct</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> dd <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>sqr305 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// check</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>sqr3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> t<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> temp1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + temp1<span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> temp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">//CVector2(z.y, z.z) = CVector2(z.z, z.y);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">) +</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">-=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.5</span> <span style="color:#d0d0d0">*</span> sqr3<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">3.0</span><span style="color:#d0d0d0">;</span> + dd <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">0.33333333333333333333333333333333</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant</span> + z <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.5</span> <span style="color:#d0d0d0">*</span> sqr3<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> dd <span style="color:#d0d0d0">*</span> gap<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> dd <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// return dd * baseshape(z,Gap); //</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// temporary controls</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>sqr305 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">;</span><span style="color:#d0d0a0">//double dot = z.x * -sqr3 + z.y;</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// if dot neg , t= 0</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>sqr3<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// z.x moves pos dir</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// z.z pos</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// z.z is the biggest pos</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> s <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> sqr305<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// &quot;s&quot; scale of vec being subtracted, s from where??</span> + <span style="color:#d0d0a0">// z was pos, now some points neg (ie neg shift)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// z.x is the biggest</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span> <span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// not needed but interesting??</span> + <span style="color:#f09479; font-weight:bold">double</span> length <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">//void DE(vec3 pos)</span> + <span style="color:#d0d0a0">// {</span> + <span style="color:#d0d0a0">// if(KIFS) return CrossMengerKIFS(pos);</span> + <span style="color:#d0d0a0">// return CrossMengerTrick(pos);</span> + <span style="color:#d0d0a0">// }</span> + +<span style="color:#d0d0d0">}</span>*/ + +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + enable Prism Shape + Abilita Forma a Prisma + + + + Prism Shape Mod1 + Mod1 Forma Prismatica + + + + Apply z.x condition + Applica condizione z.x + + + + DE tweak: + Ritocco DE: + + + + z.y scale: + scala z.y: + + + + z.z scale: + scala z.z: + + + + Prism Shape Rotation + Rotazione Forma Prismatica + + + + enable CrossMengerTrick Mod1 + strange names + Abilita CrossMengerTrick Mod1 + + + + + Scale: + Scala: + + + + <p>3D Mandelbrot formula invented by David Makin</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7235/#msg7235">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7235/#msg7235<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">HypercomplexIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">double</span> <span style="color:#d0d0d0">&amp;</span>w<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + CVector3 <span style="color:#e47eed">newz</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> w <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> w <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> + <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> neww <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> w <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> + w <span style="color:#d0d0d0">=</span> neww<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + Multiplier + Moltiplicatore + + + + + Sub Multiplier + Sub Moltiplicatore + + + + + Sub Multiplier + Sub Moltiplicatore + + + + <p>From M3D. A formula made by Trafassel, the original Ide's Formula thread</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/videos/formula-21-%28julia-set-interpretation%29/">http://www.fractalforums.com/videos/formula-21-%28julia-set-interpretation%29/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">IdesIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) &lt;</span> <span style="color:#87df71">2.5</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#87df71">.9</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) &lt;</span> <span style="color:#87df71">2.5</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">.9</span><span style="color:#d0d0d0">;</span> + + CVector3 z2 <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> + CVector3 newZ<span style="color:#d0d0d0">;</span> + newZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier121<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0555<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* (</span>z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + newZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier121<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + newZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier121<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>z + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0555<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> newZ<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>From M3D. A formula made by Trafassel, the original Ide's Formula thread</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/videos/formula-21-%28julia-set-interpretation%29/">http://www.fractalforums.com/videos/formula-21-%28julia-set-interpretation%29/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Ides2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 z2 <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> + CVector3 newZ<span style="color:#d0d0d0">;</span> + newZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier121<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0555<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* (</span>z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + newZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier121<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + newZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier121<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>z + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0555<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> newZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>quadratic iteration in imaginary scator algebra</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/ix-possibly-the-holy-grail-fractal-%28in-fff-lore%29">http://www.fractalforums.com/new-theories-and-research/ix-possibly-the-holy-grail-fractal-%28in-fff-lore%29<br> +<a href="http://luz.izt.uam.mx/index.html/?q=node/95&language=en">http://luz.izt.uam.mx/index.html/?q=node/95&language=en<br> +</td></tr> +<tr><th>Author</th><td>Manuel Fernandez-Guasti<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">FastImagscaPower2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">//+ 1e-061</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> x2 <span style="color:#d0d0d0">-</span> y2 <span style="color:#d0d0d0">-</span> z2 <span style="color:#d0d0d0">+ (</span>y2 <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">) /</span> x2<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1</span> <span style="color:#d0d0d0">-</span> z2 <span style="color:#d0d0d0">/</span> x2<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">* (</span><span style="color:#87df71">1</span> <span style="color:#d0d0d0">-</span> y2 <span style="color:#d0d0d0">/</span> x2<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Kalisets1 Mod + + + + + KaliDucks minR + + + + + Enable Limits (box) on Rendering Engine tab, and change bottom parameter z: 10 to z: 0, and try low bailout of 1 or 2. + Abilita Limiti (box) sulla scheda Motore di rendering, e cambiare i parametri in fondo, z: 10 a z: 0, provare anche valori bassi di bailout, 1 o 2. + + + + + + + <html><head/><body><p>Cpixel is CVector3 c = ( c.x, c.y, c.z). It is each original point (pixel) in 3D space where the iteration starts from, ( c = original z for each point .) It is commonly found in formula structures z = f(z) + c.</p><p>The Cpixel multiplier effectively scales this point &quot;c&quot;.</p></body></html> + <html><head/><body><p>Cpixel è formato da CVector3 c = ( c.x, c.y, c.z). Questo è formato da ciascun punto originale (pixel) nello spazio 3D, da cui ha inizio l'iterazione ( c = origine z per ogni punto) normalmente si trova nella struttura delle formule z = f(z) + c.</p><p>Il moltiplicatore Cpixel scala effettivamente questo punto &quot;c&quot;.</p></body></html> + + + + Sing&le Formula addCpixel Constant Multiplier + Moltiplicatore Costanti addCpixel Formula Singo&la + + + + Single Formula Julia &mode + &Modo Julia e Formula Singola + + + + + + + + + + + + + Informa&tion + Informa&zione + + + + <p>Based on Kalisets1 and KaliDucks, from Mandelbulb 3D, and refer Formula proposed by Kali, with<br>features added by Darkbeam.<br><b>M3D notes:</b><br>Try out julias and low R_bailout values of 2 down to 1!<br>You might have to cutoff at z=0 or so, to see something.</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns">http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Kalisets1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> sqs <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-21</span><span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// sph inv</span> + <span style="color:#f09479; font-weight:bold">double</span> m<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> minR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR0<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// KaliDucks</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>sqs <span style="color:#d0d0d0">&lt;</span> minR<span style="color:#d0d0d0">)</span> + m <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>minR<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + m <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">/</span> sqs<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// kalisets</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> m<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>m<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaMode<span style="color:#d0d0d0">)</span> z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>juliaC<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>LkmitchIteration</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/">http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">LkmitchIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> x2 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> z2 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> y2 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Makin3D-2 found through the another shot at the holy grail topic at ff</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/">http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Makin3D2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> x2 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">= -</span>y2 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">= -</span>z2 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Box Fold + Fold Box + + + + &Rotation of separate folding planes + &Rotazione piani di folding separati + + + + addCpi&xel Axis Swap ConstantMultiplier for Mandelbox iterations + addCpi&xel Scambio Assi ConstantMultiplier per iterazioni Mandelbox + + + + Men&ger_Sponge + Spugna_di_Men&ger + + + + Menger sub-loop Iterations + Sub-iterazioni Menger + + + + + + + + + + + + + + z.x : + + + + + + + + + Multiplier: + Moltiplicatore: + + + + + + + + + + + + + + z.z : + + + + + + + + + + Menger Scale Factor: + Fattore scala Menger: + + + + + + + + Offset : + + + + + + + + + + + + + + + z.y : + + + + + addCpixe&l Axis Swap ConstantMultiplier for Menger Sponge iterations + addCpixe&l Scambio Assi ConstantMultiplier per iterazioni Spugna Menger + + + + Scale component + Componente Scala + + + + Coloring components (beta version only) + Componenti colorazione (solo versione beta) + + + + <p>Mandelbox Menger Sponge Hybrid</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/ifs-iterated-function-systems/amazing-fractal/msg12467/#msg12467">http://www.fractalforums.com/ifs-iterated-function-systems/amazing-fractal/msg12467/#msg12467<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelboxMengerIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> <span style="color:#d0d0d0">&amp;</span>i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotationsEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 zRot<span style="color:#d0d0d0">;</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsR + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsR<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsS + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsS<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierC111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsM + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsM<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">int</span> count <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// Menger Sponge</span> + <span style="color:#f09479; font-weight:bold">int</span> k<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span>k <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> k <span style="color:#d0d0d0">&lt;</span> count<span style="color:#d0d0d0">;</span> k<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// addCpixel options</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierB111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>foldFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compFold<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// TODO fix?</span> + aux<span style="color:#d0d0d0">.</span>minRFactor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compMinR<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> scaleColor <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>colorMin <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// scaleColor += fabs(fractal-&gt;mandelbox.scale);</span> + aux<span style="color:#d0d0d0">.</span>scaleFactor <span style="color:#d0d0d0">=</span> scaleColor <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>foldColor<span style="color:#d0d0d0">.</span>compScale<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Fractal formula created by Buddhi</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Mandelbulb2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">,</span> tempR<span style="color:#d0d0d0">;</span> + tempR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">//+ 1e-061</span> + z <span style="color:#d0d0d0">*= (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> tempR<span style="color:#d0d0d0">);</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tempR<span style="color:#d0d0d0">;</span> + + tempR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">//+ 1e-061</span> + z <span style="color:#d0d0d0">*= (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> tempR<span style="color:#d0d0d0">);</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tempR<span style="color:#d0d0d0">;</span> + + tempR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">//+ 1e-061</span> + z <span style="color:#d0d0d0">*= (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> tempR<span style="color:#d0d0d0">);</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tempR<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + info does not close + + + + + <p>Fractal formula created by Buddhi</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Mandelbulb3Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">,</span> tempR<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> sign <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sign2 <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> sign2 <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + tempR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">//+ 1e-061</span> + z <span style="color:#d0d0d0">*= (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> tempR<span style="color:#d0d0d0">);</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tempR<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> sign <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + tempR <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">//+ 1e-061</span> + z <span style="color:#d0d0d0">*= (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> tempR<span style="color:#d0d0d0">);</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> sign2<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp <span style="color:#d0d0d0">*</span> sign<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tempR<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + + + fabs(z.x) + + + + + + + + + + fabs(z.y) + + + + + + + + + fabs(z.z) + + + + + + Rotate about z axis : + Ruota attorno asse z: + + + + + + Beta angle offset1: + offset1 angolo beta: + + + + + + Bulb Power: + Potenza bulb: + + + + + + Beta angle offset2: + offset2 angolo beta: + + + + + Enable cos-tan mode (disable sin-tan2 mode) + abilita modo cos-tan (disabilita modo sin-tan2) + + + + + Phi Scale: + PI would be ambiguous + Scala Phi: + + + + + + Theta Scale: + Scala Teta: + + + + + + Analytic &Logrithmic DE adjustment + Ritocco DE Analitico &Logaritmica + + + + + + + + Analytic Logrithmic DE offset1: + Offset 1 DE Analtico Logaritmica: + + + + + + + + Analytic Logrithmic DE offset2: + Offset 2 DE Analtico Logaritmica: + + + + <p>mandelbulbBermarte<br>abs() version of Mandelbulb Kali modified by visual.bermarte</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/mandelbulb-variant/">http://www.fractalforums.com/theory/mandelbulb-variant/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbBermarteIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> th0<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> costh<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sinth<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zp<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + th0 <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??</span> + ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + th0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + th0 <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??</span> + ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + th0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + costh <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>costh <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> costh<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + ph0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> + zp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">);</span> + sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> zp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + ph0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> + zp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">);</span> + costh <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> zp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>costh <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> costh<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledByFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// analytic log DE adjustment</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">) *</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scale1 + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> <span style="color:#d0d0a0">// default, i.e. scale1 &amp; offset1 &amp; offset2 = 1.0</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + fa&bs() Controls + Controlli fa&bs() + + + + <p>mandelbulb Kali modification</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/mandelbulb-variant/">http://www.fractalforums.com/theory/mandelbulb-variant/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbKaliIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + th0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + + th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>betaAngleOffset + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1e-061</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// MUST keep exception catch ??;</span> + ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + ph0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">);</span> + sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> zp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">));</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// analytic log DE adjustment</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">) *</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scale1 + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> <span style="color:#d0d0a0">// default, i.e. scale1 &amp; offset1 &amp; offset2 = 1.0</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8 <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Mandelbulb Multi_Trig Formula; + Formula Mandelbulb Multi_Trig + + + + fabs() Controls (&Burning Ship mode) + Controlli fabs() (modo &Burning Ship) + + + + Phi scale: + Scala Phi: + + + + Theta scale: + Scala Teta: + + + + + Enable cosine mode (disable sine mode) + Abilita modo coseno (disabilita modo seno) + + + + Polar to Cartesian - Sine Mode z.z = sin(th); + Da polare a Cartesiano - Modo Seno z.z = sin(th); + + + + in Sine mode, enable costh = cos(th0) + in modo Seno, abilita costh = cos(th0) + + + + in Cosine mode, enable sinth = sin(th0) + In modo Coseno, abilita sinth = sin(th0) + + + + <p>mandelbulbMulti 3D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbMultiIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 <span style="color:#d0d0d0">&amp;</span>c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> v1<span style="color:#d0d0d0">,</span> v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// if (aux.r &lt; 1e-21)</span> + <span style="color:#d0d0a0">// aux.r = 1e-21;</span> + <span style="color:#d0d0a0">// if (v3 &lt; 1e-21 &amp;&amp; v3 &gt; -1e-21)</span> + <span style="color:#d0d0a0">// v3 = (v3 &gt; 0) ? 1e-21 : -1e-21;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>acosOrasin <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>acos<span style="color:#d0d0d0">)</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>atanOratan2 <span style="color:#d0d0d0">==</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>atan<span style="color:#d0d0d0">)</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>v2 <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> th <span style="color:#d0d0d0">=</span> th0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph <span style="color:#d0d0d0">=</span> ph0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// double costh = cos(th);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + rp <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// cosine mode</span> + <span style="color:#f09479; font-weight:bold">double</span> sinth <span style="color:#d0d0d0">=</span> th<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledyFalse<span style="color:#d0d0d0">)</span> sinth <span style="color:#d0d0d0">=</span> th0<span style="color:#d0d0d0">;</span> + sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>sinth<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>sinth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">) *</span> sinth<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// sine mode ( default = V2.07))</span> + <span style="color:#f09479; font-weight:bold">double</span> costh <span style="color:#d0d0d0">=</span> th<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledzFalse<span style="color:#d0d0d0">)</span> costh <span style="color:#d0d0d0">=</span> th0<span style="color:#d0d0d0">;</span> + costh <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>costh<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>costh <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">) *</span> costh<span style="color:#d0d0d0">,</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierC111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Classic Mandelbulb Power 2 fractal</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MandelbulbPower2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z2 <span style="color:#d0d0d0">/ (</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">= (</span>x2 <span style="color:#d0d0d0">-</span> y2<span style="color:#d0d0d0">) *</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">= -</span><span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>x2 <span style="color:#d0d0d0">+</span> y2<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Menger Sponge Start Function Fabs function z = fabs( z + const.A); + Inizia Funzione Spugna di Menger Funzione fabs di z = fabs( z + const.A); + + + + + Const.A x: + + + + + + Const.A y: + + + + + + Const.A z: + + + + + Menger Sponge Middle Functions + Funzioni intermedie Spugna di Menger + + + + Middle &Rotation + &Rotazione Intermedia + + + + Middle &Box Fold + Folding &Box Intermedio + + + + Middle FabsBoxFold (z = fabs(z + Const.F1) - fabs(z - Const.F2) - (z * Const.F3)) * Scale + FabsBoxFold Intermedio (z = fabs(z + Const.F1) - fabs(z - Const.F2) - (z * Const.F3)) * Scale + + + + Start scale at iteration: + Inizia Scala all'iterazione: + + + + Stop scale at iteration: + Ferma scala all'iterazione: + + + + FabsBoxFold Scale + Scala FabsBoxFold + + + + Menger Sponge End Function Apply Constants; + Fine Funzione Spugna di Menger Applica Costanti + + + + + Offset Multiplier: + Moltiplicatore Offset: + + + + + Menger Sponge scale: + Scala Spugna di Menger: + + + + + Conditional mode: if ( z.z < limit ) z.z = z.z; + Modo condizionale: if ( z.z < limit ) z.z = z.z; + + + + Cpixel Multiplier: + Moltiplicatore Cpixel: + + + + <p>Menger Middle Mod</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MengerMiddleModIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 <span style="color:#d0d0d0">&amp;</span>c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// fabs() and menger fold</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// rotation</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mainRot<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// box fold</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledByFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// fabsBoxFold</span> + CVector3 tempA<span style="color:#d0d0d0">,</span> tempB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// menger scales and offsets</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// addCpixel options</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> c <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierC111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + + Rotat&ion + Rotatz&ione + + + + + + + Stop Rotation at iteration: + ferma rotazione a iterazione: + + + + + + Benesi Mag Transform T&1 + Trasformazione Benesi Mag T&1 + + + + + + Benesi Mag Transform T&1 Mod + Trasformazione Benesi Mag T&1 Mod + + + + + + Stop T1 Mod at iteration: + Ferma T1 Mod all'iterazione: + + + + + + Start T1 Mod at iteration : + Inizia T1 Mod all'iterazione: + + + + + + fABS Add Constant Multi z = fabs( z + const.A ) - fabs( z - const.B )& - ( z * const.C ) + fABS Aggiunge Multi Costantei z = fabs(z + const.A) - fabs(z - const.B)& - (z * const.C) + + + + + + + - ( z * C ) + + + + + + + + Enable fABS(z - B) + Abilita fABS(z - B) + + + + + + + Enable fABS(z + A) + Abilita fABS(z + A) + + + + + + Men&ger Sponge + Spugna di Men&ger + + + + Temp DE fudge factor + Fattore Temp fudge DE + + + + <p>Menger Prism Shape<br>from code by Knighty<br>http://www.fractalforums.com/fragmentarium/cross-menger!-can-anyone-do-this/msg93972/#new</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MengerPrismShapeIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 gap <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0,0,0</span> + <span style="color:#f09479; font-weight:bold">double</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dot1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsP <span style="color:#d0d0a0">// default 0.0</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsP1<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// default 1.0</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>SQRT_3_4 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 1</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>SQRT_3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> gap <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>SQRT_3_4<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// z was pos, now some points neg (ie neg shift)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledRFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsR + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsR<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>benesiT1EnabledFalse <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsT1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 tempZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> tempZ<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsTM1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D333<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">);</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsF + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsF<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempA<span style="color:#d0d0d0">,</span> tempB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsM + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsM<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// not needed but interesting??</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Stop: + Ferma: + + + + Polynomial iterations. Start : + Iterazione polinomiale -Inizio: + + + + + PART B = ScaleB * z + VectorC + PARTE B = ScaleB * z + VectorC + + + + + fn( z) options, (default = z;) + opzione fn(z), (default = z) + + + + + fabs(z): + + + + + + Analytic Linear DE multiplier: + Moltiplicatore DE Lineare Analitico: + + + + + fabs(z) + + + + + fn( z) = Pi Rotation about &VectorA + fn( z) = Rotazione di Pi attorno a &VectorA + + + + + Pi Rotation: + Rotazione Pi: + + + + + Power3 + + + + + + Power2 Polynomial Az^2 + Bz + C + Power2 Polinomiale Az^2 + Bz + C + + + + + Vector C: + Vettore C: + + + + + Final Scale: + Scala Finale: + + + + + PART A = - (ScaleA * z + VectA) * fn(z) + PARTE A = - (ScaleA * z + VectA) * fn(z) + + + + fn( z) = &Box Offset + + + + + + Offset: + + + + + + Analytic Linear DE offset: + Offest DE lineare analitico: + + + + + fabs(fn(z)): + + + + + + fn( z) = cos ( z * pi ) + + + + + + Pi Scale: + Scala Pi: + + + + Menger_Sponge + Spugna_di_Menger + + + + Menger Iterations + Iterazioni di Menger + + + + <p>Menger Sponge Polynomial Hybrid modified by Mclarekin</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MengerPwr2PolyIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 partA <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// fabs</span> + partA <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// pwr3 or z * fabs(z^2)</span> + partA <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + partA <span style="color:#d0d0d0">=</span> + partA <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale2 <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + + CVector3 fnZ1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// cos(z*Pi)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> scalePi <span style="color:#d0d0d0">=</span> M_PI <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleC1<span style="color:#d0d0d0">;</span> + fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> scalePi<span style="color:#d0d0d0">);</span> + fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> scalePi<span style="color:#d0d0d0">);</span> + fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> scalePi<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledyFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// pi rotation</span> + fnZ1 <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">,</span> M_PI <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledzFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// box offset</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// fabs(fnZ1)</span> + fnZ1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">);</span> + CVector3 partB <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> partB <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + partB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale4<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierB111 <span style="color:#d0d0d0">+</span> partB <span style="color:#d0d0d0">-</span> partA <span style="color:#d0d0d0">*</span> fnZ1<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale025<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#87df71">4.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scaleLin <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offsetLin<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierC111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">int</span> count <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// Menger Sponge</span> + <span style="color:#f09479; font-weight:bold">int</span> k<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">for</span> <span style="color:#d0d0d0">(</span>k <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> k <span style="color:#d0d0d0">&lt;</span> count<span style="color:#d0d0d0">;</span> k<span style="color:#d0d0d0">++)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// rotation</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Menger Sponge formula created by Knighty</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/ifs-iterated-function-systems/kaleidoscopic-(escape-time-ifs)/">http://www.fractalforums.com/ifs-iterated-function-systems/kaleidoscopic-(escape-time-ifs)/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MengerSpongeIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">3.0</span><span style="color:#d0d0d0">;</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">3.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Ring number: + Numero anelli: + + + + Ring radius: + Raggio anelli: + + + + Ring thickness: + Spessore anelli: + + + + Size factor: + fattore dimensioni: + + + + <p>Msltoe Donut formula</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/">http://www.fractalforums.com/new-theories-and-research/<br> +<a href="low-hanging-dessert-an-escape-time-donut-fractal/msg90171/#msg90171">low-hanging-dessert-an-escape-time-donut-fractal/msg90171/#msg90171<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeDonutIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> rad2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>donut<span style="color:#d0d0d0">.</span>ringThickness<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> nSect <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> M_PI <span style="color:#d0d0d0">/</span> fractal<span style="color:#d0d0d0">-&gt;</span>donut<span style="color:#d0d0d0">.</span>number<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> fact <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>donut<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> R <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> R2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>donut<span style="color:#d0d0d0">.</span>ringRadius <span style="color:#d0d0d0">-</span> R<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> R2 <span style="color:#d0d0d0">*</span> R2 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> rad2 <span style="color:#d0d0d0">*</span> rad2<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> theta <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> theta2 <span style="color:#d0d0d0">=</span> nSect <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">round</span><span style="color:#d0d0d0">(</span>theta <span style="color:#d0d0d0">/</span> nSect<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>t <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.03</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> c1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>theta2<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> s1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>theta2<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> x1 <span style="color:#d0d0d0">=</span> c1 <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> s1 <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y1 <span style="color:#d0d0d0">= -</span>s1 <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> c1 <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + x1 <span style="color:#d0d0d0">=</span> x1 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>donut<span style="color:#d0d0d0">.</span>ringRadius<span style="color:#d0d0d0">;</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fact <span style="color:#d0d0d0">*</span> x1<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fact <span style="color:#d0d0d0">*</span> z1<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fact <span style="color:#d0d0d0">*</span> y1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">/=</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> theta2<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + P&re-Scale + P&re-Scala + + + + + Pre-Scale + Pre-Scala + + + + Theta power + Potenza Teta + + + + + Radius power + Potenza raggio + + + + Phi power + Potenza Phi + + + + + Analytic &Logrithmic DE adjustment ( beta version only, may need to force Delta DE method) + Ritocco DE Analitica &Logaritmica (solo versione beta, potrebbe essere necessario usare il metodo Forza Delta DE) + + + + + enable aux.r_dz squared + Abilita aux.r_dz al quadrato + + + + + Spherica&l Offset + Offset &Sferico + + + + + Offset Radius: + Raggio Offset: + + + + <p>MsltoeToroidal</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/toroidal-coordinates/msg9428/">http://www.fractalforums.com/theory/toroidal-coordinates/msg9428/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeToroidalIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// pre-scale</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// Torioidal bulb</span> + <span style="color:#f09479; font-weight:bold">double</span> r1 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0.5</span> + <span style="color:#f09479; font-weight:bold">double</span> theta <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> x1 <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> y1 <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> x1<span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> x1<span style="color:#d0d0d0">) + (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> y1<span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> y1<span style="color:#d0d0d0">) +</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">//+ 1e-061</span> + <span style="color:#f09479; font-weight:bold">double</span> phi <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">));</span> + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// default 4.0</span> + + phi <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 8</span> + theta <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 9 gives 8 symmetry</span> + <span style="color:#d0d0a0">// convert back to cartesian coordinates</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>r1 <span style="color:#d0d0d0">+</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">)) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>r1 <span style="color:#d0d0d0">+</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">)) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// analytic log DE adjustment</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledAuxR2False<span style="color:#d0d0d0">)</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r_dz<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scale1 <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0a0">// squared</span> + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// default, i.e. scale1 &amp; offset1 &amp; offset2 = 1.0</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">) *</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// spherical offset</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21) lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// then add Cpixel constant vector</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + sqrt(aux.r) + + + + + Th0 Scale + Scala Th0 + + + + Polar to Cartesian - Sine Mode z.z = sin(th0); + Da Polare a Cartesiano - Modo Seno z.z = sin(th0) + + + + Ph0 Scale + Scala Ph0 + + + + <p>MsltoeToroidalMulti</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/toroidal-coordinates/msg9428/">http://www.fractalforums.com/theory/toroidal-coordinates/msg9428/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeToroidalMultiIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// pre-scale</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// Torioidal bulb multi</span> + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> v1<span style="color:#d0d0d0">,</span> v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>sinTan2Trig<span style="color:#d0d0d0">.</span>orderOfzyx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + v1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + v2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + v3 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// double theta = atan2(z.y, z.x);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>sinTan2Trig<span style="color:#d0d0d0">.</span>atan2Oratan <span style="color:#d0d0d0">==</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>atan2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>v2<span style="color:#d0d0d0">,</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + ph0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">atan</span><span style="color:#d0d0d0">(</span>v2 <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> r1 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0.5</span> + <span style="color:#f09479; font-weight:bold">double</span> x1 <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> y1 <span style="color:#d0d0d0">=</span> r1 <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">);</span> + + aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> x1<span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> x1<span style="color:#d0d0d0">) + (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> y1<span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> y1<span style="color:#d0d0d0">) +</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">//+ 1e-061</span> + + <span style="color:#f09479; font-weight:bold">double</span> sqrT <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// sqrts</span> + <span style="color:#d0d0d0">{</span> + sqrT <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>sinTan2Trig<span style="color:#d0d0d0">.</span>asinOracos <span style="color:#d0d0d0">==</span> sFractalSinTan2Trig<span style="color:#d0d0d0">::</span>asin<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> sqrT<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + th0 <span style="color:#d0d0d0">+=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>v1 <span style="color:#d0d0d0">/</span> sqrT<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + th0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr8<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 8</span> + ph0 <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 9 gives 8 symmetry</span> + + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// default 4.0</span> + + <span style="color:#f09479; font-weight:bold">double</span> costh <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> sinth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th0<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledzFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// cosine mode</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>r1 <span style="color:#d0d0d0">+</span> rp <span style="color:#d0d0d0">*</span> sinth<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>r1 <span style="color:#d0d0d0">+</span> rp <span style="color:#d0d0d0">*</span> sinth<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>rp <span style="color:#d0d0d0">*</span> costh<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// sine mode default</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>r1 <span style="color:#d0d0d0">+</span> rp <span style="color:#d0d0d0">*</span> costh<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>r1 <span style="color:#d0d0d0">+</span> rp <span style="color:#d0d0d0">*</span> costh<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph0<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>rp <span style="color:#d0d0d0">*</span> sinth<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// analytic log DE adjustment</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>enabledAuxR2False<span style="color:#d0d0d0">)</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r_dz<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scale1 <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0a0">// squared</span> + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// default, i.e. scale1 &amp; offset1 &amp; offset2 = 1.0</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">) *</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4 + <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// spherical offset</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21) lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0a0">// then add Cpixel constant vector</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Global Constant Multiplier of c.z must be set at 0.0 for this formula + Moltiplicatore Costanti globale di c.z, dev'essere impostato a 0 per questa formula + + + + + + + + + + + Offset + + + + + + addCpixel Symmetrical Constant &Multiplier + addCpixel Symmetrical Constante &Moltiplicatore + + + + <p>MsltoeSym2Mod based on the formula from Mandelbulb3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/15/">http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/15/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeSym2ModIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) &lt;</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">))</span> <span style="color:#d0d0a0">// then swap</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// making z.y furthest away from axis</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// then change sign of z.x and z.z</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + CVector3 z2 <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// squares</span> + <span style="color:#f09479; font-weight:bold">double</span> v3 <span style="color:#d0d0d0">= (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// sum of squares</span> + <span style="color:#d0d0a0">// if (v3 &lt; 1e-21 &amp;&amp; v3 &gt; -1e-21)</span> + <span style="color:#d0d0a0">// v3 = (v3 &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> zr <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">;</span> + temp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> zr<span style="color:#d0d0d0">;</span> + temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> zr <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// scaling temp.y</span> + temp<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> temp <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21)</span> + <span style="color:#d0d0a0">// lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + addYZ Scale : + Scala addXZ: + + + + + + addCpixel Symmetrical Constant &Multiplier + &Moltipicatore costanti simmetrico addCpixel + + + + + &Quaternion Fold + Folding &Quaternione + + + + + Enable DE Vector mode + Abilita modo Vettori DE + + + + + DE Vector Influence: + DE Influenza Vettore: + + + + <p>MsltoeSym3Mod based on the formula from Mandelbulb3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/15/">http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/15/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeSym3ModIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) &lt;</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">))</span> <span style="color:#d0d0a0">// then swap</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// making z.y furthest away from axis</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// then change sign of z.x and z.z</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + CVector3 z2 <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// squares</span> + <span style="color:#f09479; font-weight:bold">double</span> v3 <span style="color:#d0d0d0">= (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0 <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// sum of squares</span> + <span style="color:#d0d0a0">// if (v3 &lt; 1e-21 &amp;&amp; v3 &gt; -1e-21) v3 = (v3 &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> zr <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> v3<span style="color:#d0d0d0">;</span> + temp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> zr<span style="color:#d0d0d0">;</span> + temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> zr <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// scaling temp.y</span> + temp<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> temp <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21) lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse <span style="color:#d0d0a0">// quaternion fold</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 temp2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp2<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// mult. scale (1,2,2)</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// aux.r_dz *= avgScale * fractal-&gt;transformCommon.scaleA1;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempAux <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">+ (</span>tempAux <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>r_dz<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// mult. scale (1,2,2)</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Msltoe_Julia_Bulb_Mod2</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/msg14198/#msg14198">http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/msg14198/#msg14198<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeSym3Mod2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> theta<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> phi<span style="color:#d0d0d0">;</span> + CVector3 z2 <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> z2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (r &lt; 1e-21)</span> + <span style="color:#d0d0a0">// r = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> r1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>r <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0 <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z2<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (r1 &lt; 1e-21)</span> + <span style="color:#d0d0a0">// r1 = 1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> z2<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + theta <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + phi <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> r1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + theta <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + phi <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> r1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>theta<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>phi<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21)</span> + <span style="color:#d0d0a0">// lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Msltoe_Julia_Bulb_Mod3</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/msg14320/#msg14320">http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/msg14320/#msg14320<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeSym3Mod3Iteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + CVector3 z1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> psi <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) +</span> M_PI <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> psi2 <span style="color:#d0d0d0">=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">while</span> <span style="color:#d0d0d0">(</span>psi <span style="color:#d0d0d0">&gt;</span> M_PI_8<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + psi <span style="color:#d0d0d0">-=</span> M_PI_4<span style="color:#d0d0d0">;</span> + psi2 <span style="color:#d0d0d0">-=</span> M_PI_4<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// M_PI_4 = pi/4</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> cs <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>psi2<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> sn <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>psi2<span style="color:#d0d0d0">);</span> + z1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> cs <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> sn<span style="color:#d0d0d0">;</span> + z1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> sn <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> cs<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z1<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z1<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + CVector3 zs <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zs2 <span style="color:#d0d0d0">=</span> zs<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> zs<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (zs2 &lt; 1e-21)</span> + <span style="color:#d0d0a0">// zs2 = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> zs3 <span style="color:#d0d0d0">=</span> + <span style="color:#d0d0d0">(</span>zs2 <span style="color:#d0d0d0">+</span> zs<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0 <span style="color:#d0d0d0">*</span> zs<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> zs<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zsd <span style="color:#d0d0d0">= (</span><span style="color:#87df71">1</span> <span style="color:#d0d0d0">-</span> zs<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> zs3<span style="color:#d0d0d0">);</span> + + z1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>zs<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> zs<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> zsd<span style="color:#d0d0d0">;</span> + z1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span><span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> zsd <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// scaling y;</span> + z1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>zs2<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z1<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> cs <span style="color:#d0d0d0">+</span> z1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> sn<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>z1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> sn <span style="color:#d0d0d0">+</span> z1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> cs<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// symmetrical addCpixel</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> <span style="color:#d0d0a0">// spherical offset</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21)</span> + <span style="color:#d0d0a0">// lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse <span style="color:#d0d0a0">// quaternion fold</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// mult. scale (1,2,2)</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21)</span> + <span style="color:#d0d0a0">// tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// mult. scale (1,2,2)</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + Scale + Scala + + + + <p>MsltoeSym4Mod Based on the formula from Mandelbulb3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/15/">http://www.fractalforums.com/theory/choosing-the-squaring-formula-by-location/15/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">MsltoeSym4ModIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21)</span> + <span style="color:#d0d0a0">// tempL = 1e-21;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> swap <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) &lt;</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> swap<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) &lt;</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + swap <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> swap<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) &lt;</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + swap <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> swap<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + temp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + temp<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> temp <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21)</span> + <span style="color:#d0d0a0">// lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Note 1) : the pseudo kleinian fractal on this UI, works with the standard linear analytic DE calculation. + Nota 1) : il frattale pseudo kleinian in questa UI, lavora utilizzando il calcolo DE di tipo standard, analitico e lineare + + + + Note 2) : termination condition is when iteration reaches Maxiter, + Nota 2): la condizione termina quando il numero delle iterazioni è uguale al numero Maxiter + + + + + Pseu&do Kleinian + + + + + + Pseu&do Kleinian Variation + Variante Pseu&do Kleinian + + + + + Pseudo Kleinian Parameters + Parametri Pseudo Kleinian + + + + + + Size R2: + Dimensioni R2: + + + + + + Csize: + + + + + + + DEadd (tweak): + DEadd (messa a punto) + + + + z subtr. scale: + scala zubtr: + + + + <p>Pseudo Kleinian std DE Knighty - Theli-at's Pseudo Kleinian (Scale 1 JuliaBox + Something</p><table> +<tr><th>Reference</th><td><a href="https://github.com/Syntopia/Fragmentarium/blob/master/">https://github.com/Syntopia/Fragmentarium/blob/master/<br> +<a href="Fragmentarium-Source/Examples/Knighty%20Collection/PseudoKleinian.frag">Fragmentarium-Source/Examples/Knighty%20Collection/PseudoKleinian.frag<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">PseudoKleinian1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 gap <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0,0,0</span> + <span style="color:#f09479; font-weight:bold">double</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dot1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledPFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsP <span style="color:#d0d0a0">// default 0.0</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsP1<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// default 1.0</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>SQRT_3_4 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 1</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>SQRT_3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> gap <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>SQRT_3_4<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// z was pos, now some points neg (ie neg shift)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledRFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsR + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsR<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>benesiT1EnabledFalse <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsT1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 tempZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> tempZ<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsTM1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D333<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">);</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsF + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsF<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempA<span style="color:#d0d0d0">,</span> tempB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsM + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsM<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// not needed but interesting??</span> + <span style="color:#f09479; font-weight:bold">double</span> k<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// Pseudo kleinian</span> + CVector3 Csize <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0777<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// correct c++ version.</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> tempZ <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">;</span> + + k <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05 <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">),</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">*=</span> k<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> k <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>tweak005<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// variation from openCL</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + k <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05 <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">),</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">*=</span> k<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> k <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>tweak005<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// no bailout</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + Note 1) : termination condition is when iteration reaches Maxiter, + Nota 1): la condizione di arresto si verifica quando il numero di iterazioni è uguale al numero di Maxiter + + + + Note 2) : each additional iteration adds more detail. + Nota 2): ogni iterazione addizionale incrementa il livello di dettaglio + + + + Note 3 ): this type of DE calculation will not work with other types. + Nota 3): questo tipo di calcolo DE non funzionerà su tipi differenti + + + + Bo&x Fold + Folding Bo&x + + + + Pseudo Kleinian + + + + + <p>Pseudo Kleinian Knighty - Theli-at's Pseudo Kleinian (Scale 1 JuliaBox + Something</p><table> +<tr><th>Reference</th><td><a href="https://github.com/Syntopia/Fragmentarium/blob/master/">https://github.com/Syntopia/Fragmentarium/blob/master/<br> +<a href="Fragmentarium-Source/Examples/Knighty%20Collection/PseudoKleinian.frag">Fragmentarium-Source/Examples/Knighty%20Collection/PseudoKleinian.frag<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">PseudoKleinian2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 gap <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0,0,0</span> + <span style="color:#f09479; font-weight:bold">double</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dot1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledPFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsP <span style="color:#d0d0a0">// default 0.0</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsP1<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// default 1.0</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>SQRT_3_4 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 1</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>SQRT_3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> gap <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>SQRT_3_4<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// z was pos, now some points neg (ie neg shift)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + CVector3 Csize <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0777<span style="color:#d0d0d0">;</span> + CVector3 tempZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// correct c++ version.</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> tempZ <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> k <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05 <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">),</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">*=</span> k<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> k <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>tweak005<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledRFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsR + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsR<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// no bailout</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Note 2) : each additional iteration adds more detail. + Nota 2): ogni iterazione addizionale incrementa il livello di dettaglio + + + + Note 3) : this type of DE calculation will not work with other types. + Nota 3): questo tipo di calcolo DE non funzionerà su tipi differenti + + + + z.z subtr. scale: + z.z subtr. scala: + + + + <p>Pseudo Kleinian Mod1, Knighty - Theli-at's Pseudo Kleinian (Scale 1 JuliaBox + Something</p><table> +<tr><th>Reference</th><td><a href="https://github.com/Syntopia/Fragmentarium/blob/master/">https://github.com/Syntopia/Fragmentarium/blob/master/<br> +<a href="Fragmentarium-Source/Examples/Knighty%20Collection/PseudoKleinian.frag">Fragmentarium-Source/Examples/Knighty%20Collection/PseudoKleinian.frag<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">PseudoKleinian3Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 gap <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 0,0,0</span> + <span style="color:#f09479; font-weight:bold">double</span> t<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> dot1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledPFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsP <span style="color:#d0d0a0">// default 0.0</span> + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsP1<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// default 1.0</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + dot1 <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">* -</span>SQRT_3_4 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// default 1</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> dot1<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> t <span style="color:#d0d0d0">* -</span>SQRT_3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> t<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> gap <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>SQRT_3_4<span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// z was pos, now some points neg (ie neg shift)</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledRFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsR + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsR<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>benesiT1EnabledFalse <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsT1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 tempZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> tempZ<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsD + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsTM1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + <span style="color:#d0d0d0">(</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D333<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">);</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsF + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsF<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempA<span style="color:#d0d0d0">,</span> tempB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetF000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsM + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsM<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierA111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// not needed but interesting??</span> + <span style="color:#f09479; font-weight:bold">double</span> k<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// Pseudo kleinian</span> + CVector3 Csize <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0777<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsC + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// correct c++ version.</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> tempZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> tempZ <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">;</span> + k <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05 <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">),</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">*=</span> k<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> k <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>tweak005<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// variation from openCL</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> Csize<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>Csize<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>Csize<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + k <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">max</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05 <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">),</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">*=</span> k<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> k <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>tweak005<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#d0d0a0">// k = max(fractal-&gt;transformCommon.minR05/ z.Dot(z), 1.0);</span> + <span style="color:#d0d0a0">// z *= k;</span> + <span style="color:#d0d0a0">// aux.DE *= k + fractal-&gt;analyticDE.tweak005;</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// no bailout</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Quaternion fractal</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">QuaternionIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">double</span> <span style="color:#d0d0d0">&amp;</span>w<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + CVector3 <span style="color:#e47eed">newz</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> w <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> neww <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> + w <span style="color:#d0d0d0">=</span> neww<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + + In&ternal Rotation; + Rotazione In&terna + + + + Quaternion Scales + Scale Quaternioni + + + + <p>Quaternion3DE - Quaternion fractal with extended controls</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">Quaternion3DIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier122<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// mult. scale (1,2,2)</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">).</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempAux <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">+ (</span>tempAux <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>r_dz<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// rotation tweak</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// addition of constant (0,0,0)</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + zx: + + + + + Sq-Multiplier + Sq-Moltiplicatore + + + + xy: + + + + + yz + + + + + <p>From M3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/">http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">QuickDudleyModIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> x2 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier222<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> z2 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>y + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier222<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> y2 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>z + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier222<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>From M3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/">http://www.fractalforums.com/3d-fractal-generation/another-shot-at-the-holy-grail/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">QuickDudleyIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> x2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> z2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newx <span style="color:#d0d0d0">=</span> x2 <span style="color:#d0d0d0">-</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newy <span style="color:#d0d0d0">=</span> z2 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newz <span style="color:#d0d0d0">=</span> y2 <span style="color:#d0d0d0">+</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> newx<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> newy<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> newz<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Use bailout between 1.0 and 2.4 + Usare bailout tra 1.0 e 2.4 + + + + + + z.y: + + + + + Sine Function Scale + Scala Funzione Seno + + + + Periodic Cubic Tiling + not sure + Copertura pattern periodico cubico + + + + + + z.z: + + + + + Sine function + Funzione Seno + + + + Radius^2 < Minimum Radius^2 Parameters + Parametri Raggio^2 < Raggio minimo^2 + + + + Scale (not smooth inside) + strange translation + Scala (modalità rigida interna) + + + + Second Offset + Secondo Offset + + + + + + z.x: + + + + + Second Scale + Seconda Scala + + + + Fudge Factor + Fattore Fudge + + + + First Offset + Primo Offset + + + + First Scale + Prima Scala + + + + Radius^2 > Minimum Radius^2 Parameters + Parametri Raggio^2 < Raggio minimo^2 + + + + Smooth Inside + modalità non rigida interna + + + + <p>RiemannBulbMsltoe Mod2</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/another-way-to-make-my-riemann-sphere-'bulb'-using-a-conformal-transformation/">http://www.fractalforums.com/new-theories-and-research/another-way-to-make-my-riemann-sphere-'bulb'-using-a-conformal-transformation/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">RiemannBulbMsltoeMod2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> rad2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>minR05<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// radius default = 0.5</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// r2 or point radius squared</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> rad2 <span style="color:#d0d0d0">*</span> rad2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0a0">// smooth inside</span> + z <span style="color:#d0d0d0">*=</span> rad2 <span style="color:#d0d0d0">* ((</span>r2 <span style="color:#d0d0d0">*</span> <span style="color:#87df71">0.1</span><span style="color:#d0d0d0">) +</span> <span style="color:#87df71">0.4</span><span style="color:#d0d0d0">) *</span> <span style="color:#87df71">1.18</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> <span style="color:#d0d0a0">// if internal smooth function is not enabled, then z = z * scale, default vect3(1,1,1)</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// 1st scale variable, default vect3 (1.7, 1.7, 1.7),</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier222<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> shift <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// r1 = length^2, // + 1e-061</span> + <span style="color:#f09479; font-weight:bold">double</span> r1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+ (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> shift<span style="color:#d0d0d0">) * (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> shift<span style="color:#d0d0d0">) +</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// inversions by length^2</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">/</span> r1<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> shift<span style="color:#d0d0d0">) /</span> r1<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> r1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// 2nd scale variable , default = double (3.0)</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// y offset variable, default = double (1.9);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset105<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">round</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// periodic cubic tiling,</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">round</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>M_PI <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">));</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>M_PI <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Riemann Sphere Msltoe + Sfera di Riemann Msltoe + + + + Scale and Offsets: + Scala e Offset: + + + + <p>RiemannSphereMsltoe</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/the-3d-mandelbulb/riemann-fractals/msg33500/#msg33500">http://www.fractalforums.com/the-3d-mandelbulb/riemann-fractals/msg33500/#msg33500<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">RiemannSphereMsltoeIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (r &lt; 1e-21) r = 1e-21;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">/</span> r<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> w <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (w &gt; -1e-21 &amp;&amp; w &lt; 1e-21) w = (w &gt; 0) ? 1e-21 : -1e-21;</span> + w <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> w<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> s <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> t <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">;</span> + + w <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">+</span> s <span style="color:#d0d0d0">*</span> s <span style="color:#d0d0d0">+</span> t <span style="color:#d0d0d0">*</span> t<span style="color:#d0d0d0">;</span> + + s <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>M_PI <span style="color:#d0d0d0">*</span> s<span style="color:#d0d0d0">));</span> + t <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>M_PI <span style="color:#d0d0d0">*</span> t<span style="color:#d0d0d0">));</span> + + r <span style="color:#d0d0d0">*=</span> r<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (r &lt; 1e-21)</span> + <span style="color:#d0d0a0">// r = 1e-21;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>w <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">36</span><span style="color:#d0d0d0">)</span> w <span style="color:#d0d0d0">=</span> <span style="color:#87df71">36</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// problem with pow()</span> + r <span style="color:#d0d0d0">= -</span><span style="color:#87df71">0.25</span> <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>r<span style="color:#d0d0d0">,</span> w<span style="color:#d0d0d0">);</span> + + w <span style="color:#d0d0d0">=</span> r <span style="color:#d0d0d0">/ (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">+</span> s <span style="color:#d0d0d0">*</span> s <span style="color:#d0d0d0">+</span> t <span style="color:#d0d0d0">*</span> t<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> s<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#87df71">2</span> <span style="color:#d0d0d0">*</span> t<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">+</span> s <span style="color:#d0d0d0">*</span> s <span style="color:#d0d0d0">+</span> t <span style="color:#d0d0d0">*</span> t<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> w<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Riemann Sphere Msltoe Variation1 + Sfera di Riemann Msltoe Variante1 + + + + Constant Multiplier + Moltiplicatore Costanti + + + + <p>RiemannSphereMsltoe Variation1</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/revisiting-the-riemann-sphere-%28again%29/">http://www.fractalforums.com/new-theories-and-research/revisiting-the-riemann-sphere-%28again%29/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">RiemannSphereMsltoeV1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (r &lt; 1e-21) r = 1e-21;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale <span style="color:#d0d0d0">/</span> r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> w <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (w &gt; -1e-21 &amp;&amp; w &lt; 1e-21)</span> + <span style="color:#d0d0a0">// w = (w &gt; 0) ? 1e-21 : -1e-21;</span> + w <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> w<span style="color:#d0d0d0">;</span> + CVector3 t3<span style="color:#d0d0d0">;</span> + t3<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">;</span> + t3<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> w<span style="color:#d0d0d0">;</span> + + t3<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>r <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.5</span><span style="color:#d0d0d0">) * (</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">+</span> t3<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> t3<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> t3<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> t3<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + t3 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>t3<span style="color:#d0d0d0">);</span> + + t3<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> t3<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">floor</span><span style="color:#d0d0d0">(</span>t3<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">);</span> + t3<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> t3<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">floor</span><span style="color:#d0d0d0">(</span>t3<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> <span style="color:#87df71">0.5</span><span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> t3 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier441<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + addCpixel ConstantMultiplier + + + + + + + Cpixel Multiplier + Moltiplicatore Cpixel + + + + <p>Adds Cpixel constant to z vector</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAddCpixelIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + addCpixel c.x c.y axis swap ConstantMultiplier + addCpixel c.x c.y Scambio Assi ConstantMultiplier + + + + c.x c.y swap enabled + Scambio c.x c.y abilitato + + + + alternate c.x c.y swap + alterna scambio c.x c.y + + + + <p>Adds Cpixel constant to z vector, swapping the Cpixel vector x and y axes<br>disable swap for normal mode</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAddCpixelCxCyAxisSwapIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Adds Cpixel constant to z vector. Possible to swap Cpixel vector axes.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAddCpixelAxisSwapIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Adds Cpixel constant to z vector, with symmetry</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAddCpixelPosNegIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempFAB <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> tempFAB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + tempFAB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> tempFAB<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + addCpixel multiplier + Moltiplicatore addCpixel + + + + + Variable + Variabile + + + + <p>Adds Cpixel constant to z, Cpixel scaled based on variable iteration parameters.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAddCpixelVaryV1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempVC <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant to be varied</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">&amp;&amp; (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">!=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">=</span> + <span style="color:#d0d0d0">(</span>tempVC + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000 <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> c <span style="color:#d0d0d0">*</span> tempVC<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Addition Constant 1 - Julia Constant + Aggiunta Costante 1 - Costante di Julia + + + + Julia constant + Costante di Julia + + + + Get Point Coodinates with mouse pointer, then use right mouse click copy /paste vector to enter Julia constant. + Cattura Coodinate tramite puntatore del mouse, poi usa la funzione copia/incolla del tasto destro del mouse per incollare i valori relativi alla costante di Julia + + + + Addition Constant 2 - Offset + Aggiunta Costante 2 - Costante di Julia + + + + Offset. Use in normal mode or use to explore in Julia mode + Offset Da usare in modo normale o per esplorare modalità Julia + + + + <p>Adds c constant to z vector</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAdditionConstantIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Adds c constant to z vector. C addition constant varies based on iteration parameters.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformAdditionConstantVaryV1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempVC <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant to be varied</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">&amp;&amp; (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">!=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">=</span> + <span style="color:#d0d0d0">(</span>tempVC + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000 <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempVC<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>benesiT1 3D</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/">http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiT1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset200<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Mag Transform &T1Mod Internal Rotation; + Trasformazione Mag &T1Mod Rotazione Interna + + + + <p>benesiT1Mod 3D based on benesiT1</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/">http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiT1ModIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D333<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Mag Transform &T2 Internal Rotation; + Trasformazione Mag &T2 Rotazione Interna + + + + <p>benesi T2</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/">http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiT2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// switching, squared, sqrt</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">);</span> + + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D444<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Mag Transform &T3 Internal Rotation; + Trasformazione Mag &T3 Rotazione Interna + + + + <p>benesi T3</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/">http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiT3Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// switching</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Mag Transform &T4 Internal Rotation; + Trasformazione Mag &T4 Rotazione Interna + + + + <p>benesi T4</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/">http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiT4Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + CVector3 tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// switching, squared,</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D222<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + Power A + Potenza A + + + + + Power B + Potenza B + + + + Mag Transform &T5b Internal Rotation; + Trasformazione Mag &T5b Rotazione Interna + + + + <p>benesi T5</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/">http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiT5bIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> + + <span style="color:#d0d0a0">// if (z.x &gt; -1e-21 &amp;&amp; z.x &lt; 1e-21)</span> + <span style="color:#d0d0a0">// z.x = (z.x &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#d0d0a0">// if (z.y &gt; -1e-21 &amp;&amp; z.y &lt; 1e-21)</span> + <span style="color:#d0d0a0">// z.y = (z.y &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#d0d0a0">// if (z.z &gt; -1e-21 &amp;&amp; z.z &lt; 1e-21)</span> + <span style="color:#d0d0a0">// z.z = (z.z &gt; 0) ? 1e-21 : -1e-21;</span> + CVector3 tempV2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + tempV2<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8X<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8X<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>power025<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">));</span> + tempV2<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Y<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Y<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>power025<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">));</span> + tempV2<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Z<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>int8Z<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>power025<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">));</span> + z <span style="color:#d0d0d0">= (</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempV2 <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetC111<span style="color:#d0d0d0">)) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3Dd222<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationEnabled<span style="color:#d0d0d0">)</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <html><head/><body><p><span style=" color:#000000;">Cube to Sphere transform</span></p><p><span style=" font-family:'Courier New,courier'; color:#000000;">Description:Warpsacubetoasphere;transformmadebyM.Benesi,optimizedbyLuca</span></p><p><span style=" font-family:'Courier New,courier'; color:#000000;">http://www.fractalforums.com/mathematics/circle2square/</span></p></body></html> + English version all wrong (no space) + <html><head/><body><p><span style=" color:#000000;">Trasformazione Cubo in Sfera</span></p><p><span style=" font-family:'Courier New,courier'; color:#000000;">Descrizione: Cambia la forma di un oggetto cubico in quella di un oggetto sferico, formula di M.Benesi, ottimizzata da Dark Beam</span></p><p><span style=" font-family:'Courier New,courier'; color:#000000;">http://www.fractalforums.com/mathematics/circle2square/</span></p></body></html> + + + + <p>Benesi Cube to sphere transform<br>Warps a cube to a sphere; transform made by M.Benesi, optimized by Luca.</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/mathematics/circle2square/">http://www.fractalforums.com/mathematics/circle2square/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiCubeSphereIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// so all now positive</span> + + <span style="color:#d0d0a0">// if (z.x == 0.0)</span> + <span style="color:#d0d0a0">// z.x = 1e-21;</span> + <span style="color:#d0d0a0">// if (z.z == 0.0)</span> + <span style="color:#d0d0a0">// z.z = 1e-21;</span> + + <span style="color:#f09479; font-weight:bold">double</span> rCyz <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> rCxyz <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) /</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rCxyz <span style="color:#d0d0d0">== -</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">//+ 1e-21 new comment out</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rCyz <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + rCyz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>rCyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + rCyz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> rCyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rCxyz <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + rCxyz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>rCxyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + rCxyz <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> rCxyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*=</span> rCyz<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*=</span> rCyz<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">*=</span> rCxyz <span style="color:#d0d0d0">/</span> SQRT_3_2<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + + <html><head/><body><p><span style=" font-family:'Courier New,courier'; color:#000000;">//http://www.fractalforums.com/new-theories-and-research/do-m3d-formula-have-to-be-distance-estimation-formulas/</span></p></body></html> + + + + + <p>benesi mag backward</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiMagBackwardIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">, (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> tempXZ <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>benesi mag forward</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiMagForwardIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempXZ <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_2_3 <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_1_3<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> + <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">((</span>tempXZ <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">, (</span>tempXZ <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) *</span> SQRT_1_2<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> SQRT_1_3 <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> SQRT_2_3<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <html><head/><body><p><span style=" color:#008000;">Sphere</span><span style=" color:#c0c0c0;"/><span style=" color:#008000;">to</span><span style=" color:#c0c0c0;"/><span style=" color:#008000;">Cube</span><span style=" color:#c0c0c0;"/><span style=" color:#008000;">transform</span></p><p><span style=" font-family:'Courier New,courier'; color:#008000;">Warps</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">a</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">sphere</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">to</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">a</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">cube;</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">transform</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">made</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">by</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">M.Benesi,</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">optimized</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">by Luca.</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">Scavenged</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">and</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">edited</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">from</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">code</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">optimized</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">by</span><span style=" font-family:'Courier New,courier'; color:#c0c0c0;"/><span style=" font-family:'Courier New,courier'; color:#008000;">Luca.</span></p><p><br/></p><p><span style=" font-family:'Courier New,courier'; color:#008000;">http://www.fractalforums.com/mathematics/circle2square/</span></p></body></html> + + + + + <p>Benesi Sphere to Cube transform<br>Warps a sphere to a cube; transform made by M.Benesi, optimized by<br>Luca. Scavenged and edited from code optimized by Luca.</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/mathematics/circle2square/">http://www.fractalforums.com/mathematics/circle2square/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBenesiSphereCubeIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (z.z == 0.0) z.z = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> rCyz <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rCyz <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + rCyz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>rCyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + rCyz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> rCyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*=</span> rCyz<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*=</span> rCyz<span style="color:#d0d0d0">;</span> + + <span style="color:#d0d0a0">// if (z.x == 0.0) z.x = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> rCxyz <span style="color:#d0d0d0">= (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">) /</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>rCxyz <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + rCxyz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span>rCxyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + rCxyz <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> <span style="color:#e47eed">sqrt</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> rCxyz <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">*=</span> rCxyz <span style="color:#d0d0d0">*</span> SQRT_3_2<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + z.z scale : + Scala z.z: + + + + <p>Box Fold</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBoxFoldIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#f09479; font-weight:bold">double</span> zLimit <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> zValue <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>zLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>zValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>box fold 4D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBoxFold4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Folding Limit + Limite Folding + + + + Folding Value + Valore Folding + + + + <p>Box Fold XYZ, set different folding parameters for each axis</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBoxFoldXYZIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant222<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Box Offset + Offset Box + + + + <p>Box Offset, set different offset for each axis, added symmetrically about the origin</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformBoxOffsetIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> temp<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> avgScale <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + fABS Add Constant z = fabs( z + constant) + fABS Aggiunge Costante z = fabs( z + constant) + + + + + + + fABS addition constant + fABS aggiunta costante + + + + <p>fabs add constant, z = fabs( z + constant)</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformFabsAddConstantIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + fABS Add Constant V2 z = fabs( z + constant) - fabs( z - constant) - z; + fABS Aggiunge Costante V2 z = fabs(z + constant) - fabs(z - constant) - z; + + + + <p>fabs. Add fabs constantV2, z = fabs( z + constant) - fabs( z - constant) - z:</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformFabsAddConstantV2Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + fABS Add Constant V2 4D z = fabs( z + constant) - fabs( z - constant) - z; + fABS Aggiunge Costante V2 4D z = fabs(z + constant) - fabs(z - constant) - z; + + + + <p>fabs. Add fabs constantV2, z = fabs( z + constant) - fabs( z - constant) - z:</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformFabsAddConstantV24DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z4D <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0000<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0000<span style="color:#d0d0d0">) -</span> z4D<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + fABS Add Constant 4D z = fabs( z + constant) + fABS Aggiunge Costante 4D z = fabs(z + constant) + + + + <p>fabs add constant, z = fabs( z + constant)</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformFabsAddConstant4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z4D <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant0000<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> z4D<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> z4D<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> z4D<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled<span style="color:#d0d0d0">)</span> z4D<span style="color:#d0d0d0">.</span>w <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">.</span>w<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + fABS Add Constant Multi z = fabs( z + const.A ) - fabs( z - const.B ) - ( z * const.C ) + fABS Aggiunge Multi Costante z = fabs(z + const.A) - fabs(z - const.B) - (z * const.C) + + + + <p>fabs Multi - Multiple parameters for fabs functions</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformFabsAddMultiIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempA<span style="color:#d0d0d0">,</span> tempB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAy<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAz<span style="color:#d0d0d0">)</span> + tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> + tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> tempA<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> tempB<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">- (</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offsetA000<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + 1st half tetrahedral symmetry planes: + Piani simmetria tetraedro prima metà: + + + + 2nd half tetrahedral symmetry planes: + Piani simmetria tetraedro seconda metà: + + + + <p>folding tetra3D from M3D (Luca GN 2011):<br>Code taken from the forums, KIFS original thread<br>side note - if you disable the 1st half, 2nd half will be<br>done even if you disable it... (to avoid a NOP transform)</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformFoldingTetra3DIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> x1<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> y1<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + x1 <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> x1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + x1 <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> x1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + y1 <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> y1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + x1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> x1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + x1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> x1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + y1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> y1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Enable newZy = z.x * sin(z.y) + Abilita newZy = z.x * sin(z.y) + + + + Enable newZx = z.x * cos(z.y) + Abilita newZx = z.x * cos(z.y) + + + + Analytic DE Muliplier: + Moltiplicatore DE analitica: + + + + Analytic DE Offset: + Offset DE Analitica: + + + + <p>Inverse cylindrical coords, very easy transform<br>Formula by Luca GN 2011</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformInvCylindricalIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> newZx <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> newZy <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> newZx <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> newZy <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>newZy <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">),</span> + newZx <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale1<span style="color:#d0d0d0">),</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleC1<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1 + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleB1<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Iteration Weight.; z = ( z * const.Z) + ( zA * const.A) + ( zB * const.B) + Peso Iterazione z = (z * const.Z) + (zA * const.A) + (zB * const.B) + + + + <p>iteration weight. Influence fractal based on the weight of<br>Z values after different iterations</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformIterationWeightIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 zA<span style="color:#d0d0d0">,</span> zB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">==</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>intA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zA <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">==</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>intB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zB <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">= (</span>z <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) + (</span>zA <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+ (</span>zB <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Iteration Weight 4D z = ( z * const.Z) + ( zA * const.A) + ( zB * const.B) + Peso iterazione 4D z = (z * const.Z) + (zA * const.A) + (zB * const.B) + + + + <p>iteration weight 4D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformIterationWeight4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector4 zA<span style="color:#d0d0d0">,</span> zB<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">==</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>intA<span style="color:#d0d0d0">)</span> zA <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">==</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>intB<span style="color:#d0d0d0">)</span> zB <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">;</span> + + z4D <span style="color:#d0d0d0">= (</span>z4D <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) + (</span>zA <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+ (</span>zB <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + CX Cpixel Multiplier + Moltiplicatore CX Cpixel + + + + CY Cpixel Multiplier + Moltiplicatore CY Cpixel + + + + CZ Cpixel Multiplier + CY Cpixel CZ Cpixel + + + + Suggestion: +=You can use it for example as a pre-transform for bulbs or boxes. + Suggerimento: +Puoi usarlo ad esempio come pre-transformazione per mandelbulb o mandelbox. + + + + <p>Linear Combine transform from Mandelbulb3D.<br>Can create multiple combination for the addition of Cpixel</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformLinCombineCxyz</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 temp <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + CVector3 mulX <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier100<span style="color:#d0d0d0">;</span> + CVector3 mulY <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier010<span style="color:#d0d0d0">;</span> + CVector3 mulZ <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier001<span style="color:#d0d0d0">;</span> + c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> mulX<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> mulX<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> mulX<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> mulY<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> mulY<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> mulY<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + c<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> mulZ<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> mulZ<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> mulZ<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> temp<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + &Menger Sponge Start Function Fabs function z = fabs( z + const.A); + Inizia Funzione Spugna di &Menger Fabs funzione z = fabs(z + const.A) + + + + &Menger Sponge End Function Apply Constants; + Fine Funzione Spugna di &Menger Applica Costanti + + + + <p>Transform Menger Fold<br>Menger Sponge formula created by Knighty</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/ifs-iterated-function-systems/kaleidoscopic-(escape-time-ifs)/">http://www.fractalforums.com/ifs-iterated-function-systems/kaleidoscopic-(escape-time-ifs)/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformMengerFoldIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// fabs() and menger fold</span> + <span style="color:#f09479; font-weight:bold">double</span> tempMS<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstantA000<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempMS <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> tempMS<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// menger scales and offsets</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabled<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// z.z &lt; 1.0 z.z = z.z</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-=</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Angle multiplication: + Moltiplicazione angolo: + + + + <p>multiple angle</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformMultipleAngle</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> th0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">asin</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> ph0 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> th <span style="color:#d0d0d0">=</span> th0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>multiplication<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph <span style="color:#d0d0d0">=</span> ph0 <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>multiplication<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> cth <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>cth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> cth <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph<span style="color:#d0d0d0">),</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th<span style="color:#d0d0d0">)) *</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Neg fABS Add Constant z = - fabs( z + constant) + Neg fABS Aggiunfi Costante z = - fabs(z + constant) + + + + Addition constant + Aggiunta Costante + + + + <p>fabs. Negative fabs constant, z = - fabs( z + constant)</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformNegFabsAddConstantIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledx<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledy<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledz<span style="color:#d0d0d0">)</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + fn(z) = Pi Rotation about Vector A + fn(z) = Rotazione Pi attorno al vettore A + + + + fn(z) = Box Offset + + + + + <p>z = (Az^2 + Bz + C ) / D; ((VectA +ScaleA * z) * fn(z) + scaleB * z + VectC ) * ScaleD</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformPwr2PolynomialIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 partA <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// fabs</span> + partA <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// pwr3 or z * fabs(z^2)</span> + partA <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">;</span> + partA <span style="color:#d0d0d0">=</span> partA <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale2 <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + + CVector3 fnZ1 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledBxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// cos(z*Pi)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> scalePi <span style="color:#d0d0d0">=</span> M_PI <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleC1<span style="color:#d0d0d0">;</span> + fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> scalePi<span style="color:#d0d0d0">);</span> + fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> scalePi<span style="color:#d0d0d0">);</span> + fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> scalePi<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledyFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// pi rotation</span> + fnZ1 <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">,</span> + M_PI <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale0<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// * cPI ;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledzFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// box offset</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">)</span> + fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fnZ1<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAxFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// fabs fnZ1</span> + fnZ1 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fnZ1<span style="color:#d0d0d0">);</span> + + CVector3 partB <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> partB <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + partB <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale4<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierB111 <span style="color:#d0d0d0">+</span> partB <span style="color:#d0d0d0">-</span> partA <span style="color:#d0d0d0">*</span> fnZ1<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale025<span style="color:#d0d0d0">;</span> + + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#87df71">4.0</span> <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>scaleLin <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offsetLin<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Enable Sca&le and Offset controls; ( iterates only the quaternion fold when disabled.) + Abilita controlli Sca&la e Offset (itera soltanto il Folding del quaternione quando disabilitato) + + + + Scale: + Scala: + + + + Offset: + + + + + DE Vector Influence: + DE Influenza Vettore: + + + + <p>Quaternion Fold Transform</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformQuaternionFoldIteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// quat fold</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">//</span> + <span style="color:#d0d0d0">{</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> <span style="color:#87df71">2.0</span> <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempL <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier122<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// mult. scale (1,2,2)</span> + <span style="color:#d0d0a0">// if (tempL &lt; 1e-21) tempL = 1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> avgScale <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">/</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> <span style="color:#87df71">2.0</span><span style="color:#d0d0d0">).</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> tempL<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> tempAux <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> avgScale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">+ (</span>tempAux <span style="color:#d0d0d0">-</span> aux<span style="color:#d0d0d0">.</span>r_dz<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scaleA1<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant000<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// addition of constant (0,0,0)</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>addCpixelEnabledFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + CVector3 tempC <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>alternateEnabledFalse<span style="color:#d0d0d0">)</span> <span style="color:#d0d0a0">// alternate</span> + <span style="color:#d0d0d0">{</span> + tempC <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>c<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>tempC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> tempC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + aux<span style="color:#d0d0d0">.</span>c <span style="color:#d0d0d0">=</span> tempC<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyzC<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> tempC <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> c<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">+=</span> tempC <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplierC111<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Analytical Linear DE adjustment offset + Ritocco offset DE Lineare Analitica + + + + <p>Rpow3 from M3D.<br>Does a power of 3 on the current length of the vector.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformRpow3Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> sqrRout <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">) *</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + + z <span style="color:#d0d0d0">*=</span> sqrRout<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>sqrRout<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>analyticDE<span style="color:#d0d0d0">.</span>offset1<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>rotation</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformRotationIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotationMatrix<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Rotation of separate folding planes + Rotazione Piani di Folding separati + + + + <p>rotation folding plane</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformRotationFoldingPlane</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 zRot<span style="color:#d0d0d0">;</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">};</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">0</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else</span> + <span style="color:#d0d0d0">{</span> + zRot <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rot<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingLimit<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + zRot<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> zRot<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>rotinv<span style="color:#d0d0d0">[</span><span style="color:#87df71">1</span><span style="color:#d0d0d0">][</span><span style="color:#87df71">2</span><span style="color:#d0d0d0">].</span><span style="color:#e47eed">RotateVector</span><span style="color:#d0d0d0">(</span>zRot<span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + gamma : + + + + + alpha: + alfa: + + + + Variable + Variabile + + + + beta : + + + + + <p>rotation variation v1. Rotation angles vary based on iteration parameters.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformRotationVaryV1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + CVector3 tempVC <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>rotation<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant to be varied</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">&amp;&amp; (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">!=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">=</span> + <span style="color:#d0d0d0">(</span>tempVC + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000 <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset000<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + tempVC <span style="color:#d0d0d0">*= (</span>M_PI <span style="color:#d0d0d0">/</span> <span style="color:#87df71">180.0</span><span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">),</span> tempVC<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">),</span> tempVC<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">RotateAroundVectorByAngle</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span><span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">0.0</span><span style="color:#d0d0d0">,</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">),</span> tempVC<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>z(n+1) = z(n) * abs(z(n)) ^ p-1</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformPowerR</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> rp<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> rp<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>scale - simple scale</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformScaleIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> <span style="color:#d0d0a0">// + 1.0;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>scale 3d. Scale each axis individually</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformScale3DIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale3D111<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">() /</span> aux<span style="color:#d0d0d0">.</span>r <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>scale 4D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformScale4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + z4D <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Scale_Vary_V1 + + + + + Scale Variable: + Variabile Scala: + + + + <p>scale variation v1. Scale varies based on iteration parameters.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformScaleVaryV1Iteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tempVC <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant to be varied</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">&amp;&amp; (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250 + <span style="color:#d0d0d0">!=</span> <span style="color:#87df71">0</span><span style="color:#d0d0d0">))</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0 <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterations250<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterations<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVC <span style="color:#d0d0d0">= (</span>tempVC <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">*=</span> tempVC<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempVC<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// prepared for future analytic DE for hybrids</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>tempVC<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + SphereInv from M3D + SphereInv presa da M3D + + + + + Pre_scale + Pre_Scala + + + + Pre_dot(z,z) + Pre_Prodotto(z,z) + + + + No mode = unconditional spherical inversion z = z / r2; + no modale = inversione sferica senza condizione z = z / r2; + + + + let r2 = 2 * Radius2 - r2 (non conformal "reversal" inversion) + r2 = 2 * Radius2 - r2 (inversione non conforme "rovesciata") + + + + Mode Radius2: + Modo Radius2: + + + + Mode Radius1: + Modo Radius1: + + + + Mode 1 + Modo 1 + + + + let r2 = Radius2 (conformal - undo the inversion inside a sphere) + r2 = Radius2 (conforme - annulla l'inversione all'interno di una sfera) + + + + Mode 2 + Modo 2 + + + + Adjust Offset : + Aggiusta Offset: + + + + + <p>inverted sphere z & c- A transform from M3D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphereInvCIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> CVector3 c<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + c <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>constantMultiplier111<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> rSqrL <span style="color:#d0d0d0">=</span> c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> c<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> c<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> c<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> c<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (rSqrL &lt; 1e-21) rSqrL = 1e-21;</span> + rSqrL <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">/</span> rSqrL<span style="color:#d0d0d0">;</span> + c <span style="color:#d0d0d0">*=</span> rSqrL<span style="color:#d0d0d0">;</span> + + rSqrL <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">*</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0a0">// if (rSqrL &lt; 1e-21) rSqrL = 1e-21;</span> + rSqrL <span style="color:#d0d0d0">=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">/</span> rSqrL<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> rSqrL<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Suggestion: +Use as pre-transform for one iteration, +will invert the complete coord system. +Cut off at Z=0 to see the inside. + + Suggerimento: +Da usare una volta (un'iterazione) come pre.trasformazione +Invertirà completamente il sistema di coordinate +Sezionare trasversalmente a z=0 ,per poter vedere l'interno + + + + Spherical Fold - MBox + + + + + <p>spherical fold MBox</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphericalFoldIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// beta</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// beta</span> + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21) r2 = 1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Spherical Fold_4D + + + + + <p>spherical fold 4D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphericalFold4DIteration</span><span style="color:#d0d0d0">(</span>CVector4 <span style="color:#d0d0d0">&amp;</span>z4D<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z4D<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z4D<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21 &amp;&amp; r2 &gt; -1e-21) r2 = (r2 &gt; 0) ? 1e-21 : -1e-21;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z4D <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z4D <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Spherical Fold - ABox/ASurf + Folding Sferico- ABox/ASurf + + + + <p>spherical fold ABox<br>from Fractal Forums and M3D</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphericalFoldAboxIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> sqrtMinR <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>sqtR<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> sqrtMinR<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1.0</span> <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Spherical Fold, Variable Radius Controls - MBox type + Folding Sferico Controllo Raggio Variabile - tipo MBox + + + + Fixed radius variable: + Fixed and variable together? + Variabile raggio fisso: + + + + Minimum radius variable: + Variabile raggio minimo: + + + + <p>spherical fold varyV1 MBox type</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphericalFoldVaryV1Iteration</span><span style="color:#d0d0d0">(</span> + CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">int</span> i<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Dot</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">);</span> + <span style="color:#f09479; font-weight:bold">double</span> tempVCf <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingSphericalFixed<span style="color:#d0d0d0">;</span> <span style="color:#d0d0a0">// constant to be varied</span> + <span style="color:#f09479; font-weight:bold">double</span> tempVCm <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingSphericalMin<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVCf <span style="color:#d0d0d0">= (</span>tempVCf + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsA<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsA<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVCf <span style="color:#d0d0d0">= (</span>tempVCf <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB + <span style="color:#d0d0d0">&amp;&amp;</span> i <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVCm <span style="color:#d0d0d0">= (</span>tempVCm + <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0 <span style="color:#d0d0d0">* (</span>i <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">/ (</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>startIterationsB<span style="color:#d0d0d0">));</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>i <span style="color:#d0d0d0">&gt;=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>stopIterationsB<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + tempVCm <span style="color:#d0d0d0">=</span> tempVCm <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset0<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> + + tempVCm <span style="color:#d0d0d0">*=</span> tempVCm<span style="color:#d0d0d0">;</span> + tempVCf <span style="color:#d0d0d0">*=</span> tempVCf<span style="color:#d0d0d0">;</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> tempVCm<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> tempVCf <span style="color:#d0d0d0">/</span> tempVCm<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tempVCf <span style="color:#d0d0d0">/</span> tempVCm<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> tempVCf<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> tempVCf <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + z <span style="color:#d0d0d0">-=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>offset<span style="color:#d0d0d0">;</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>spherical radial offset.</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphericalOffsetIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> lengthTempZ <span style="color:#d0d0d0">= -</span>z<span style="color:#d0d0d0">.</span><span style="color:#e47eed">Length</span><span style="color:#d0d0d0">();</span> + <span style="color:#d0d0a0">// if (lengthTempZ &gt; -1e-21) lengthTempZ = -1e-21; // z is neg.)</span> + z <span style="color:#d0d0d0">*=</span> <span style="color:#87df71">1</span> <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset <span style="color:#d0d0d0">/</span> lengthTempZ<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">=</span> aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">) +</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>scale<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + Spherical Power Fold + Folding Potenza Sferico + + + + <p>spherical pwr fold</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSphericalPwrFoldIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#d0d0a0">// if (z.x &gt; -1e-21 &amp;&amp; z.x &lt; 1e-21) z.x = (z.x &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#d0d0a0">// if (z.y &gt; -1e-21 &amp;&amp; z.y &lt; 1e-21) z.y = (z.y &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#d0d0a0">// if (z.z &gt; -1e-21 &amp;&amp; z.z &lt; 1e-21) z.z = (z.z &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#f09479; font-weight:bold">double</span> r2 <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4<span style="color:#d0d0d0">) +</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">+</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr4<span style="color:#d0d0d0">),</span> + fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>pwr05<span style="color:#d0d0d0">);</span> + + <span style="color:#d0d0a0">// if (r2 &lt; 1e-21 &amp;&amp; r2 &gt; -1e-21)</span> + <span style="color:#d0d0a0">// r2 = (r2 &gt; 0) ? 1e-21 : -1e-21;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>mboxFactor1<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp1<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>r2 <span style="color:#d0d0d0">&lt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> tglad_factor2 <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>fR2 <span style="color:#d0d0d0">/</span> r2<span style="color:#d0d0d0">;</span> + z <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>DE <span style="color:#d0d0d0">*=</span> tglad_factor2<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factorSp2<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <html><head/><body><p><span style=" color:#000000;">Based on amazing_surf_mod1 from Mandelbulb3D</span></p></body></html> + <html><head/><body><p><span style=" color:#000000;">Baseata sulla formula amazing_surf_mod1 da Mandelbulb3D</span></p></body></html> + + + + FoldBox + + + + + <p>TransformSurfFoldMultiIteration</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformSurfFoldMultiIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAx<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAyFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// z = fold - fabs( fabs(z) - fold)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">) -</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledAzFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledxFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// if z &gt; limit) z = Value -z, else if z &lt; limit) z = - Value - z,</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&gt;</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">&lt; -</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">= -</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>foldingValue <span style="color:#d0d0d0">-</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + aux<span style="color:#d0d0d0">.</span>color <span style="color:#d0d0d0">+=</span> fractal<span style="color:#d0d0d0">-&gt;</span>mandelbox<span style="color:#d0d0d0">.</span>color<span style="color:#d0d0d0">.</span>factor<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#d0d0d0">}</span> + + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>functionEnabledyFalse<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> <span style="color:#d0d0a0">// z = fold2 - fabs( fabs(z + fold) - fold2) - fabs(fold)</span> + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">;</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2 + <span style="color:#d0d0d0">-</span> <span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span><span style="color:#e47eed">fabs</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">+</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>offset2<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">-</span> fractal<span style="color:#d0d0d0">-&gt;</span>transformCommon<span style="color:#d0d0d0">.</span>additionConstant111<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + function order of z.x, z.y and z.z: + ordine funzione z.x, z.y e z.z: + + + + <p>z vector - axis swap</p><table> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">TransformZvectorAxisSwapIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">switch</span> <span style="color:#d0d0d0">(</span>fractal<span style="color:#d0d0d0">-&gt;</span>mandelbulbMulti<span style="color:#d0d0d0">.</span>orderOfxyz<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xyz<span style="color:#d0d0d0">:</span> + <span style="color:#7ec0ee; font-weight:bold">default</span><span style="color:#d0d0d0">:</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>xzy<span style="color:#d0d0d0">:</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yxz<span style="color:#d0d0d0">:</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>yzx<span style="color:#d0d0d0">:</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zxy<span style="color:#d0d0d0">:</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">case</span> sFractalMandelbulbMulti<span style="color:#d0d0d0">::</span>zyx<span style="color:#d0d0d0">:</span> z <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">CVector3</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">);</span> <span style="color:#7ec0ee; font-weight:bold">break</span><span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + + + <p>Xenodreambuie</p><table> +<tr><th>Reference</th><td><a href="http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/273/">http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/273/<br> +</td></tr> +</table> +<h3>Code</h3> +<body style="background-color:#202020"> +<pre style="color:#d0d0d0; background-color:#202020; font-family:'Courier New',monospace;"><span style="color:#f09479; font-weight:bold">void</span> <span style="color:#e47eed">XenodreambuieIteration</span><span style="color:#d0d0d0">(</span>CVector3 <span style="color:#d0d0d0">&amp;</span>z<span style="color:#d0d0d0">,</span> <span style="color:#f09479; font-weight:bold">const</span> cFractal <span style="color:#d0d0d0">*</span>fractal<span style="color:#d0d0d0">,</span> sExtendedAux <span style="color:#d0d0d0">&amp;</span>aux<span style="color:#d0d0d0">)</span> +<span style="color:#d0d0d0">{</span> + <span style="color:#f09479; font-weight:bold">double</span> rp <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">pow</span><span style="color:#d0d0d0">(</span>aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">,</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">-</span> <span style="color:#87df71">1</span><span style="color:#d0d0d0">);</span> + aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> aux<span style="color:#d0d0d0">.</span>r_dz <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power <span style="color:#d0d0d0">+</span> <span style="color:#87df71">1.0</span><span style="color:#d0d0d0">;</span> + rp <span style="color:#d0d0d0">*=</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">;</span> + + <span style="color:#f09479; font-weight:bold">double</span> th <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">atan2</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>y<span style="color:#d0d0d0">,</span> z<span style="color:#d0d0d0">.</span>x<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>betaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#f09479; font-weight:bold">double</span> ph <span style="color:#d0d0d0">=</span> <span style="color:#e47eed">acos</span><span style="color:#d0d0d0">(</span>z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">/</span> aux<span style="color:#d0d0d0">.</span>r<span style="color:#d0d0d0">) +</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>alphaAngleOffset<span style="color:#d0d0d0">;</span> + <span style="color:#7ec0ee; font-weight:bold">if</span> <span style="color:#d0d0d0">(</span>ph <span style="color:#d0d0d0">&gt;</span> <span style="color:#87df71">0.5</span> <span style="color:#d0d0d0">*</span> M_PI<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + ph <span style="color:#d0d0d0">=</span> M_PI <span style="color:#d0d0d0">-</span> ph<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + <span style="color:#7ec0ee; font-weight:bold">else if</span> <span style="color:#d0d0d0">(</span>ph <span style="color:#d0d0d0">&lt; -</span><span style="color:#87df71">0.5</span> <span style="color:#d0d0d0">*</span> M_PI<span style="color:#d0d0d0">)</span> + <span style="color:#d0d0d0">{</span> + ph <span style="color:#d0d0d0">= -</span>M_PI <span style="color:#d0d0d0">-</span> ph<span style="color:#d0d0d0">;</span> + <span style="color:#d0d0d0">}</span> + + z<span style="color:#d0d0d0">.</span>x <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>th <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>y <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>th <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">) *</span> <span style="color:#e47eed">sin</span><span style="color:#d0d0d0">(</span>ph <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">);</span> + z<span style="color:#d0d0d0">.</span>z <span style="color:#d0d0d0">=</span> rp <span style="color:#d0d0d0">*</span> <span style="color:#e47eed">cos</span><span style="color:#d0d0d0">(</span>ph <span style="color:#d0d0d0">*</span> fractal<span style="color:#d0d0d0">-&gt;</span>bulb<span style="color:#d0d0d0">.</span>power<span style="color:#d0d0d0">);</span> +<span style="color:#d0d0d0">}</span> +</pre> +</body> + + + +