|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.biology.lsystems.fixed.LSystem
public class LSystem
This class represents an LSystem as we know it in text form. It can read values from a file or stream and store
them in this class. After a system has been read and validated you can make the derivations and obtain the final
string representing the figure. With this string the turtle is able to build the system and make it visible to
the user.
The file or stram must respect some definitions: All codewords listed in the Def class must stand at the beginning
of the line and written in the right case. As separator to the value only the specified symbol may be used. The order
of the lines does not matter. Lines which do not begin with a codeword are ignored. White spaces may be used or not.
depth = 5 angle = 90 axiom = F-F-F-F rule = F -> F-F+F+FF-F-F+F
| Constructor Summary | |
|---|---|
LSystem()
Constructor. |
|
| Method Summary | |
|---|---|
void |
build(java.io.File fileValues)
Reads the values for the LSystem from a file and stores them in the member fields. |
void |
derivate()
This method derivates the LSystem. |
float |
getAngle()
Gets the angle of the LSystem |
float |
getDecrement()
Gets the value of decrenentation of the thickness of a branch. |
float |
getLength()
Gets the length of the branch at beginning. |
java.lang.String |
getSystem()
Gets the LSystem represented by a string. |
float |
getThickness()
Get the thickness of the branch at beginning. |
void |
setAngle(float fAngle)
Sets the angle for the LSystem to the member field. |
void |
setAxiom(java.lang.String strAxiom)
Stores the new axiom for this class. |
void |
setDepth(int iDepth)
Sets the derivation depth for the LSystem. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LSystem()
| Method Detail |
|---|
public void build(java.io.File fileValues)
throws java.lang.Exception
fileValues - The file to extract and store.
java.lang.Exception
public void derivate()
throws java.lang.Exception
java.lang.Exception - If the derivation process fails.public void setDepth(int iDepth)
iDepth - The depth to set.public void setAngle(float fAngle)
fAngle - The new value for the angle.public void setAxiom(java.lang.String strAxiom)
strAxiom - The new axiom to set.public java.lang.String getSystem()
public float getAngle()
public float getThickness()
public float getLength()
public float getDecrement()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||