|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.graph.impl.Edge de.grogra.graph.impl.Node de.grogra.rgg.RGG de.grogra.grogra.LSystem
public class LSystem
Nested Class Summary | |
---|---|
class |
LSystem.Apply
|
Nested classes/interfaces inherited from class de.grogra.graph.impl.Node |
---|
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType |
Nested classes/interfaces inherited from interface de.grogra.util.Map |
---|
Map.Chain |
Field Summary | |
---|---|
static Node.NType |
$TYPE
|
float |
angle
|
static Node.NType.Field |
angle$FIELD
|
Node |
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. |
protected float[] |
defaultValuesForLocalRegisters
|
int |
generation
|
static Node.NType.Field |
generation$FIELD
|
float |
r0
Contains the value of GROGRA's register 0. |
float |
r1
Contains the value of GROGRA's register 1. |
float |
r2
Contains the value of GROGRA's register 2. |
float |
r3
Contains the value of GROGRA's register 3. |
float |
r4
Contains the value of GROGRA's register 4. |
float |
r5
Contains the value of GROGRA's register 5. |
float |
r6
Contains the value of GROGRA's register 6. |
float |
r7
Contains the value of GROGRA's register 7. |
float |
r8
Contains the value of GROGRA's register 8. |
float |
r9
Contains 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, STEPRUN |
Fields 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, MIME_TYPE, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, USED_BITS |
Fields inherited from interface de.grogra.util.Map |
---|
DEFAULT_VALUE, EMPTY_MAP |
Constructor Summary | |
---|---|
LSystem()
|
Method Summary | |
---|---|
protected void |
assignLocalRegister(int no,
float value)
Go back to the next shoot with the given localregisterno and assign the given value |
protected void |
assignLocalRegisterAdd(int no,
float value)
Go back to the next shoot with the given localregisterno and add the given value |
protected void |
assignLocalRegisterMul(int no,
float value)
Go back to the next shoot with the given localregisterno and multiply the given value |
protected void |
assignReferenceShoot(int no,
float value)
Go to the reference shoot (select by function21) and assign the localregisterno with the given value |
protected void |
assignReferenceShootAdd(int no,
float value)
Go to the reference shoot (select by function21) and add the localregisterno with the given value |
protected void |
assignReferenceShootMul(int no,
float value)
Go to the reference shoot (select by function21) and multiply the localregisterno with the given value |
static float |
atan(float x)
|
static float |
atg(float x)
|
static LSystem |
current()
|
float |
currentLength()
The GROGRA variable of type "length" returns the length of the associated shoot of the currentNode if
generative rules are active, or the value of length
of the current turtle state if interpretative rules are active. |
float |
currentXcoordinate()
Returns the global x-coordinate of the tip of the associated shoot of the currentNode . |
float |
currentYcoordinate()
Returns the global y-coordinate of the tip of the associated shoot of the currentNode . |
float |
currentZcoordinate()
Returns the global z-coordinate of the tip of the associated shoot of the currentNode . |
void |
derivation()
|
static float |
exp(float x)
|
static float |
floor(float x)
|
float |
function1(double minLength)
|
static float |
function10(float x)
|
static float |
function11(float n,
float k,
float b,
float c2,
float d)
|
static float |
function12(float i,
float age)
|
static float |
function13(double xl,
double xf)
GROGRA function 13 Calculation of number of lateral buds from shoot length |
float |
function15(int color)
|
float |
function2(double minLength,
int color)
|
float |
function20(int color)
|
float |
function21(int color)
|
float |
function3()
GROGRA function 3 computes the sum of the parameter
values of the turtle states of all Shoot s emerging
from the currentNode . |
float |
function30(float arg1,
float arg2,
float arg3)
Auxilliary function for control purposes. |
float |
function31(float arg1,
float arg2,
float arg3)
|
float |
function32(float arg1,
float arg2,
float arg3)
|
float |
function33(float arg1,
float arg2,
float arg3)
|
float |
function34(float arg1,
float arg2,
float arg3)
|
float |
function35(float arg1,
float arg2,
float arg3)
|
float |
function36(float arg1,
float arg2,
float arg3)
|
float |
function37(float arg1,
float arg2,
float arg3)
|
float |
function38(float arg1,
float arg2,
float arg3)
|
float |
function39(float arg1,
float arg2,
float arg3)
|
float |
function4(double alpha,
double minLength)
|
float |
function5(double alpha)
|
float |
function6()
GROGRA function 6 computes the sum of the carbon
values of the turtle states of all Shoot s emerging
from the currentNode . |
float |
function7()
GROGRA function 7 computes the angle (in degrees) between the global z-direction and the local z-direction of the currentNode . |
float |
function8(int color)
|
float |
function9(double alpha,
double minleng,
int co)
|
static LSystem |
get(Registry r)
|
int |
getGenerationNo()
|
protected float |
getLocalRegisterValue(int no)
Method is called, when the value of a localregister is needed |
protected Node.NType |
getNTypeImpl()
This method returns the Node.NType which describes the managed
fields of the class of this node. |
Shoot |
getRefShoot()
|
Dataset |
getShootPopulation()
|
protected void |
initializeApplyMenu(Item d,
boolean flat,
boolean useRunCheckBox)
|
protected void |
initializeRunMenu(Item d,
boolean flat,
boolean useRunCheckBox)
|
void |
interpretation()
|
static float |
log(float x)
|
static float |
max(float a,
float b)
|
void |
method1()
Computated the distribution of assimilate in a simple plant-model. |
void |
method10()
Interface to branch library of TRAGIC++ (BITOEK, XI/1998) |
void |
method12()
Writes all carbon-values of shoots with the color 14 to method12.dat |
void |
method30()
Auxiliary method for control purposes: Scans through the whole structure, finds trees, whorls and branches. |
void |
method31()
|
void |
method32()
Creates boxes for every branch and calculates different kind of information of shoots, which belong to different boxes. |
void |
method33()
|
void |
method34()
|
void |
method35()
|
void |
method36()
|
void |
method37()
|
void |
method38()
|
void |
method39()
|
void |
method4()
Write the current-structure in a binary-file strutemp.dat. |
void |
method40()
|
void |
method41()
|
void |
method42()
|
void |
method43()
|
void |
method44()
|
static float |
min(float a,
float b)
|
protected Node |
newInstance()
This method returns a new instance of the class of this node. |
static float |
normal(float mu,
float sigma)
Returns a pseudorandom number which is distributed according to a normal distribution with mean value mu and standard
deviation sigma . |
void |
patternMatched(RGGProducer prod)
Invoked after a pattern of a rule has matched, but before the right-hand side of the rule is executed. |
static float |
random()
Returns a pseudo-random number which is uniformly distributed between 0 and 1. |
protected void |
reset()
This method can be invoked to reset the RGG to its initial state. |
static int |
round(float x)
|
protected void |
shutdown()
This method is invoked when an RGG instance is unloaded within GroIMP. |
static float |
sqr(float x)
|
static float |
sqrt(float x)
|
protected void |
startup()
This method is invoked when an RGG instance is loaded within GroIMP. |
void |
sumdGenerator(VoidConsumer c)
This generator method yields void for every daughter shoot
of the associated shoot of the currentNode . |
void |
sumGenerator(VoidConsumer c)
This generator method yields void for every shoot
of the subtree starting at the associated shoot of the
currentNode . |
void |
sumpGenerator(VoidConsumer c)
This generator method yields void for every shoot
in the path from the associated shoot of the currentNode
downwards to the root. |
static float |
uniform(float min,
float max)
Returns a pseudo-random number which is uniformly distributed between min and max . |
Methods inherited from class de.grogra.rgg.RGG |
---|
addTask, applyInterpretation, consider, getMainRGG, getRate, getRegistry, getRGGForTypeMap, getRoot, getSolver, getTasks, ignore, init, initializeTurtleState, integrate, integrate, interpret, invokeInit, isAutoClearMonitors, isMainRGG, left, monitor, monitor, monitorPeriodic, readChannelAt, readChannelAt, readChannelAt, right, run, runLater, runLater, setAutoClearMonitors, setSolver, setSolver, shutdown, solveTasks, startup, stop, toSelection, unmonitor |
Methods inherited from class de.grogra.graph.impl.Edge |
---|
addEdgeBits, getBitMark, getEdgeBits, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBits |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.grogra.persistence.PersistenceCapable |
---|
getBitMark, getObjectMark, setBitMark, setObjectMark |
Field Detail |
---|
public static final Node.NType $TYPE
public float angle
public static final Node.NType.Field angle$FIELD
public Node currentNode
protected float[] defaultValuesForLocalRegisters
public int generation
public static final Node.NType.Field generation$FIELD
public float r0
public float r1
public float r2
public float r3
public float r4
public float r5
public float r6
public float r7
public float r8
public float r9
Constructor Detail |
---|
public LSystem()
Method Detail |
---|
protected void assignLocalRegister(int no, float value)
nr
- the localregisternovalue
- the valueprotected void assignLocalRegisterAdd(int no, float value)
nr
- the localregisternovalue
- the valueprotected void assignLocalRegisterMul(int no, float value)
nr
- the localregisternovalue
- the valueprotected void assignReferenceShoot(int no, float value)
nr
- the localregisternovalue
- the valueprotected void assignReferenceShootAdd(int no, float value)
nr
- the localregisternovalue
- the valueprotected void assignReferenceShootMul(int no, float value)
nr
- the localregisternovalue
- the valuepublic static float atan(float x)
public static float atg(float x)
public static LSystem current()
public float currentLength()
currentNode
if
generative rules are active, or the value of length
of the current turtle state if interpretative rules are active.
public float currentXcoordinate()
currentNode
.
public float currentYcoordinate()
currentNode
.
public float currentZcoordinate()
currentNode
.
public void derivation()
public static float exp(float x)
public static float floor(float x)
public float function1(double minLength)
public static float function10(float x)
public static float function11(float n, float k, float b, float c2, float d)
public static float function12(float i, float age)
public static float function13(double xl, double xf)
xl
- the length of the shootxf
- an (optional) conversion factor to be multiplied with xl^2
public float function15(int color)
public float function2(double minLength, int color)
public float function20(int color)
public float function21(int color)
public float function3()
parameter
values of the turtle states of all Shoot
s emerging
from the currentNode
.
parameter
valuespublic float function30(float arg1, float arg2, float arg3)
arg1
- First argumentarg2
- Second argumentarg3
- third argument
public float function31(float arg1, float arg2, float arg3)
public float function32(float arg1, float arg2, float arg3)
public float function33(float arg1, float arg2, float arg3)
public float function34(float arg1, float arg2, float arg3)
public float function35(float arg1, float arg2, float arg3)
public float function36(float arg1, float arg2, float arg3)
public float function37(float arg1, float arg2, float arg3)
public float function38(float arg1, float arg2, float arg3)
public float function39(float arg1, float arg2, float arg3)
public float function4(double alpha, double minLength)
public float function5(double alpha)
public float function6()
carbon
values of the turtle states of all Shoot
s emerging
from the currentNode
.
carbon
valuespublic float function7()
currentNode
.
public float function8(int color)
public float function9(double alpha, double minleng, int co)
public static LSystem get(Registry r)
public int getGenerationNo()
protected float getLocalRegisterValue(int no)
no
- number of the localregister
protected Node.NType getNTypeImpl()
Node
Node.NType
which describes the managed
fields of the class of this node. This method has to be implemented
in every concrete subclass.
getNTypeImpl
in class RGG
public Shoot getRefShoot()
public Dataset getShootPopulation()
protected void initializeApplyMenu(Item d, boolean flat, boolean useRunCheckBox)
initializeApplyMenu
in class RGG
protected void initializeRunMenu(Item d, boolean flat, boolean useRunCheckBox)
initializeRunMenu
in class RGG
public void interpretation()
public static float log(float x)
public static float max(float a, float b)
public void method1()
public void method10()
public void method12()
public void method30()
public void method31()
public void method32()
public void method33()
public void method34()
public void method35()
public void method36()
public void method37()
public void method38()
public void method39()
public void method4()
public void method40()
public void method41()
public void method42()
public void method43()
public void method44()
public static float min(float a, float b)
protected Node newInstance()
Node
newInstance
in class RGG
public static float normal(float mu, float sigma)
mu
and standard
deviation sigma
.
mu
- mean valuesigma
- standard deviation
public void patternMatched(RGGProducer prod)
prod
- the producer which is used for the right-hand sidepublic static float random()
protected void reset()
RGG
RGGRoot
which is connected with the real root of the
graph by a branch edge, then this instance is removed.
A new instance of RGGRoot
is created and connected with the real root
by a branch edge.
Axiom
is created
and inserted in the graph by a successor edge
from the RGGRoot
instance.
The result of this step
is a graph containing an RGGRoot
which has a single Axiom
as its
successor.
RGG.init()
is invoked. This invocation
is surrounded by transformation boundaries
(see Library.apply()
).
reset
in class RGG
public static int round(float x)
protected void shutdown()
RGG
super.shutdown();
should
be invoked.
shutdown
in class RGG
public static float sqr(float x)
public static float sqrt(float x)
protected void startup()
RGG
super.startup();
should
be invoked at first.
startup
in class RGG
public void sumdGenerator(VoidConsumer c)
void
for every daughter shoot
of the associated shoot of the currentNode
.
c
- a consumerpublic void sumGenerator(VoidConsumer c)
void
for every shoot
of the subtree starting at the associated shoot of the
currentNode
.
c
- a consumerpublic void sumpGenerator(VoidConsumer c)
void
for every shoot
in the path from the associated shoot of the currentNode
downwards to the root.
c
- a consumerpublic static float uniform(float min, float max)
min
and max
.
min
- minimum valuemax
- maximum value
min
and max
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |