Jump to content

File:Herman-ring-1.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikibooks, open books for an open world

Original file (4,000 × 2,000 pixels, file size: 512 KB, MIME type: image/png)

Summary

Description
English: Julia set for rational map with Herman rings.
Русский: Множество Жюлиа для рационального отображения, обладающее кольцами Эрмана
Date
Source Own work
Author Ilya Voyager


Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic 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.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

Compare with :

Source code

This is a Julia set of the following rational map:

where t=0.6151732.

We used rather straightforward boundary scanning method (see e.g. D. Saupe, Efficient computation of Julia sets and their fractal dimension, Physica D, v.28 n.3, p.358-370, Oct. 1987 [1]). C++ source code follows. It's available under CC BY-SA, GFDL and GPLv2+.

See also discussion for some notes about compiling and running the program.

#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <iostream>
#include <complex>

inline double max(double a,double b)
{
	return a>b?a:b;
}

using namespace std;

const double t=0.6151732;
const complex<double> rot=exp(2*M_PI*complex<double>(0,1)*t);//e^{2 \pi i t}

complex<double> f(complex<double> z)
{
//    f(z) = e^{2 \pi i t}\cdot \frac{z^2(z - 4)}{1 - 4z}, 
	return rot*(z*z*(z-4.))/(complex<double>(1,0)-4.*z);
}

int main()
{
	//z=x+iy;
	double xmin=-4.0,xmax=8.0,deltax,ymin=-3,ymax=3,deltay;
	int precx=400, precy=200;
	deltax=(xmax-xmin)/precx;
	deltay=(ymax-ymin)/precy;
	int iterations=4000;
	double threshold=iterations/30*sqrt(deltax*deltax+deltay*deltay);
	double x,y;

	complex<double> zlt,zlb,zrt,zrb;
	int i,k,l;
	double maxdistance;
	int color, MaxColor=15;
	double infty=1.E4;
	bool inf_zlt,inf_zlb,inf_zrt,inf_zrb;


	cout << "P2" << endl << precx << " " << precy << endl << MaxColor << endl;
	for(k=0;k<precy;k++)
	{
		y=ymax-k*deltay;
		cerr << y << endl;
		for(l=0;l<precx;l++)
		{
			x=xmin+l*deltax;
			zlt=complex<double>(x-deltax/2,y+deltay/2);
			zlb=complex<double>(x-deltax/2,y-deltay/2);
			zrt=complex<double>(x+deltax/2,y+deltay/2);
			zrb=complex<double>(x+deltax/2,y-deltay/2);
			inf_zlt=false;
			inf_zlb=false;
			inf_zrt=false;
			inf_zrb=false;
			for(i=0;i<iterations;i++)
			{
				if(!inf_zlt){zlt=f(zlt);}
				if(!inf_zlb){zlb=f(zlb);}
				if(!inf_zrt){zrt=f(zrt);}
				if(!inf_zrb){zrb=f(zrb);}
				if(abs(zlt)>infty)
				{
					zlt=infty;
					inf_zlt=true;
				}
				if(abs(zrt)>infty)
				{
					zrt=infty;
					inf_zrt=true;
				}
				if(abs(zlb)>infty)
				{
					zlb=infty;
					inf_zlb=true;
				}
				if(abs(zrb)>infty)
				{
					zrb=infty;
					inf_zrb=true;
				}
			}
			maxdistance=max(abs(zlt-zlb),max(abs(zlt-zrt),max(abs(zlt-zrb),max(abs(zlb-zrt),max(abs(zlb-zrb),abs(zrt-zrb))))));
			if(maxdistance>threshold*8)
			{
				color=0;
			}
			else 
			{
				if(maxdistance<threshold/8.)
				{
					color=MaxColor;
				}
				else
				{
					color=MaxColor-(int(log(maxdistance/threshold)/log(8)*7.)+7);
                                        				}
			}
			//if (x>0 && y>0) color=MaxColor-color;  /* check the orientation of Z-plane by marking first quadrant */

			cout << color << " ";
		}
		cout << endl;
	}
	return 0;
}

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

3 March 2010

524,438 byte

2,000 pixel

4,000 pixel

image/png

31f9f6d810cb0d7b5a4ab88921aa238eda48e89f

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current18:18, 15 July 2011Thumbnail for version as of 18:18, 15 July 20114,000 × 2,000 (512 KB)Soul windsurferreversed Y axis and bigger size
21:13, 8 March 2010Thumbnail for version as of 21:13, 8 March 20102,200 × 1,200 (204 KB)Ilya VoyagerRescaling + high-resolution
21:04, 3 March 2010Thumbnail for version as of 21:04, 3 March 20101,600 × 1,200 (169 KB)Ilya Voyager{{Information |Description={{en|1=en:Julia set for rational map with Herman rings.}} {{ru|1=ru:Множество Жюлиа для рационального отображения, обладающее [[:ru:кольцо Эрмана|кол�

Global file usage

The following other wikis use this file: