ChristensenSet.jl Documentation

A computation of Christensen sets in Julia.

What is Christensen's set?

Let us consider a finite set of complex numbers $K$ and a positive integer $n$. Then the Christensen set $C_{K, n}$ is the set of all roots of univariate polynomials with coefficients from $K$ and degree at most $n$. It is a subset of the complex plane and it is easy to visualize its density.

This Julia package is motivated by the John Baez's article and Dan Christensen's experiments. It employs the PolynomialRoots.jl package for root finding.

A few beautiful fractal images can be found in the Gallery.

Polynomial iterator

ChristensenSet.PolynomialIteratorType
PolynomialIterator(coefficients, degree)

Iterate over all polynomials with coefficients provided by array coefficients and maximal degree degree.

Polynomials are represented by arrays of their coefficients from the lowest to the highest order (as in the PolynomialRoots package). For example, the polynomial $z^2 + 2z + 3$ corresponds to the array [3, 2, 1].

The constructor removes duplicate values from the coefficients array.

source

Roots image

ChristensenSet.RootsImageType
RootsImage(leftbottom, topright, width, height)

Essentially a two dimensional histogram covering a rectangle in the complex plane specified by complex numbers leftbottom and topright with width horizontal and height vertical bins.

source

Computing roots

ChristensenSet.find_roots!Function
find_roots!(poly_iter, image)

Find all roots of polynomials generated by polynomial generator poly_iter and draw these roots directly onto image (see add_root!). Ignores zero as a root, it occurs too many times and is not that interesting.

This function heavily relies on roots from the PolynomialRoots package.

source
find_roots!(poly_iter, filename)

Find all roots of polynomials generated by polynomial generator poly_iter and save these roots into filename in binary form. Ignore zero as a root, it occurs too many times and is not interesting.

This function heavily relies on roots from the PolynomialRoots package.

source

Ploting

ChristensenSet.save_imageFunction
save_image(img, filename[; mode])

Save the img to file filename. Optional parameter mode has the same meaning as in the plot function.

source
ChristensenSet.animate_growthFunction

animategrowth(polyiter, img, filename[; output_filename])

Take roots of polynomials generated by poly_iter and saved in file filename and draw them incrementaly (each step corresponds to change of degree) onto image img.

source
ChristensenSet.plotFunction
plot(img[; mode])

Show a graphical representation of the image img. The optional parameter mode controls how to scale number of roots in histogram bins:

  • :sharp,
  • :log,
  • :log_cutoff,
  • :linear,
  • a function.
source

Index