Dragon curve step-by-step
This code creates a dragon curve by iterations. To get the next iteration simply click on the canvas. The algorythm is very simple and should be improved in the generation of the middle point: now it has been created only for vertical, horizontal or pi/4 angle segments. A new version can be defined in order to draw rotated dragon curves as well.