I implemented (hopefully #monotone) #cubic #interpolation, as well as linear and step modes, for #zoom depth #animation in my #zoomasm tool for assembling #fractal animations from exponential strip keyframes. Much smoother than the piecewise linear that was the only option before (no more speed discontinuities at waypoints, unless you want them).
Oriented box signed distance function from Inigo Quilez:
Segments activated by a load of conditionals on each digit's value.
Digits found by repeated divmod 10 stuff, after multiplying by 10000 (sets maximum number of digits after the point).
Leading zeros stripped with a simple loop (that stops at the point). I have code to strip trailing zeros too, but changing values are seldom affected.
Anti-aliasing of the decimal point seems to be a bit off, looks a bit too blurry. Want to add an option to move it to the baseline too.
Currently there are controls for glyph size, point size, segment length, segment thickness, foreground and background colours.
Eventual aim is to port the number rendering to the zoom video assembler I've been working on, to display zoom depth. Will need some extra fiddling, as that needs to be in log-domain and expanded to scientific notation without overflow.
Need to add motion blur to the zoom assembler first, otherwise the least significant digits will be too stroboscopic.
Figured out how to do bidirectional communication with a subprocess using Win32 API. POSIX version still to do. Now I can pipe raw PPM image streams to FFmpeg and display the output logs in my program. Did some fiddly things too to stop a flood of status lines (in a terminal they are overwritten in place using carriage return without newline). Also made a simple Dear ImGui theme function, so my UI is red when recording, green when playing, and blue when idle.
Figured out how to fix #video #tearing in #xfce on #linux with #amdgpu driver : simply enable the display #compositor - thought I'd tried it before, but maybe I was doing it wrong, or it didn't work properly in earlier versions (I was on Debian Buster/stable for a long while, now on Bullseye/testing).
a couple of other locations, with lower iteration counts
I made a #fractal #zoom #seamless #loop thing. Formula is Mandelbrot set modified to have power 2.005 instead of 2, coloured with additive blending of an orbit trap on the negative real axis (cycling between red, green, blue depending on iteration number).
The center point of the zoom is preperiodic point with preperiod 645 and period 12 (this fact was used to refine the coordinates to be more precise). Iteration count was 3000.
The zoom factor for the loop (both rotation and scaling) was found by overlaying two copies and fiddling with sliders until it lined up again.
Probably too much motion blur and not enough samples for anti-aliasing (256 per pixel), but it took almost 2 hours to render this 2 second thing...
another variation, using the output as a new mask for another stage
got bitmap masking working, though size is hardcoded for now.
the boundary conditions also constrain it within the frame. can also add additional constraints, like the hole in this one. obvious next step is reading a mask from a bitmap graphic file instead of defining it with code.
Part of the algorithm is solving the Laplace equation for electric field strength. I do this by repeatedly applying boundary conditions, blurring, and normalizing. Typically I do 16 or more iterations of this between each next point selection and plotting, because when doing only 2 the image looks weird. But I somehow like the effect, not sure how to control it better...
added a horizontal shift when plotting each circle (think this one was 1x radius)
varying the power across the image gives a nice effect
playing with line thickness
alpha = 0.75
alpha = 0.125
tweaked some parameters and it went all weird - this one adds (alpha * (number of boundary pixels) ^ beta) new points each step, with alpha = 0.5 and beta = 0.25.
something went bad in this one (power 10), don't know why the thicker vertical/horizontal lines are there... they're not there in the previous image with 1/2 the iterations, but the texture is not so full....
making art with maths and algorithms
Welcome to post.lurk.org, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.