File:Conformal Warping Around The Cardioid In The Mandelbrot Set.gif
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Conformal_Warping_Around_The_Cardioid_In_The_Mandelbrot_Set.gif (500 × 500 pixels, file size: 5.73 MB, MIME type: image/gif, looped, 200 frames, 10 s)
File information
Structured data
Captions
The hardest trip Mandelbrot fractal zoom
Summary
[edit]DescriptionConformal Warping Around The Cardioid In The Mandelbrot Set.gif |
English: The exterior of the cardioid in the Mandelbrot set is warped to give the appearance of rotation. The transformation is built up from smaller components, including mapping of the cardioid to a circle, Moebius transform of the circle to a straight line, linear translation (which is animated), and the inverses of the previous two transformations. These transformations and their derivatives (for distance estimator colouring) are described here: https://mathr.co.uk/blog/2013-12-16_stretching_cusps.html The program to render the animation was implemented in C using the mandelbrot-graphics library found here: https://code.mathr.co.uk/mandelbrot-graphics The program is found in the repository as c/bin/m-cardioid/warping.c https://code.mathr.co.uk/mandelbrot-graphics/blob/60adc5ab8f14aab1be479469dfcf5ad3469feea0:/c/bin/m-cardioid-warping.c |
Date | |
Source | Own work |
Author | Claude Heiland-Allen |
Other versions |
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
C src code
[edit]This is (slightly modified) program m-cardioid-warping from mandelbrot-numerics library by Claude Heiland-Allen
#include <complex.h>
#include <math.h>
#include <stdio.h>
#include <mandelbrot-graphics.h>
int main(int argc, char **argv)
{
(void) argc;
(void) argv;
int w = 10000;
int h = 10000;
double er = 600;
double maxiters = 25;
m_image *image = m_image_new(w, h);
m_pixel_t red = m_pixel_rgba(1, 0, 0, 1);
m_pixel_t black = m_pixel_rgba(0, 0, 0, 1);
m_pixel_t white = m_pixel_rgba(1, 1, 1, 1);
m_d_colour_t *colour = m_d_colour_minimal(red, black, white);
m_d_transform *rect = m_d_transform_rectangular(w, h, -0.5, 1.5);
m_d_transform *card = m_d_transform_cardioid();
m_d_transform *uncard = m_d_transform_cardioid();
m_d_transform_invert(uncard);
m_d_transform *line = m_d_transform_moebius3(1, -I, -1);
m_d_transform *unline = m_d_transform_moebius3(1, -I, -1);
m_d_transform_invert(unline);
for (int x = 0; x < 1000; ++x)
{
m_d_transform *translate = m_d_transform_linear(x / 64.0, 1.0);
m_d_transform *t0 = m_d_transform_compose(rect, uncard);
m_d_transform *t1 = m_d_transform_compose(t0, unline);
m_d_transform *t2 = m_d_transform_compose(t1, translate);
m_d_transform *t3 = m_d_transform_compose(t2, line);
m_d_transform *t4 = m_d_transform_compose(t3, card);
m_d_render_scanline(image, t4, er, maxiters, colour);
char filename[100];
snprintf(filename, 100, "%03d.png", x);
m_image_save_png(image, filename);
m_d_transform_delete(translate);
m_d_transform_delete(t0);
m_d_transform_delete(t1);
m_d_transform_delete(t2);
m_d_transform_delete(t3);
m_d_transform_delete(t4);
}
m_image_delete(image);
m_d_colour_delete(colour);
m_d_transform_delete(rect);
m_d_transform_delete(line);
m_d_transform_delete(unline);
m_d_transform_delete(card);
m_d_transform_delete(uncard);
return 0;
}
Bash and Image Magic src code
[edit]#!/bin/bash
# script file for BASH
# which bash
# save this file as g.sh
# chmod +x g.sh
# ./g.sh
# for all ppm files in this directory
for file in *.png ; do
# b is name of file without extension
b=$(basename $file .png)
# convert from png to gif and add text ( level ) using ImageMagic
convert $file $b ${b}.gif
echo $file
done
# convert gif files to animated gif
convert -resize 500x500 -delay 50 -loop 0 *.gif a.gif
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 17:09, 14 November 2016 | 500 × 500 (5.73 MB) | Soul windsurfer (talk | contribs) | better quality | |
16:40, 14 November 2016 | 256 × 256 (424 KB) | CM (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following 2 pages use this file:
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikibooks.org