Category Archives: fractals

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

Draw four interlocking Heighway dragons in C#

One of the interesting features of the Heighway dragon curve is that it can interlock with itself as shown in this picture. The four curves all start at the same point in the middle of the picture and each is … Continue reading

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

Center a Heighway dragon fractal in C#

The example Draw a Heighway dragon fractal in C# explains how to draw a Heighway dragon. That example draws its curve somewhere near the center of the form but the curve isn’t really centered. To properly size and center the … Continue reading

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

Draw a Heighway dragon fractal in C#

The Heighway dragon, which is also known as the Harter–Heighway dragon, is a recursive curve where each level of recursion provides more detail. The base case where the level of recursion is 0 is a straight line. From any given … Continue reading

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