# Inflector Gadget

Inflection mapping gadget for complex quadratic polynomials.

Starting from the Mandelbrot set, choose a Julia set. Then each mouse click warps the image around the clicked point. The resulting sequences of patterns sometimes resemble that of Mandelbrot set deep zoom Julia morphings.

# 1 Download

0.6 2023-09-24, perturbation (preliminary); port to SDL2

0.5 2023-09-06, major enhancements

0.4 2017-12-14, inflection discs

0.3.2

0.3.1

0.3

0.2

0.1.1

0.1

# 2 Development

Latest sources are hosted in a git repository:

git clone https://code.mathr.co.uk/inflector-gadget.git

Browse: code.mathr.co.uk/inflector-gadget

# 3 Controls

# 3.1 Keyboard Navigation

ESC, Q

quit

H

show help

F11

toggle fullscreen

HOME

reset view

UP

zoom in about cursor (faster with SHIFT)

DOWN

zoom out about cursor (faster with SHIFT)

PGUP

zoom in about center (faster with SHIFT)

PGDOWN

zoom out about center (faster with SHIFT)

1-9

zoom in to quadrant

0

zoom out

M

toggle Mandelbrot overlay

C

toggle centering mode

N

increase iteration count (decrease with SHIFT)

J

increase sample count (reset with SHIFT)

U

increase image undersampling (reset with SHIFT)

O

increase image oversampling (reset with SHIFT)

I

reset image sampling ratio

T

change colour theme

A

randomize accent colour (reset with SHIFT)

B

randomize decomposition colours (reset with SHIFT)

F

use single precision without perturbation (default)

D

toggle double precision (requires OpenGL 4.0+)

G

toggle perturbation (requires OpenGL 4.3+)

-

undo add inflection point (remove all with SHIFT)

=

redo add inflection point

S

save screenshot (in PNG format)

# 3.2 Keyboard Animation

SPACE

add keyframe

DELETE

delete keyframe

LEFT

activate previous keyframe

RIGHT

activate next keyframe

ENTER

play animation (press again to stop)

[

play slower (more with SHIFT)

]

play faster (more with SHIFT)

P

reset speed to default (set to 1.0 with SHIFT)

V

(without SHIFT) toggle video mode (stopframe, keyframe)

V

(with SHIFT) save video sequence

# 3.3 Mouse Controls

WHEEL

zoom about mouse cursor position

LEFT

add inflection point at cursor position

RIGHT

undo add inflection point

MIDDLE

recenter window about mouse cursor position

# 4 Colours

# 4.1 Default Theme

Black on white.

default theme

IG

# 4.2 Dark Theme

White on black.

dark theme

IG

# 4.3 Accented Rainbow

Press A to randomize accent colour, SHIFT A to reset.

accented rainbow

IG

# 4.4 Binary Decomposition

Press B to randomize binary decomposition colours, SHIFT B to reset.

binary decomposition

IG

# 4.5 Accented Decomposition

A and B can be combined.

accented decomposition

IG

# 5 Examples

Choosing morph points in parts of the Mandelbrot set let you evolve a number of different shapes equal to the period in the Mandelbrot set.

# 5.1 One Thing

Morphing in the period 1 cardioid.

one thing 1

one thing animation

IG

# 5.2 Two Things

Morphing in the period 2 disk.

two things 1

two things 2

two things animation

IG

# 5.3 Three Things

Morphing in the period 3 disk at internal angle 1/3.

three things 1

three things 2

three things 3

three things animation

IG

# 6 Example Videos

# 6.1 ABaABb

ABaBbb animated GIF

2560x1416p2 MP4 (2MB), no sound

Experiment with nested repeating patterns, starting from an “airplane” location.

This one has an ABC pattern, where C alternates between a and b, so unwrapped it’s ABaABb repeating. Aa is an open tree structure and Bb is a solid “basilica”-like shape.

# 6.2 Five Things

Five things near 1 2 1/3 5 (screencast)

1280x720p30 MKV (117MB), 6m05s, no sound

Process of constructing five different shapes in a fractal, near the period 5 baby Mandelbrot set in the 1/3 branch of the 1/2 bulb.

Weird pixelation in parts is due to insufficient precision. Even double-precision is not enough. Using double-double arithmetic for higher precision is slow and awkward in GLSL shaders, but a possible future enhancement.

# 6.3 Parallel Evolution

1280x720p30 MKV (25MB), 3m29s, no sound

Process of constructing trees interleaved with lines, following the idea from DinkydauSet’s “Parallel Evolution” deep Mandelbrot set location.

# 6.4 Evolution of Trees

1280x720p30 MKV (5MB), 1m22s, no sound

Short screencast in which I mimic the patterns in DinkydauSet’s “Evolution of Trees” deep Mandelbrot set location.

# 6.5 Session 2023-09-02

STROBE WARNING

1280x720p8 MP4 (6MB), 1m03s, no sound

Each mouse click warps the image about the clicked point. Pressing the S key exports an image. I did that 500 times and made a stop-motion video.

In released version 0.5, the export can be automated: press V to switch to stop motion history mode, then SHIFT P to set speed to 1.0, then SHIFT V to export video. The bug that made the boundary disappear is also fixed.

# 7 Tutorials

# 7.1 Keyframe Animation Tutorial

You can generate animations interpolating between keyframes, provided that all the keyframes have the same number of inflection discs. If you try to interpolate between keyframes with different numbers of inflection discs, unpredictable results are to be expected. Possibly it will get stuck in places or otherwise not do what you want.

(This tutorial was made with 0.3.1, in 0.4 you need to drag the inflection disc rather than just clicking. 0.5 goes back to simply clicking.)

On first load you should see this:

00

Left-click near the top and you get something like this:

01

(This tutorial was made with 0.3.1, in 0.3.2 the centering mode default is changed, so don’t press ‘C’, or press ‘C’ twice to see what it does.)

Press the ‘C’ key to toggle the centering mode:

02

Left-click near the top left:

03

Left-click near the top left:

04

Left-click near the top left:

05

Left-click near the right, and press ‘SPACE’ to add a key frame:

06

Right-click to undo the last morph:

07

Right-click to undo the last morph:

08

Left-click near left:

09

Left-click near top, and press ‘SPACE’ to add a key frame:

10

Press ‘ENTER’ to see an animation between the two key frames.

Press ‘ENTER’ again to stop the animation.

Right-click to undo the last morph:

11

Right-click to undo the last morph:

12

Left-click near top:

13

Left-click near top, and press ‘SPACE’ to add a key frame:

14

Press ‘ENTER’ to see an animation between the three key frames.

Press ‘ENTER’ again to stop the animation.

Press ‘LEFT ARROW’ to see the previous key frame.

15

Press ‘LEFT ARROW’ to see the previous key frame.

16

Press ‘LEFT ARROW’ to see the previous key frame.

17

Press ‘RIGHT ARROW’ to see the next key frame.

18

Right-click to undo the last morph:

19

Right-click to undo the last morph:

20

Left-click near the middle:

21

Left-click near the middle and press ‘SPACE’ to add a key frame:

22

Right-click to undo the last morph:

23

Right-click to undo the last morph:

24

Left-click near the tip:

25

Left-click near the tip and press ‘SPACE’ to add a key frame:

26

Press ‘RIGHT ARROW’ to see the next key frame.

27

Press ‘M’ for Mandelbrot mode.

(Note: removed in 0.5, instead ‘M’ toggles a Mandelbrot set overlay.)

28

Press ‘J’ to return to Julia mode.

(Note: removed in 0.5, instead ‘J’ adjusts image samples per pixel.)

29

Press ‘ENTER’ to see an animation between the five key frames.

Press ‘SHIFT-]’ twice to speed it up by a factor of 4.

Press ‘ENTER’ again to stop the animation.

Press ‘SHIFT-V’ to save an image sequence. Here it is:

tutorial 1 animation

Press ‘Q’ or ‘ESC’ to quit, or use the window close button.