FOSSASIA

Graphics Programming: Fractal recursed

Draw two fractals

(1) Objective

Using recursive programming, draw fractals.

(2) Requirement

Fractals appear in many places:

I. plants (fern, tree, broccoli)

II. animals (seahorse, sea-star, ammonite)

III. inanimate world (coast, Universe, snowflake)

IV. abstract objects (Escher's drawing)

1) Pick 2 categories among 4 given above.

2) Recursive-program to display a fractal from each category.

3) Use a different color scheme at each recursion level.

4) For the first fractal, periodically repeat the schemes.

5) For the second, determine the color scheme using the digits of Pi = 3.141592... Is the color scheme periodic this time?

Optional: compute their fractal dimensions.

If you use Python, turtle might be helpful.

If this seems too hard, start with a task similar to this one Play with Search, using recursion and random, also under FOSSASIA task category.

(3) Expected outcome

Using recursive programming, draw two colorful fractals.

Fractals are self-similar objects. Meaning that as you change recursion depth, the object should look similar. When you play with your code, do test it with varying recursion depth as well.

Task tags

  • recursion
  • dimension
  • fractal
  • programming
  • graphics

Students who completed this task

Aishwarya, atul009, Amaan, nathanhleung, notabigthreat, Nalin Bhardwaj, ThatOneIndianDude, shiftsayan

Task type

  • code Code
close

2015