# 3d fractal helix modeling

I'm trying to build a 3d visual to illustrate a concept. Imagine a circular helix. We could define a cylinder that contains that helix. But now imagine this cylinder takes the helicoïd shape too ! We have a big helix made of a small one. What i'm trying to do is to repeat that process and use each new helix as the composant of a larger one. A small helix has to spin 9 times to make 1 spin of the larger one.

I tried to build this with fractals generators but I don't know how to translate my idea into a formula (I mean the z²+c type). So I tried with 3d modeling softwares, i managed to create the first helix but I don't have the ability to go further because I need to use some programming languages to create the recursive process.

So here is my question : what would be the easiest way to build this visual considering i'm not a programmer? Could it be translated into a formula i could enter in a fractal generator?

I think that most direct analog from the library of classic fractals is likely to be Weierstrass's nowhere differentiable function, which is defined by $$\sum_{n=1}^{\infty} a^n \cos(b^n x),$$ for appropriate choices of the parameters $$a$$ and $$b$$. Typically, $$a<1$$ and $$b>1$$ so that the sum adds oscillations that are decreasing in magnitude but increasing in frequency. You are really suggesting something quite similar. The oscillations come in the form of circular motion in a plane perpendicular to the curve with a frequency that increases by a common factor with each step (you suggested 9). Presumably, the radius of the circles should decrease as well.

To do this, I guess you need a programming language with good computational tools and 3D graphics. Of course, you also need to know how to compute the points that form the "helix" around a curve. To do so, you need a function $$N$$ that tells you a vector normal to the curve at a point, together with a second function $$B$$ that produces a another normal vector that's also perpendicular to $$N$$.

I implemented this with Mathematica and came up with the following:

(* Helix about the x-axis *)
p1[t_] = {t, Cos[2*t], Sin[2*t]};
ParametricPlot3D[p1[t], {t, -8, 8},
Ticks -> None, ImageSize -> 800]


n[t_] = Cross[p1'[t], {1, 0, 0}];
n[t_] = Simplify[n[t]/Norm[n[t]], Assumptions -> t > 0];
b[t_] = Cross[n[t], p1'[t]];
b[t_] = Simplify[b[t]/Norm[b[t]], Assumptions -> t > 0];
p2[t_] = p1[t] + n[t]*Cos[32 t]/4 + b[t] Sin[32 t]/4;
ParametricPlot3D[p2[t], {t, -8, 8},
Ticks -> None, ImageSize -> 800]


n[t_] = Cross[p2'[t], {1, 0, 0}];
n[t_] = Simplify[n[t]/Norm[n[t]], Assumptions -> t > 0];
b[t_] = Cross[n[t], p2'[t]];
b[t_] = Simplify[b[t]/Norm[b[t]], Assumptions -> t > 0];
p3[t_] = p2[t] + n[t]*Cos[32*16 t]/16 + b[t] Sin[32*16 t]/16;
ParametricPlot3D[p3[t], {t, -8, 8},
Ticks -> None, ImageSize -> 800]


• Thank you so much ! This is exactly what i was looking for ! Feb 14 at 6:56

In 2020 I constructed a similar object using signed distance fields based on a helix as a sheared stack of toruses:

https://github.com/claudeha/fragm-examples/blob/029c5408a89a2d4e932ce4f020c558f02d385516/00-Helices.frag#L45-L60

uniform float HelixD; slider[0.0,2.0,10.0]
uniform float HelixR; slider[0.0,1.0,10.0]
uniform float Helixr; slider[0.0,0.5,10.0]
uniform float HelixScale; slider[0.0,2.618,10.0]

void Torus(inout vec3 q)
{
q = vec3(log(length(q.xy)), atan(q.y, q.x), q.z);
}

void Helix(inout vec3 q)
{
q.z += HelixD * atan(q.y, q.x);
q.z = mod(q.z + pi * HelixD, 2.0 * pi * HelixD) - pi * HelixD;
Torus(q);
}

float HelicesDE(vec3 q, int depth)
{
q /= length(vec2(HelixD, HelixR));
mat3 dq = mat3(1, 0, 0, 0, 1, 0, 0, 0, 1);
mat3 m = mat3(0,1,0, 0,0,1, 1,0,0);
float d = length(q.xy) - Helixr * HelixScale;
for (int i = 0; i < depth; ++i)
{
q.z -= pow(-2.0, i) * 2.0 * pi * HelixD * time / 10.0;
Helix(q);
d = min(d, (length(q.xz) - Helixr) / pow(HelixScale, i));
if (d < 0.0) break;
q *= HelixScale * transpose(m);
}
return d * 0.25;
}


AFAIK the terminology for including each level of a fractal construction (rather than just the final limit) is "condensation".

• Whoa!!!!!!!!!!! Feb 13 at 21:42
• Impressive ! Thank you for this !!! Feb 14 at 7:11