What is this ?

How to write a genome

f : draw f orward in the direction I'm currently facing.

: draw orward in the direction I'm currently facing. n : step forward with n o drawing.

: step forward with o drawing. - : step backward with no drawing.

: step backward with no drawing. c : draws a filled c ircle.

: draws a filled ircle. l : turn l eft.

: turn eft. r : turn r ight.

: turn ight. d : d uplicate - create a child in my direction.

: uplicate - create a child in my direction. b : b ranch - 50% chance of creating a child in my direction.

: ranch - 50% chance of creating a child in my direction. s : s tep - either draw forward or do nothing, at random.

: tep - either draw forward or do nothing, at random. t : t urn : turn left or right, at random.

: urn : turn left or right, at random. ? : turn left or right or not at all, at random.

: turn left or right or not at all, at random. m : mirror - 50% chance that turning left and right are inverted.

a:*; : defines the a ngle of a turn to * degrees. 90 gives square angles.

: defines the ngle of a turn to * degrees. 90 gives square angles. g:*; : defines the maximum amount of g enerations to *. Keep it small or your browser might crash !

: defines the maximum amount of enerations to *. Keep it small or your browser might crash ! s:*; : defines the s tarting angle to * degrees.

: defines the tarting angle to * degrees. b:*; : defines the b ranching symmetry to * branches.

: defines the ranching symmetry to * branches. c:*; : defines the size of the c ircles to * (this is affected by the ratio).

: defines the size of the ircles to * (this is affected by the ratio). d:*; : defines the d istance travelled by a step forward to * pixels (when the ratio is 1). Basically, this sets the size of the drawing.

: defines the istance travelled by a step forward to * pixels (when the ratio is 1). Basically, this sets the size of the drawing. r:*; : defines the ratio to * (a number between 0 and 2). A ratio of 0.5 means that each generation is half the size of its parent.

This is a fractal toy that generates a picture according to a set of instructions stored in a simple string of characters (the genome).It can be used to generate trees, squiggles and other shapes.The algorithm used is related to L-systems and turtle graphics It is coded in javascript and uses html5 canvas.A genome is a chain of operations executed by bots. A bot draws a line as it goes forward. It can also turn and duplicate itself.A bot executes a specific operation for every character that appears in the genome.