|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFractal.LSystem2
public class LSystem2
LSystem algorithm. So, I seen that this algorithm appears twice in LSystem.java and twice again in largeLSystem.java, and I figured, one more. Written from scratch (rather than copy/paste), and with everything that's not LSystem related (such as GUI stuff that appears in the other four implementations) ripped out and put into callback/listeners
Constructor Summary | |
---|---|
LSystem2(java.lang.String grammar,
int depth,
float angle)
Create a new LSystem and compile the grammar (recurse 'grammar', 'depth' times) with axiom of l-value of grammar or 'F' |
|
LSystem2(java.lang.String axiom,
java.lang.String grammar,
int depth,
float angle)
Create a new LSystem and compile the grammar (recurse 'grammar', 'depth' times) |
Method Summary | |
---|---|
float |
getAngle()
Get the angle this LSystem turns by for each + - input |
java.lang.String |
getDerivedGrammar()
Get the grammar expanded to the specified depth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LSystem2(java.lang.String grammar, int depth, float angle)
grammar
- GEVA grammar to executedepth
- Depth grammar should recurse to 'compile' itangle
- Angle LSystem turns for each turn operation, in degreespublic LSystem2(java.lang.String axiom, java.lang.String grammar, int depth, float angle)
axiom
- Axiom to which grammar is appliedgrammar
- GEVA grammar to executedepth
- Depth grammar should recurse to 'compile' itangle
- Angle LSystem turns for each turn operation, in degreesMethod Detail |
---|
public java.lang.String getDerivedGrammar()
public float getAngle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |