Categories
Uncategorized

Mandelbrot Set Explorer Update

If you decide to click on over to my Mandelbrot Set Explorer, it is functional now for desktop and mobile. Granted, on a phone, the image is not very big. It is responsive to touch, but not necessarily in the expected manner. I did not yet introduce the pinch-to-zoom that might be your first instinct. The basics are as follows:

Mouse and Screen Input – these redraw automatically.
Click or Tap to re-center.
Click (mouse) or Touch (touchscreen) and Drag to zoom.

For instance, clicking and dragging as shown here:

Full Mandelbrot Set

Gives this image as a zoom:

View after zooming

Button Inputs – these redraw after you click on the “Draw” button. The buttons are shown in the pictures above.
Count x2 : Doubles the Max Count, which is initializes at 1024.
Count /2 : Halves the Max Count.
Zoom -5 : Zooms out to 5 X the viewed radius.
Zoom +5 : Zooms in by 5 X.
Col Sh 10 : A given color scheme has 256 colors. This shifts the scheme by
10 counts in one direction.
Col Sh -1 : This shifts the color by 1 in the opposite direction.
Min +10 : This adjusts a minimum count +10, initially set to zero, below
which areas are blacked out.
Min -1 : This reduces the minimum count by 1.
Btn09 : Reserved for future feature.
Btn10 : Reserved for future feature.
BW : Black / White / Gray scale Color Scheme
Rand : Random Color Scheme
RWB : Red White and Blue Color Scheme
ROYGBIV : (Default) Rainbow Color Scheme
Draw : Redraw with changes.

I added the Draw button rather than automatically redrawing after each change in order to speed up overall viewing. This matters on my laptop, a state-of-the-art HP 15″ Walmart special (literally). On my iPhone or iPad it is fast enough that this is not necessary. So you can, for example, shift colors by 30 by clicking “Col Sh 10” three times and then redrawing.

If you have any suggestions, please let me know at pax.plastica@gmail.com.

My intended purpose of this project was to learn a bit about JavaScript. I think I have done that, though I still have a lot to learn.

Thank you for reading,

Pax.

Categories
Uncategorized

Exploring the Mandelbrot Set

Though this is barely functional, here is a link to a Mandelbrot Set explorer

I modeled it after a Java program that actually is functional. I am doing this as a way to teach myself JavaScript. That explains the barely functional bit. It turns out placing JavaScript on a WordPress page is not entirely simple.

(updated June 24) Since the use-plugin-hide-your-code-in-the-header technique was not visually pleasing (the colors were sometimes, but not always, hatched, and the coordinates of mouse clicks were not consistent) I moved my code over to CodePen and updated the link. Of course, they want a subscription for better options, but that’s not happening just yet.

Pretty Twisty
There are millions (OK, an infinite number) of unique and beautiful tidbits to see.

You see, the beauty of coding as a hobby is that, if properly followed, it can eat up hours in a stimulating way at nearly zero cost.

Next steps: make the explorer responsive to mobile devices, not just mouse clicks.

Then: finish adding features that no one will ever use.

Finally: find a way to turn math into cash.

Well, if you’ve read this far, my third blog post, I commend you for your courage and stamina. I have no solid plan for where this will go, but feel free to keep on reading.

Thanks,

Pax.

Categories
Uncategorized

The Second Post

Evolution

Generating images of the Mandelbrot Set is a numerically intense process, repeating calculations over and over for each point on a grid. So in the early days, to get speed you had to make compromises. One such compromise was to use the mainframe (located in an entirely different town!). Doing so gave a little speed, but then no color graphics. The final result looked like this:

Pretty awesome, huh?

It was possible to fill the image up using different characters instead of colors, but that was never appealing.

So the best approach was to keep the images relatively small and keep the counts relatively low. Assigning colors randomly would yield something like this:

Now a more familiar version assigns a color from a predefined palette, giving a more appealing color scheme:

So that is a relatively simplified review of my history playing with the Mandelbrot Set. The image is now quite familiar, and almost boring. Applying a minor geometric transformation to the set results in another interesting image:

That’s pretty interesting in and of itself, but…..

Can you just imagine drinking a warm beverage from a mug bearing this remarkable design. I have done so, and it was exquisite. You can buy a mug here:

or here:

Finally, I had a little fun with this using SeamCarver, an algorithm that resizes images by selectively removing the least interesting parts.

Beware the SeamCarver.

Thanks for sticking with me.

Pax.