fractaldna.structure_models.hilbert.generate_path

fractaldna.structure_models.hilbert.generate_path(lstring, n=2, distance=10.0, rounding=0, pbar=False)

Generate a path from an l-string

When moving a distance smaller than 1, ensure that rounding is set correctly.

This algorithm works best when moving in integer steps and applying any scaling after generating the path.

Parameters:
  • lstring (str) – lstring describing path

  • n (int) – steps on path between forward movements

  • distance (float) – distance between points forward movements

  • rounding (int) – rounding to apply to each position

  • pbar (bool) – display a progress bar

Return type:

List[array]

Returns:

list of XYZ points