Fractals in the polar coordinate.
It is fork of the original code by Mika Seppä
Original image (FractExample5.png)
Modified images
- crop = Cutout = cut ( defining a rectangle in pixels and choose only this rectanle, removing the other parts of an image). Why : because most of image is not interesting exterior of Mandelrots/Julia sets
Here is standard c plane ( flat image = rectangle from Cartesian plane) with marked part of the plane which is showed in the polar image
Mandelbrot set ( polar images)
Image ( example5)
xSize=8000
ySize=800
./pfract -x 0.160211 -y -0.684246 -size $xSize $ySize -iterations 256 -rad -10 example5.raw
./colorize example5.raw example5.ppm -spawn -400 -scale 1.6 -fadedepth 25
New image ( example 7): only one minibrot from above image, more distorted
xSize=8000
ySize=800
./pfract -x 0.360211 -y -0.684246 -size $xSize $ySize -iterations 256 -rad -10 example7.raw
./colorize example7.raw example7.ppm -spawn -400 -scale 1.6 -fadedepth 25
New image ( example 8): more cetered zoom, different diatorsion of decorations
xSize=8000
ySize=800
./pfract -x 0.360211 -y -0.57 -size $xSize $ySize -iterations 256 -rad -10 example8.raw
./colorize example8.raw example8.ppm -spawn -400 -scale 1.6 -fadedepth 25
convert example8.ppm example8.png
# crop the image with shotwell
Here is an example how number of iterations ( -iterations) can change the image: for the first one is 256 and for the second one is 20000 ( see also commons and wikibooks):
./pfract -x -1.7864402555636389 -y 0 -size $xSize $ySize -iterations 256 -rad -20 e9.raw
./colorize e9.raw e9.ppm -spawn -400 -scale 1.6 -fadedepth 25
convert e9.ppm e9.png
# crop the image with shotwell
./pfract -x -1.786440255563638 -y 0 -size 2400 800 -iterations 20000 -rad -20 1.786440255563638.raw
./colorize 1.786440255563638.raw 1.786440255563638.ppm -spawn -400 -scale 1.6 -fadedepth 25
convert 1.786440255563638.ppm 1.786440255563638.png
Julia sets ( polar images)
Single file program ( sfp) - only 1 c file with 250 lines:
gcc p.c -lm -Wall -Wextra
./a.out
My version of the program can be compiled and run with simple
make
or
./r.sh
Detailes are in
pfract -julia -cx -1.115313 -cy -0.304872 -x -0.147394 -y -0.234163 -size 1600 160 -iterations 164 -rad -8 example1.raw
colorize example1.raw example1.ppm -fadedepth 20 -scale 1.4
Source code
- original , non modified files are in src/original directory
- my ( modified) files are in src directory
- bash version - slightly modified
- single c file the program ( sfp) - change from multi (2 c files and one bash file) files program to one file program
- Images = png files are in png directory
- Documantation is in the doc directory
Raw file specification
- binary file
- contains data
0- 7 : Magic number "ITERFILE"
8- 9 : Image width
10-11 : Image height
12-13 : Number of bytes per iteration value (NBYTES)
IF NBYTES=2:
14-15 : Maximum iterations
16- : Data (2 bytes per iteration value)
IF NBYTES=4:
14-17 : Maximum iterations
18- : Data (4 bytes per iteration value)
- show on normal plane what part of that plane is transformed
- make one file c program (sfp = Single File Program). I think that because of short compiling and running time of original code there is noneed for dividing cration of the image into steps)
- modify the program to show more image to the left
- make program specification
create a new repository on the command line
echo "# PFRACT" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:adammaj1/PFRACT.git
git push -u origin main
Change:
- in general settings
- add Social Preview Image ( Images should be at least 640×320px (1280×640px for best display))
- in repository details ( near About) add
- description
- website
- Topics (separate with spaces)
Local repository
/Dokumenty/algorithm/pfract
mkdir png
git add *.png
git mv *.png ./png
git commit -m "move"
git push -u origin main
then link the images:
![](./png/n.png "description")
to overwrite
git mv -f
git mv ./src/*.c ./src/modified/bash/
git mv ./src/*.sh ./src/modified/bash/
gitt mv ./src/Makefile ./src/modified/bash/