Draw a vortex fractal in C#

vortex fractal

I discovered the vortex fractal while I was trying to draw the Phoenix set. (I’ll show how to draw the phoenix set in a later post.)

The vortex fractal (a name I picked because some versions of the fractal look like whirling vortices) is generated by iterating the equation:

Z(n+1) = Z(n)2 + Re(C) + Im(C) × Z(n-1)

Where the Zs and C are complex numbers, C is a constant, and for a point (X, Y):

Z(0) = X + Yi
Z(1) = X + Yi

The program iterates this equation until the magnitude of Z(n) is at least 2, or until the program performs a maximum number of iterations. See the code for the details.

Download the example and experiment with it to draw interesting images. Use the Options menu’s Set Options command to set the colors the program uses and the maximum number of iterations it will perform.

Click the following thumbnails to see slightly larger versions.

Download Example   Follow me on Twitter   RSS feed

This entry was posted in algorithms, fractals, graphics, mathematics and tagged , , , , , , , , , . Bookmark the permalink.

One Response to Draw a vortex fractal in C#

  1. Pingback: Draw a smooth vortex fractal in C# -

Leave a Reply

Your email address will not be published. Required fields are marked *