Category Archives: fractals

Draw a Fibonacci word fractal in C#

This example uses the Fibonacci word to draw a fractal curve. For information on the Fibonacci word, see the post Calculate Fibonacci words in C#. To draw a curve with level N, use Fibonacci word number N. Loop through the … Continue reading

Posted in algorithms, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , , , , | Leave a comment

Calculate Fibonacci words in C#

You can find Fibonacci words by concatenating previous Fibonacci words much as you calculate the Fibonacci sequence by adding previous values in the sequence. The first two Fibonacci words are: S0 = 0 S1 = 01 The following Fibonacci words … Continue reading

Posted in algorithms, fractals, graphics, mathematics | Tagged , , , , , , , , , , , | 1 Comment

Draw the Weierstrass function in C#

The Weierstrass function was discovered by Karl Weierstrass in 1872. It’s an odd function that is continuous everywhere but differentiable nowhere. I’ll explain what that means shortly. Here’s the function: Here: The following two sections explain what it means to … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , , , , | Leave a comment

Draw a recursive overlapping snowflake fractal in C#

   The example Draw a recursive snowflake fractal in C# explains how to use an iterator and a generator to draw a snowflake fractal. This example uses the same technique with the initiator and generator shown in the second and … Continue reading

Posted in fractals, graphics | Tagged , , , , , , , , , , , , , | Leave a comment

Draw a recursive von Koch snowflake fractal in C#

   This example shows how to draw a von Koch snowflake fractal. It uses the same techniques described in the post Draw a recursive snowflake fractal in C#. The DrawSnowflake and DrawSnowflakeEdge methods are exactly the same as before. The … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment

Draw a recursive snowflake fractal in C#

   This program draws a recursive snowflake fractal by using an initiator and a generator to define the fractal’s shape. The initiator is a curve that represent the fractal’s basic shape. In this case, the initiator is the triangle shown … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , | 12 Comments

Draw a curly tree fractal using less memory in C#

To draw trees, the example Draw a curly tree fractal in C# first builds lists holding the end points of the tree’s branches. It then finds the bounds of those points, makes a transformation to center the tree nicely, and … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , , , | Leave a comment

Draw a curly tree fractal in C#

This example uses recursion to build a fractal tree. It starts by drawing the tree’s trunk. At the end of the trunk, it creates two branches. At the end of each branch, it creates two new branches A and B. … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , , , | Leave a comment

Draw a colored Pickover popcorn fractal in C#

The example Draw a Pickover popcorn fractal in C# explains how to draw the basic Pickover popcorn fractal by iterating these equations: Xn+1 = Xn – h * Sin(Yn + Tan(3 * Yn)) Yn+1 = Yn – h * Sin(Xn … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , | Leave a comment

Draw a Pickover popcorn fractal in C#

This program maps an iterated function system in its drawing area onto the region -4 <= x <= 4, -3 <= y <= 3. If you click on a point, the program iterates these equations and plots the points: Xn+1 … Continue reading

Posted in algorithms, drawing, fractals, graphics, mathematics | Tagged , , , , , , , , , , , , | 1 Comment