Fractals in Small Basic

There is a list of fractal programs in a blog article here. But, I'd like to update and summarize again about fractal programs in this post.

Fractal Tree

I think this may be the first fractal program written in Small Basic. The program is listed in Small Basic Getting Started Guide.

Dragon Curve

Last month, Kenneth Lee Taylor started posting fractal graphics and that codes to Small Basic Enthusiasts.  Following graphic is the first one of them.

Sierpinski Triangle

This is another one by Kenneth.

Screen shot of a fractal triangle program


There are some programs drawing Mandelbrot set here.  Following screen shot is one of them written by Rene_Miner.

Screen shot of a Mandelbrot program

Koch Curve

This program written by solongos has menu to choose some fractals.  This program is shared in this thread.

Screen shot of a fractal program


Hilbert Curve

The last one is my program (CMN910).  This program is a good sample of recursive call.

Screen shot of a program Hilbert Curve 0.1

Other Resources

Comments (6)

  1. Wow! These are some fantastic examples!

  2. Tryhest says:

    hilbert curve analysis: WQM392
    use mswheel to scroll through curve

  3. YLed says:

    the theory of fractals fascinates me !!
    This fractal was first defined and drawn in 1978 by Robert W. Brooks and Peter Matelski as part of a study of Kleinian groups.
    The first published picture of the Mandelbrot set, by Robert W. Brooks and Peter Matelski in 1978
    see the set here:

  4. Nandakumar K says:

    The first example of Fractal Tree has two sub- branches growing from every branch. Can anyone tell me how to write the code if I have to have three sub- branches from every branch?

    1. Tryhest says:

      3-branches tree
      angle = 30
      delta = 10
      distance = 60
      Turtle.Speed = 6
      GraphicsWindow.BackgroundColor = “Black”
      GraphicsWindow.PenColor = “LightGreen”

      Sub DrawTree
      If (distance > 0) Then

      Stack.PushValue(“distance”, distance)
      distance = distance – delta
      Turtle.Turn(-angle * 1.5)
      Turtle.Turn(-angle * 1.5)
      distance = Stack.PopValue(“distance”)

  5. Tryhest says:

    3branches smooth anim: MSB011

Skip to main content