![](https://cdn.myportfolio.com/70df8a4d1545cb316dee07e8fa35a965/152f01dc-8921-41e7-a3a0-ef5994386308_rw_1920.jpg?h=c51d03a8da784d6756caa42614066177)
![](https://cdn.myportfolio.com/70df8a4d1545cb316dee07e8fa35a965/f5411661-bc20-4ca0-8c30-91d5c88c21ff_rw_1920.jpg?h=f9339a2eb8607ef94fb006ecc9c8169c)
![](https://cdn.myportfolio.com/70df8a4d1545cb316dee07e8fa35a965/4f65c528-929c-4bd2-9c54-f98d4e865eff_rw_1920.jpg?h=79a3ce35be96e829974fd27e2f084aff)
![](https://cdn.myportfolio.com/70df8a4d1545cb316dee07e8fa35a965/f2ee1e47-2c8d-4e25-b742-35e1a56bdec4_rw_1920.jpg?h=009db8e7afb55d6dfa0ea99faa333ff1)
![](https://cdn.myportfolio.com/70df8a4d1545cb316dee07e8fa35a965/44007da5-7c3e-4fe2-9563-95510daad7e3_rw_1920.jpg?h=30f033893d4810701963b1945f368443)
Blue colour:
{
vector pos = P;
vector pos = P;
vector z = P;
float dr = 1.0;
float r = 0.0;
for (int i = 0; i < Iterations ; i++) {
r = length(z);
if (r>Bailout) break;
float dr = 1.0;
float r = 0.0;
for (int i = 0; i < Iterations ; i++) {
r = length(z);
if (r>Bailout) break;
float theta = acos(z[2]/r);
float phi = atan2(z[1],z[0]);
dr = pow( r, Power-1.0)*Power*dr + 1.0;
float phi = atan2(z[1],z[0]);
dr = pow( r, Power-1.0)*Power*dr + 1.0;
float zr = pow( r,Power);
theta = theta*Power;
phi = phi*Power;
theta = theta*Power;
phi = phi*Power;
z = zr*vector(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
z+=pos;
}
c.dist = 0.5*log(r)*r/dr;
}
z+=pos;
}
c.dist = 0.5*log(r)*r/dr;
}
Orange colour:
(x - a)² + (y - b)² + (z - c)² = r²
(x - a)² + (y - b)² + (z - c)² = r²