public class LsysRewriter extends EventRewriter
Modifier and Type | Class and Description |
---|---|
static class |
LsysRewriter.LsysRule |
Modifier and Type | Field and Description |
---|---|
String |
alphabet |
int |
generations |
Map<String,TurtleDrawCommand> |
turtleDrawCommands |
Constructor and Description |
---|
LsysRewriter(int generations,
String... ruleStrings) |
LsysRewriter(String... ruleStrings) |
LsysRewriter(String alphabet,
int generations,
ArrayList<Rule> rules) |
LsysRewriter(String alphabet,
int generations,
String... ruleStrings) |
Modifier and Type | Method and Description |
---|---|
EventCollection |
apply(EventCollection original) |
String |
fromDouble(double value) |
String |
fromEvents(Collection<LEvent> events) |
static String |
getAlphabetFrom(String... ruleStrings) |
TurtleDrawCommand[] |
getTurtleDrawCommands() |
EventCollection |
makeAxiom(String axiom) |
static ArrayList<Rule> |
makeRules(String alphabet,
String[] strings) |
static LsysRewriter.LsysRule |
ruleFrom(String alphabet,
String rule) |
void |
setCommand(String symbol,
TurtleDrawCommand command) |
static Double[] |
toDoubles(String alphabet,
String s) |
public int generations
public String alphabet
public Map<String,TurtleDrawCommand> turtleDrawCommands
public LsysRewriter(String... ruleStrings)
public LsysRewriter(int generations, String... ruleStrings)
public static LsysRewriter.LsysRule ruleFrom(String alphabet, String rule)
public String fromDouble(double value)
public String fromEvents(Collection<LEvent> events)
public EventCollection makeAxiom(String axiom)
public void setCommand(String symbol, TurtleDrawCommand command)
public TurtleDrawCommand[] getTurtleDrawCommands()
public EventCollection apply(EventCollection original)
apply
in class EventRewriter
Processing Library loom by Cora Johnson-Roberson. (c) 2014-2016