File:MandelbrotMapOrbitDiag.png

From Wikiversity
Jump to navigation Jump to search

Original file(9,600 × 5,400 pixels, file size: 1.8 MB, MIME type: image/png)

This is a file from the Wikimedia Commons. The description on its description page there is shown below.

Commons is a freely licensed media file repository. You can help.

Summary

Description
English: The file was generated via the following code, which was adapted from Wikipedia Logistic map article:
import numpy as np
import matplotlib.pyplot as plt

preset = 1
if preset == 1: # Complete diagram
  saveFigure = True
  markerSize = 0.001 # orig. 0.02
  markerStyle = "," # . - point; , - pixel
  cInterval = (-2.1, 0.26)
  #cInterval = (-1.4011551890, -1.3940462)
  cResolution = 0.0003
  mapIterationCount = 1000  # (orig. 600)
  lastMapIterationCountToPlot = 1000 # (orig. 200)
  startingIterationValue = 0
  fileName = "MandelbrotMapOrbitDiag.png"
elif preset == 2: # Zoom to a region near -2
  saveFigure = True
  markerSize = 0.001 # orig. 0.02
  markerStyle = "," # . - point; , - pixel
  cInterval = (-2, -1.99)
  cResolution = 1E-6
  mapIterationCount = 1000
  lastMapIterationCountToPlot = 1000
  startingIterationValue = 0
  fileName = "MandelbrotMapOrbitDiag_ZoomNearM2.png"

if cInterval[0] < -2 or cInterval[1] > 0.25:
  yLim = (-2.2, 2.5)
else:
  yLim = (-2, 2)

lims = np.zeros(mapIterationCount)

fig, biax = plt.subplots()
fig.set_size_inches(16, 9)

lims[0] = startingIterationValue
for c in np.arange(cInterval[0], cInterval[1], cResolution):
  for i in xrange(mapIterationCount - 1):
    lims[i + 1] = lims[i] * lims[i] + c
    if lims[i] > 2:
        lims[i + 1] = lims[i] # Allow plotting of c values outside of Mandelbrot set, diverging ones

  biax.plot([c] * lastMapIterationCountToPlot,
            lims[(mapIterationCount - lastMapIterationCountToPlot):], "b.",
            markersize=markerSize,
            marker=markerStyle)

biax.set(xlabel="c", ylabel="x",
         title="Mandelbrot set quadratic map for real values - bifurcation diagram/orbit diagram" + "\n" +
               "c resolution: " + str(cResolution) +
               ", iteration count: " + str(mapIterationCount) +
               ", last values to plot count: " + str(lastMapIterationCountToPlot))

biax.set_ylim(yLim[0], yLim[1])
if saveFigure:
  plt.savefig(fileName, dpi=600)
else:
  plt.show()
Date
Source Own work
Author Dan Polansky

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

A orbit diagram of the Mandelbrot set quadratic map

Items portrayed in this file

depicts

6 February 2024

File history

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

Date/TimeThumbnailDimensionsUserComment
current11:05, 6 February 2024Thumbnail for version as of 11:05, 6 February 20249,600 × 5,400 (1.8 MB)Dan PolanskyUploaded own work with UploadWizard

Metadata