Package net.paulhertz.pixelaudio

# Class Lindenmayer

java.lang.Object
net.paulhertz.pixelaudio.Lindenmayer

public class Lindenmayer extends Object
Implements a simple Lindenmeyer system (L-system), a so-called DOL-system: deterministic and context-free. Load production strings into transTable with put(), retrieve them with get(). I used this class for Hilbert curve generation until I found analytical methods in Wikipedia to speed up curve generation. There will be demos, but probably not for the early beta release.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `Lindenmayer.AnimStepper`
  Animation frame-counting tool
  `class`
  `Lindenmayer.AnimUnit`
  Data storage for number of steps n each of duration d, with additional scaling factor s.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private HashMap<String,String>`
  `transTable`
  transition table for string production
  `boolean`
  `verbose`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Lindenmayer()`
  Creates a new Lindenmeyer instance;

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `expandString(ArrayList<String> tokens, int levels, ArrayList<String> sb)`
  `String`
  `get(String clef)`
  Gets a value from the transition table corresponding to the supplied key.
  `ArrayList<String>`
  `hilbert(int depth)`
  Encode strings representing a Hilbert curve to supplied depth.
  `int[]`
  `loadAnimSteps(Lindenmayer.AnimStepper stepper)`
  `void`
  `put(String clef, String value)`
  Loads a key and its corresponding value into the transition table.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### transTable

    private HashMap<String,String> transTable
    transition table for string production

  - ### verbose

    public boolean verbose

- ## Constructor Details

  - ### Lindenmayer

    public Lindenmayer()
    Creates a new Lindenmeyer instance;

- ## Method Details

  - ### get

    public String get(String clef)
    Gets a value from the transition table corresponding to the supplied key.
    Parameters:
      `clef` - a single-character String
    Returns:
      value corresponding to the key

  - ### put

    public void put(String clef, String value)
    Loads a key and its corresponding value into the transition table.
    Parameters:
      `clef` - a single-character String
      `value` - the String value associated with the key

  - ### expandString

    public void expandString(ArrayList<String> tokens, int levels, ArrayList<String> sb)

  - ### hilbert

    public ArrayList<String> hilbert(int depth)
    Encode strings representing a Hilbert curve to supplied depth. To draw the actual curve, ignore the R and L symbols + : 90 degrees CW - : 90 degrees CCW F : forward (n) units
    Parameters:
      `depth` - number of recursive iterations of the L-system

  - ### loadAnimSteps

    public int[] loadAnimSteps(Lindenmayer.AnimStepper stepper)