java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.rgg.RGG
de.grogra.grogra.LSystem
- All Implemented Interfaces:
Manageable,PersistenceCapable,Shareable,RegistryContext,Selectable,UserFields,XObject,Map,Serializable,Observer
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.graph.impl.Node
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Node.NTypefloatstatic final Node.NType.FieldContains the current node which matched the left hand side of a rule, or which is the current node of an arithmetical-structural computation.protected float[]intstatic final Node.NType.FieldfloatContains the value of GROGRA's register 0.floatContains the value of GROGRA's register 1.floatContains the value of GROGRA's register 2.floatContains the value of GROGRA's register 3.floatContains the value of GROGRA's register 4.floatContains the value of GROGRA's register 5.floatContains the value of GROGRA's register 6.floatContains the value of GROGRA's register 7.floatContains the value of GROGRA's register 8.floatContains the value of GROGRA's register 9.Fields inherited from class de.grogra.rgg.RGG
classesToIgnoreOrConsider$FIELD, consider$FIELD, doRun$FIELD, GROUP_TYPE, I18N, initialTurtleState, initialTurtleState$FIELD, STEPRUNFields inherited from class de.grogra.graph.impl.Node
ADDITIONAL_FIELDS, bits, DELETED, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELD, USED_BITSFields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignLocalRegister(int no, float value) Go back to the next shoot with the given localregisterno and assign the given valueprotected voidassignLocalRegisterAdd(int no, float value) Go back to the next shoot with the given localregisterno and add the given valueprotected voidassignLocalRegisterMul(int no, float value) Go back to the next shoot with the given localregisterno and multiply the given valueprotected voidassignReferenceShoot(int no, float value) Go to the reference shoot (select by function21) and assign the localregisterno with the given valueprotected voidassignReferenceShootAdd(int no, float value) Go to the reference shoot (select by function21) and add the localregisterno with the given valueprotected voidassignReferenceShootMul(int no, float value) Go to the reference shoot (select by function21) and multiply the localregisterno with the given valuestatic floatatan(float x) static floatatg(float x) static LSystemcurrent()floatThe GROGRA variable of type "length" returns the length of the associated shoot of thecurrentNodeif generative rules are active, or the value oflengthof the current turtle state if interpretative rules are active.floatReturns the global x-coordinate of the tip of the associated shoot of thecurrentNode.floatReturns the global y-coordinate of the tip of the associated shoot of thecurrentNode.floatReturns the global z-coordinate of the tip of the associated shoot of thecurrentNode.voidstatic floatexp(float x) static floatfloor(float x) floatfunction1(double minLength) static floatfunction10(float x) static floatfunction11(float n, float k, float b, float c2, float d) static floatfunction12(float i, float age) static floatfunction13(double xl, double xf) GROGRA function 13 Calculation of number of lateral buds from shoot lengthfloatfunction15(int color) floatfunction2(double minLength, int color) floatfunction20(int color) floatfunction21(int color) floatGROGRA function 3 computes the sum of theparametervalues of the turtle states of allShoots emerging from thecurrentNode.floatfunction30(float arg1, float arg2, float arg3) Auxilliary function for control purposes.floatfunction31(float arg1, float arg2, float arg3) floatfunction32(float arg1, float arg2, float arg3) floatfunction33(float arg1, float arg2, float arg3) floatfunction34(float arg1, float arg2, float arg3) floatfunction35(float arg1, float arg2, float arg3) floatfunction36(float arg1, float arg2, float arg3) floatfunction37(float arg1, float arg2, float arg3) floatfunction38(float arg1, float arg2, float arg3) floatfunction39(float arg1, float arg2, float arg3) floatfunction4(double alpha, double minLength) floatfunction5(double alpha) floatGROGRA function 6 computes the sum of thecarbonvalues of the turtle states of allShoots emerging from thecurrentNode.floatGROGRA function 7 computes the angle (in degrees) between the global z-direction and the local z-direction of thecurrentNode.floatfunction8(int color) floatfunction9(double alpha, double minleng, int co) static LSystemintprotected floatgetLocalRegisterValue(int no) Method is called, when the value of a localregister is neededprotected Node.NTypeThis method returns theNode.NTypewhich describes the managed fields of the class of this node.protected voidinitializeApplyMenu(Item d, boolean flat, boolean useRunCheckBox) protected voidinitializeRunMenu(Item d, boolean flat, boolean useRunCheckBox) voidstatic floatlog(float x) static floatmax(float a, float b) voidmethod1()Computated the distribution of assimilate in a simple plant-model.voidmethod10()Interface to branch library of TRAGIC++ (BITOEK, XI/1998)voidmethod12()Writes all carbon-values of shoots with the color 14 to method12.datvoidmethod30()Auxiliary method for control purposes: Scans through the whole structure, finds trees, whorls and branches.voidmethod31()voidmethod32()Creates boxes for every branch and calculates different kind of information of shoots, which belong to different boxes.voidmethod33()voidmethod34()voidmethod35()voidmethod36()voidmethod37()voidmethod38()voidmethod39()voidmethod4()Write the current-structure in a binary-file strutemp.dat.voidmethod40()voidmethod41()voidmethod42()voidmethod43()voidmethod44()static floatmin(float a, float b) protected NodeThis method returns a new instance of the class of this node.static floatnormal(float mu, float sigma) Returns a pseudorandom number which is distributed according to a normal distribution with mean valuemuand standard deviationsigma.voidpatternMatched(RGGProducer prod) Invoked after a pattern of a rule has matched, but before the right-hand side of the rule is executed.static floatrandom()Returns a pseudo-random number which is uniformly distributed between 0 and 1.protected voidreset()This method can be invoked to reset the RGG to its initial state.static intround(float x) protected voidshutdown()This method is invoked when an RGG instance is unloaded within GroIMP.static floatsqr(float x) static floatsqrt(float x) protected voidstartup()This method is invoked when an RGG instance is loaded within GroIMP.voidThis generator method yieldsvoidfor every daughter shoot of the associated shoot of thecurrentNode.voidThis generator method yieldsvoidfor every shoot of the subtree starting at the associated shoot of thecurrentNode.voidThis generator method yieldsvoidfor every shoot in the path from the associated shoot of thecurrentNodedownwards to the root.static floatuniform(float min, float max) Returns a pseudo-random number which is uniformly distributed betweenminandmax.Methods inherited from class de.grogra.rgg.RGG
addLock, addTask, applyInterpretation, consider, getMainRGG, getRate, getRegistry, getRGGForTypeMap, getRoot, getSolver, getTasks, ignore, init, initializeTurtleState, integrate, integrate, interpret, invokeInit, isAutoClearMonitors, isMainRGG, isTransformationMethod, left, monitor, monitor, monitorPeriodic, observe, observe, pullLock, readChannelAt, readChannelAt, readChannelAt, right, run, runLater, runLater, setAutoClearMonitors, setSolver, setSolver, shutdown, solveTasks, startup, stop, toSelection, unmonitor, updateMethods inherited from class de.grogra.graph.impl.Node
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupFrom, dupnew, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, findRefinementType, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIgnored, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getResolution, getShort, getSource, getStamp, getSuccessor, getSymbol, getSymbolColor, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isEncoarseOf, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExtentIndex, setGraphForDeserialization, setIgnored, setLayer, setMark, setName, setResolution, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplaceMethods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.persistence.PersistenceCapable
getBitMark, getObjectMark, setBitMark, setObjectMark
-
Field Details
-
angle
public float angle -
generation
public int generation -
r0
public float r0Contains the value of GROGRA's register 0. -
r1
public float r1Contains the value of GROGRA's register 1. -
r2
public float r2Contains the value of GROGRA's register 2. -
r3
public float r3Contains the value of GROGRA's register 3. -
r4
public float r4Contains the value of GROGRA's register 4. -
r5
public float r5Contains the value of GROGRA's register 5. -
r6
public float r6Contains the value of GROGRA's register 6. -
r7
public float r7Contains the value of GROGRA's register 7. -
r8
public float r8Contains the value of GROGRA's register 8. -
r9
public float r9Contains the value of GROGRA's register 9. -
defaultValuesForLocalRegisters
protected float[] defaultValuesForLocalRegisters -
currentNode
Contains the current node which matched the left hand side of a rule, or which is the current node of an arithmetical-structural computation. -
$TYPE
-
angle$FIELD
-
generation$FIELD
-
-
Constructor Details
-
LSystem
public LSystem()
-
-
Method Details
-
reset
protected void reset()Description copied from class:RGGThis method can be invoked to reset the RGG to its initial state. The following steps are performed:-
If there is an instance of
RGGRootwhich is connected with the real root of the graph by a branch edge, then this instance is removed. A new instance ofRGGRootis created and connected with the real root by a branch edge. -
A new instance of
Axiomis created and inserted in the graph by a successor edge from theRGGRootinstance. The result of this step is a graph containing anRGGRootwhich has a singleAxiomas its successor. -
The method
RGG.init()is invoked. This invocation is surrounded by transformation boundaries (seeLibrary.apply()).
-
If there is an instance of
-
uniform
public static float uniform(float min, float max) Returns a pseudo-random number which is uniformly distributed betweenminandmax.- Parameters:
min- minimum valuemax- maximum value- Returns:
- pseudo-random number between
minandmax
-
normal
public static float normal(float mu, float sigma) Returns a pseudorandom number which is distributed according to a normal distribution with mean valuemuand standard deviationsigma.- Parameters:
mu- mean valuesigma- standard deviation- Returns:
- normally distributed random number
-
random
public static float random()Returns a pseudo-random number which is uniformly distributed between 0 and 1.- Returns:
- pseudo-random number between 0 and 1
-
sumGenerator
This generator method yieldsvoidfor every shoot of the subtree starting at the associated shoot of thecurrentNode.- Parameters:
c- a consumer
-
sumdGenerator
This generator method yieldsvoidfor every daughter shoot of the associated shoot of thecurrentNode.- Parameters:
c- a consumer
-
sumpGenerator
This generator method yieldsvoidfor every shoot in the path from the associated shoot of thecurrentNodedownwards to the root.- Parameters:
c- a consumer
-
patternMatched
Invoked after a pattern of a rule has matched, but before the right-hand side of the rule is executed.- Parameters:
prod- the producer which is used for the right-hand side
-
currentXcoordinate
public float currentXcoordinate()Returns the global x-coordinate of the tip of the associated shoot of thecurrentNode.- Returns:
- x-coordinate of current shoot
-
currentYcoordinate
public float currentYcoordinate()Returns the global y-coordinate of the tip of the associated shoot of thecurrentNode.- Returns:
- y-coordinate of current shoot
-
currentZcoordinate
public float currentZcoordinate()Returns the global z-coordinate of the tip of the associated shoot of thecurrentNode.- Returns:
- z-coordinate of current shoot
-
currentLength
public float currentLength()The GROGRA variable of type "length" returns the length of the associated shoot of thecurrentNodeif generative rules are active, or the value oflengthof the current turtle state if interpretative rules are active.- Returns:
- current length
-
function1
public float function1(double minLength) -
function2
public float function2(double minLength, int color) -
function3
public float function3()GROGRA function 3 computes the sum of theparametervalues of the turtle states of allShoots emerging from thecurrentNode.- Returns:
- sum of
parametervalues
-
function4
public float function4(double alpha, double minLength) -
function5
public float function5(double alpha) -
function6
public float function6()GROGRA function 6 computes the sum of thecarbonvalues of the turtle states of allShoots emerging from thecurrentNode.- Returns:
- sum of
carbonvalues
-
function7
public float function7()GROGRA function 7 computes the angle (in degrees) between the global z-direction and the local z-direction of thecurrentNode.- Returns:
- angle between local and global z-direction in degrees
-
function8
public float function8(int color) -
function9
public float function9(double alpha, double minleng, int co) -
function10
public static float function10(float x) -
function11
public static float function11(float n, float k, float b, float c2, float d) -
function12
public static float function12(float i, float age) -
function13
public static float function13(double xl, double xf) GROGRA function 13 Calculation of number of lateral buds from shoot length- Parameters:
xl- the length of the shootxf- an (optional) conversion factor to be multiplied with xl^2- Returns:
-
function15
public float function15(int color) -
function20
public float function20(int color) -
function21
public float function21(int color) -
function30
public float function30(float arg1, float arg2, float arg3) Auxilliary function for control purposes. Write the arguments to the console.- Parameters:
arg1- First argumentarg2- Second argumentarg3- third argument- Returns:
- Constant 0.0f
-
function31
public float function31(float arg1, float arg2, float arg3) -
function32
public float function32(float arg1, float arg2, float arg3) -
function33
public float function33(float arg1, float arg2, float arg3) -
function34
public float function34(float arg1, float arg2, float arg3) -
function35
public float function35(float arg1, float arg2, float arg3) -
function36
public float function36(float arg1, float arg2, float arg3) -
function37
public float function37(float arg1, float arg2, float arg3) -
function38
public float function38(float arg1, float arg2, float arg3) -
function39
public float function39(float arg1, float arg2, float arg3) -
method1
public void method1()Computated the distribution of assimilate in a simple plant-model. Use the global registers 1 - 4. (non-realistic example, only for demonstration) -
method4
public void method4()Write the current-structure in a binary-file strutemp.dat. WARNING: The stored structured is using big endian for coding the bytes (highest byte first). The class RandomAccessFile does not support little endian coding for binary-files. Big endian is normally used on UNIX-systems. All int-values are stored as 16-bit-values, for the compatibility to system where int-values have a range of 16-bits and for the compatibility to GroGra-files. All long-values are stored as 32-bit-values. Additional ... there could be problems with the floating point values ... it's in the Java-format. The GroGra auxiliary-variables yka, xke and yke will saved with the value 0. The GroGra auxiliary-variable xka will saved with the carbon-value. The GroGra scale-counter-variable is currently saved with the value 0. The local registers of a shoot are not saved (now). -
method10
public void method10()Interface to branch library of TRAGIC++ (BITOEK, XI/1998) -
method12
public void method12()Writes all carbon-values of shoots with the color 14 to method12.dat -
method30
public void method30()Auxiliary method for control purposes: Scans through the whole structure, finds trees, whorls and branches. -
method32
public void method32()Creates boxes for every branch and calculates different kind of information of shoots, which belong to different boxes. (These boxes are used, when shading, photosynthesis, formation of new shoots etc. is calculated) -
method31
public void method31() -
method33
public void method33() -
method34
public void method34() -
method35
public void method35() -
method36
public void method36() -
method37
public void method37() -
method38
public void method38() -
method39
public void method39() -
method40
public void method40() -
method41
public void method41() -
method42
public void method42() -
method43
public void method43() -
method44
public void method44() -
getShootPopulation
-
getRefShoot
-
getGenerationNo
public int getGenerationNo() -
floor
public static float floor(float x) -
exp
public static float exp(float x) -
log
public static float log(float x) -
sqr
public static float sqr(float x) -
sqrt
public static float sqrt(float x) -
atan
public static float atan(float x) -
atg
public static float atg(float x) -
round
public static int round(float x) -
min
public static float min(float a, float b) -
max
public static float max(float a, float b) -
get
-
current
-
startup
protected void startup()Description copied from class:RGGThis method is invoked when an RGG instance is loaded within GroIMP. This happens after the compilation of its source code and after loading a project containing an RGG.
If this method is overridden,super.startup();should be invoked at first. -
shutdown
protected void shutdown()Description copied from class:RGGThis method is invoked when an RGG instance is unloaded within GroIMP. This happens to an old RGG instance after compilation when this old instance is to be replaced by the newly compiled RGG instance.
If this method is overriden,super.shutdown();should be invoked. -
derivation
public void derivation() -
interpretation
public void interpretation() -
initializeApplyMenu
- Overrides:
initializeApplyMenuin classRGG
-
initializeRunMenu
- Overrides:
initializeRunMenuin classRGG
-
assignLocalRegister
protected void assignLocalRegister(int no, float value) Go back to the next shoot with the given localregisterno and assign the given value- Parameters:
value- the valuenr- the localregisterno
-
assignLocalRegisterAdd
protected void assignLocalRegisterAdd(int no, float value) Go back to the next shoot with the given localregisterno and add the given value- Parameters:
value- the valuenr- the localregisterno
-
assignLocalRegisterMul
protected void assignLocalRegisterMul(int no, float value) Go back to the next shoot with the given localregisterno and multiply the given value- Parameters:
value- the valuenr- the localregisterno
-
assignReferenceShoot
protected void assignReferenceShoot(int no, float value) Go to the reference shoot (select by function21) and assign the localregisterno with the given value- Parameters:
value- the valuenr- the localregisterno
-
assignReferenceShootAdd
protected void assignReferenceShootAdd(int no, float value) Go to the reference shoot (select by function21) and add the localregisterno with the given value- Parameters:
value- the valuenr- the localregisterno
-
assignReferenceShootMul
protected void assignReferenceShootMul(int no, float value) Go to the reference shoot (select by function21) and multiply the localregisterno with the given value- Parameters:
value- the valuenr- the localregisterno
-
getLocalRegisterValue
protected float getLocalRegisterValue(int no) Method is called, when the value of a localregister is needed- Parameters:
no- number of the localregister- Returns:
- the value
-
getNTypeImpl
Description copied from class:NodeThis method returns theNode.NTypewhich describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
getNTypeImplin classRGG- Returns:
- type describing the managed fields of the class of this node
-
newInstance
Description copied from class:NodeThis method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
newInstancein classRGG- Returns:
- new instance of class of this node
-