claude · @mathr
288 followers · 2739 posts · Server post.lurk.org

Implemented a double helix based on an idea from 's `Knot.frag` (not knighty's, the other one, based on forum posts by DarkBeam).

Not sure how to -ize it, wanted to turn it into a of helices of helices etc. Nor how to make it a single helix (I only managed to colour the two halves individually...).

I think each strand is an Archimedean Serpentine, but I'm not 100% sure on terminology..

```
330 compatibility

providesColor
"MathUtils.frag"
"Complex.frag"
"DE-Raytracer.frag"

Helix

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 time;

float DE(vec3 q)
{
q.z += HelixD * time;
float t = (mod(q.z / HelixD + 0.5, 1.0) - 0.5) * 2.0 * PI;
q.xy *= mat2(cos(t), sin(t), -sin(t), cos(t));
q.z = 0;
float s = atan(HelixD / (2.0 * PI), HelixR);
q.yz *= mat2(cos(s), -sin(s), sin(s), cos(s));
return length(vec2(length(q.xy) - HelixR, q.z)) - Helixr;
}

vec3 baseColor(vec3 q, vec3 n)
{
q.z += HelixD * time;
float t = (mod(q.z / HelixD + 0.5, 1.0) - 0.5) * 2.0 * PI;
q.xy *= mat2(cos(t), sin(t), -sin(t), cos(t));
return vec3(0.5) + 0.5 * sign(q.x) * n;
}
```

#fragmentarium #ThreeD #shader #glsl #opengl #group #include #define #version #helix #fractal #fragm #DistanceEstimate

Last updated 4 years ago

claude · @mathr
288 followers · 2739 posts · Server post.lurk.org

Thinking about power p . There is a long history of just using the 1/2 |z| log |z| / |z'| formula that is justified by complex dynamics theory (Koebe 1/4 theorem etc) for the 2D Mandelbrot set and just plugging it into non-conformal 3D "triplex" arithmetic, without using a Jacobian matrix. It has even been found that using a Jacobian matrix is harmful, due to excess stretching.

Case (x,y) -> (0,0) at iteration n, r = sqrt(x^2+y^2+z^2) = |z| and it depends on r<>1 whether it will go to infinity (exterior) or 0 (interior) like (0,0,r^p^k) at iteration n+k, which is locally like r->r^p in 1 dimension so the scalar dr := p r^{p-1} dr update is justified.

Case sin(n phi) -> 0 at iteration n,, at the very next iteration (x,y)->(0,0) and z-> r^p and then the previous case applies. This step is also like r->r^p in one dimension, so the scalar dr := p r^(p-1) dr update is justified.

1/2

#DistanceEstimate #mandelbulb

Last updated 5 years ago

claude · @mathr
288 followers · 2739 posts · Server post.lurk.org

This paper's Theorem 1.8 seems to extend the Koebe 1/4 Theorem of into n-dimensional real spaces, which could be in getting reliable¹ formulas for 3D .

> Quasiconformal analogues of theorems of Koebe and Hardy-Littlewood.
> K. Astala and F. W. Gehring
> Michigan Math. J. Volume 32, Issue 1 (1985), 99-107.
> projecteuclid.org/euclid.mmj/1

Has some pre-requisites I need to research further, like knowing what K-quasiconformal means. If only I understood it enough to calculate the coefficient c (which is 4 for conformal complex functions), which depends only on the K of the function and the dimension of the space...

The "integrate the log of the Jacobian over the largest ball that fits inside the domain" part might be tricky in practice too, maybe some luck will mean something turns out to be harmonic so it can be evaluated at the center only? Not sure about any of this. Maybe I'm in over my head...

¹ reliable means "this is a proven lower bound" so that sphere-marching renderers will never overstep

#maths #amreading #fractals #DistanceEstimate #VeryUseful #complexanalysis

Last updated 5 years ago