I would like to translate Mathematica code but I don’t know how to write recursions.

```
<b>TriplexPow[{x_, y_, z_}, n_] := Module[{r = Sqrt[x^2 + y^2 + z^2], theta = nArcTan[x, y], phi}, phi = nArcSin[z/r]; r^n{Cos[theta]Cos[phi], Sin[theta]Cos[phi], Sin[phi]}];
TriplexMult[{x1_, y1_, z1_}, {x2_, y2_, z2_}] := Module[{r1 = Sqrt[x1^2 + y1^2], r2 = Sqrt[x2^2 + y2^2], a}, a = 1 -z1 z2/(r1 r2); {a(x1 x2 - y1 y2), a(x2 y1 + x1 y2), r2 z1 + r1 z2}];
c = {1.0625, 0.2375, 0.0}; n = 100; norm[x_] := x.x;
Lambdabulb[c_] := Module[{p = c, i = 0}, While[i < 40 && norm[p] < 4, p = TriplexMult[c,p-TriplexPow[p, 4]]; i++]; i];
image = Table[z = 1.2; While[z >= 0 && Lambdabulb[{x, y, z}] < 40, z -= 2.4/n]; z, {y, -1.2, 1.2, 2.4/n}, {x, -1.2, 1.2, 2.4/n}];
ListDensityPlot[image, Mesh -> False, Frame -> False, PlotRange -> {0, 1.2}]</b>
```

**TriplexPow **and** TriplexMult** defines new function. **Lambdabulb** is a new function defined with previous two.Norm should be x_1*x_1+x_2*x_2+x_3*x_3**.**

Module function is defined here https://reference.wolfram.com/language/ref/Module.html

Table is acctually a *for* function https://reference.wolfram.com/language/ref/Table.html?q=Table

Python script should call single vertex function to draw the surface

I’ve found formula on http://bugman123.com/Hypercomplex/ . Just scroll a way down to Lambdabulb.