Jump to content

File:DistanceToFixed.svg

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 (SVG file, nominally 1,000 × 500 pixels, file size: 202 KB)

Summary

Description
English: Distance to fixed point for various types of local discrete dynamics near fixed point .
Polski: Typy lokalnej dynamiki w otoczeniu punktu stałego
Date
Source Own work
Author Adam majewski

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
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.

Maxima CAS src code


kill(all);



/* ---------- functions ---------------------- */

/* http://en.wikipedia.org/wiki/Complex_quadratic_polynomial  */
f(z,c):=rectform(z*z+c);

/* find fixed point alfa of function f(z,c)   */
GiveFixed(c):= float(rectform((1-sqrt(1-4*c))/2))$

/* gives distance between 2 complex points on plane */
GivePlaneDistance(z1,z2):=float(abs(z2-z1))$



/* gives an orbit of z0 under fc where iMax is the length of the orbit */
 GiveList(z0,c, iMax):= block
(
  [i,zAlfa,zprev,znext,dist,d_list],
   zAlfa:GiveFixed(c),
   zprev:z0,
   znext:f(zprev,c),
   dist:GivePlaneDistance(zAlfa,znext),
   d_list:[[1,dist]],
   zprev : znext,
   i:1,
   while abs(znext)<2 and i<iMax
    do
    ( 
      znext:f(zprev,c),
      dist:GivePlaneDistance(zAlfa,znext),
      d_list:endcons([i,dist],d_list),
      zprev : znext,
      i:i+1
    ),
   return(d_list)
)$



/* conformal map  from circle to cardioid ( boundary
 of period 1 component of Mandelbrot set */
F(w):=w/2-w*w/4;


/* 
circle D={w:abs(w)=1 } where w=l(t,r) 
t is angle in turns ; 1 turn = 360 degree = 2*Pi radians 
r is a radius 
*/
ToCircle(t,r):=r*%e^(%i*t*2*%pi);



compile(all)$


/* ---------- constant ---------------------------*/
Numerator :1;
denominator :1;
internalAngle: Numerator/denominator;
internalRadius:1;
iMax:500;
/* point which makes as big loop as possible */
z0p:0.519198553239361  +0.001261219060382 *%i;

/* -------------  main -----------------------*/


/* parabolic */
w1:ToCircle(internalAngle,internalRadius);  /* point of circle */
cp: float(rectform(F(w1))) ;    /* point of period 1 component of Mandelbrot set */
ParabolicList:GiveList(z0p,cp,iMax);


/* siegel*/
cs:-.5867879078859505*%i-.3905408691260131;
z0s: 1.006250000000000  +0.543750000000000*%i;
SiegelList:GiveList(z0s,cs,iMax);


/* hyperbolic */
ch:0;
z0h:0.843750000000000  +0.437500000000000*%i;
HyperbolicList:GiveList(z0h,ch,iMax);

/* escaping */
ce:-0.189093266739737  +0.677638784067832*%i;
z0e:-0.289258118270603  +0.429086915059359*%i;
EscapingList:GiveList(z0e,ce,iMax);

/* ----------------- draw ------------ */

path:""$ /*  put pwd here, ending with "/",  if string is empty then file is in a home dir */

load(draw); 

draw2d(
  terminal  = svg,
  file_name=sconcat(path,"distance"),
  dimensions  = [1000,500],    /* Since Maxima 5.23, pic_width and pic_height are deprecated. */
  /* See option dimensions. To get the same effect, write dimensions=[800,600] */
  title = "Distance between point of orbit and fixed point ",
  xlabel     = "iteration",
  ylabel     = "distance",
  yrange = [-0.1,1.0],
  point_size    =  0.4,
  point_type = filled_circle,
  /*  */
   key ="parabolic",
  color         = red,
  points_joined =true,
  points(ParabolicList),
  /* */
   key ="elliptic",
  color         = blue,
  points_joined =true,
  points(SiegelList),
  
  /* */
   key ="escaping",
  points_joined =true,
  color         = black,
  points(EscapingList),
  /* */
   key ="attracting",
  points_joined =true,
  color         = green,
  points(HyperbolicList)
);

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

29 November 2015

File history

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

Date/TimeThumbnailDimensionsUserComment
current11:44, 29 November 2015Thumbnail for version as of 11:44, 29 November 20151,000 × 500 (202 KB)Soul windsurferadded labels to axes
11:31, 29 November 2015Thumbnail for version as of 11:31, 29 November 20151,000 × 500 (202 KB)Soul windsurferUser created page with UploadWizard

Metadata