Uses the LSystem class defined at Hilbert curve.
var rules = Hash( x => 'x+yF+', y => '-Fx-y', ) var lsys = LSystem( width: 600, height: 600, xoff: -430, yoff: -380, len: 8, angle: 90, color: 'dark green', ) lsys.execute('Fx', 11, "dragon_curve.png", rules)
Output image: Dragon curve
Last updated 1 year ago